From 398fe907d0a0be570e254ca177f33cd9850d4e97 Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Thu, 3 Jan 2019 23:19:41 +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 1604659..adc5aa4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -67,7 +67,8 @@ matrix: env: TOOLSET=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 @@ -83,7 +84,8 @@ install: - ./b2 headers 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: email: diff --git a/appveyor.yml b/appveyor.yml index 9c6eb3f..a0c8cae 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -43,4 +43,4 @@ build: off test_script: - 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%