From 040a5b70488b7f37a3c24ada0b8537665dda1975 Mon Sep 17 00:00:00 2001 From: arvidn Date: Thu, 25 Jun 2015 00:26:22 -0400 Subject: [PATCH] fix travis config and make it adapt to the number of CPUs --- .travis.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 94fb16874..f573cb2ca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,8 +6,8 @@ env: - variant=test_barebones install: - - if [ $TRAVIS_OS_NAME == linux ]; then cat /proc/cpuinfo ; fi - - if [ $TRAVIS_OS_NAME == linux ]; then sudo add-apt-repository -y ppa:boost-latest/ppa; fi + - if [ $TRAVIS_OS_NAME == linux ]; then export cpus=`grep processor -c /proc/cpuinfo` ; else export cpus=2 ; fi + - if [ $TRAVIS_OS_NAME == linux ]; then sudo add-apt-repository -y ppa:boost-latest/ppa; sudo apt-get update -qq; fi - if [ $TRAVIS_OS_NAME == linux ]; then sudo apt-get install libboost1.54-all-dev python2.7-dev; fi - if [ $TRAVIS_OS_NAME == osx ]; then sudo brew install boost boost-build python27-dev; fi - 'echo "using gcc : : ccache g++ ;" >~/user-config.jam' @@ -22,11 +22,11 @@ cache: ccache script: - cd test - - bjam -j2 variant=$variant warnings=off -l900 $CC + - bjam -j $cpus variant=$variant warnings=off -l900 $CC - cd ../examples - - bjam -j2 variant=$variant warnings=off $CC + - bjam -j $cpus variant=$variant warnings=off $CC - cd ../bindings/python - - bjam -j2 variant=$variant warnings=off $CC + - bjam -j $cpus variant=$variant warnings=off $CC - ccache --show-stats compiler: