From d2fa5fcce5a2397f51266863dfb1b6dbd79179d4 Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Wed, 2 Jan 2019 18:49:06 +0300 Subject: [PATCH] Corrected CPU count detection on OS X in CI jobs. --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5aa84cf..11510a5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -259,8 +259,9 @@ install: script: - |- echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam - - if [ -n "$CXXSTD64" ]; then echo ""; echo "Testing 64-bit targets"; echo ""; ./b2 -j `nproc` libs/atomic/test toolset=$TOOLSET address-model=64 cxxstd=$CXXSTD64; fi - - if [ -n "$CXXSTD32" ]; then echo ""; echo "Testing 32-bit targets"; echo ""; ./b2 -j `nproc` libs/atomic/test toolset=$TOOLSET address-model=32 cxxstd=$CXXSTD32; fi + - BUILD_JOBS=`(nproc || sysctl -n hw.ncpu) 2> /dev/null` + - if [ -n "$CXXSTD64" ]; then echo ""; echo "Testing 64-bit targets"; echo ""; ./b2 -j $BUILD_JOBS libs/atomic/test toolset=$TOOLSET address-model=64 cxxstd=$CXXSTD64; fi + - if [ -n "$CXXSTD32" ]; then echo ""; echo "Testing 32-bit targets"; echo ""; ./b2 -j $BUILD_JOBS libs/atomic/test toolset=$TOOLSET address-model=32 cxxstd=$CXXSTD32; fi notifications: email: