Use the actual number of logical CPUs for the number of CI build/test jobs.

This commit is contained in:
Andrey Semashev
2019-01-03 23:19:41 +03:00
parent e31ae13df5
commit 398fe907d0
2 changed files with 5 additions and 3 deletions

View File

@ -67,7 +67,8 @@ matrix:
env: TOOLSET=clang CXXSTD=03,11,14,1z env: TOOLSET=clang CXXSTD=03,11,14,1z
install: install:
- BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true - BOOST_BRANCH=develop
- if [ "$TRAVIS_BRANCH" = "master" ]; then BOOST_BRANCH=master; fi
- cd .. - cd ..
- git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root - git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
- cd boost-root - cd boost-root
@ -83,7 +84,8 @@ install:
- ./b2 headers - ./b2 headers
script: script:
- ./b2 -j3 libs/iterator/test toolset=$TOOLSET cxxstd=$CXXSTD - BUILD_JOBS=`(nproc || sysctl -n hw.ncpu) 2> /dev/null`
- ./b2 -j $BUILD_JOBS libs/iterator/test toolset=$TOOLSET cxxstd=$CXXSTD
notifications: notifications:
email: email:

View File

@ -43,4 +43,4 @@ build: off
test_script: test_script:
- if not "%CXXSTD%" == "" set CXXSTD=cxxstd=%CXXSTD% - if not "%CXXSTD%" == "" set CXXSTD=cxxstd=%CXXSTD%
- b2 -j3 libs/iterator/test toolset=%TOOLSET% %CXXSTD% - b2 -j %NUMBER_OF_PROCESSORS% libs/iterator/test toolset=%TOOLSET% %CXXSTD%