From 53d9aa9d2f9adc87d8eddd5a5cf0a202d3428d23 Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Thu, 3 Jan 2019 23:23:55 +0300 Subject: [PATCH] Use the actual number of logical CPUs for the number of CI build/test jobs. --- .travis.yml | 6 ++++-- appveyor.yml | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 74a1d2a..f43f599 100644 --- a/.travis.yml +++ b/.travis.yml @@ -215,7 +215,8 @@ matrix: env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z install: - - BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true + - BOOST_BRANCH=develop + - if [ "$TRAVIS_BRANCH" = "master" ]; then BOOST_BRANCH=master; fi - cd .. - git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root - cd boost-root @@ -240,7 +241,8 @@ install: script: - |- echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam - - ./b2 -j3 libs/utility/test toolset=$TOOLSET cxxstd=$CXXSTD + - BUILD_JOBS=`(nproc || sysctl -n hw.ncpu) 2> /dev/null` + - ./b2 -j $BUILD_JOBS libs/utility/test toolset=$TOOLSET cxxstd=$CXXSTD notifications: email: diff --git a/appveyor.yml b/appveyor.yml index 5bf3fcc..f3f801c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -51,4 +51,4 @@ build: off test_script: - PATH=%ADDPATH%%PATH% - if not "%CXXSTD%" == "" set CXXSTD=cxxstd=%CXXSTD% - - b2 -j3 libs/utility/test toolset=%TOOLSET% %CXXSTD% + - b2 -j %NUMBER_OF_PROCESSORS% libs/utility/test toolset=%TOOLSET% %CXXSTD%