From 018742f50fef3d306e969067ce9d0756c0cbbc64 Mon Sep 17 00:00:00 2001 From: Patrick Niklaus Date: Fri, 7 Apr 2017 08:13:44 +0000 Subject: [PATCH] Constrain the number of jobs on container builds --- .travis.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7b63a7070..a96439b72 100644 --- a/.travis.yml +++ b/.travis.yml @@ -140,7 +140,7 @@ matrix: apt: sources: ['ubuntu-toolchain-r-test'] packages: ['libstdc++-5-dev'] - env: CLANG_VERSION='4.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON ENABLE_LTO=ON ENABLE_NODE_BINDINGS=ON PUBLISH_NODE_BINDINGS=On + env: CLANG_VERSION='4.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON ENABLE_LTO=ON ENABLE_NODE_BINDINGS=ON PUBLISH_NODE_BINDINGS=On JOBS=4 nodejs: "4" script: npm run nodejs-tests @@ -151,7 +151,7 @@ matrix: apt: sources: ['ubuntu-toolchain-r-test'] packages: ['libstdc++-5-dev'] - env: CLANG_VERSION='4.0.0' BUILD_TYPE='Debug' ENABLE_MASON=ON ENABLE_LTO=ON ENABLE_NODE_BINDINGS=ON PUBLISH_NODE_BINDINGS=On + env: CLANG_VERSION='4.0.0' BUILD_TYPE='Debug' ENABLE_MASON=ON ENABLE_LTO=ON ENABLE_NODE_BINDINGS=ON PUBLISH_NODE_BINDINGS=On JOBS=4 nodejs: "4" script: npm run nodejs-tests @@ -162,7 +162,7 @@ matrix: apt: sources: ['ubuntu-toolchain-r-test'] packages: ['libstdc++-5-dev'] - env: CLANG_VERSION='4.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON ENABLE_LTO=ON ENABLE_NODE_BINDINGS=ON PUBLISH_NODE_BINDINGS=On + env: CLANG_VERSION='4.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON ENABLE_LTO=ON ENABLE_NODE_BINDINGS=ON PUBLISH_NODE_BINDINGS=On JOBS=4 nodejs: "6" script: npm run nodejs-tests @@ -173,7 +173,7 @@ matrix: apt: sources: ['ubuntu-toolchain-r-test'] packages: ['libstdc++-5-dev'] - env: CLANG_VERSION='4.0.0' BUILD_TYPE='Debug' ENABLE_MASON=ON ENABLE_LTO=ON ENABLE_NODE_BINDINGS=ON PUBLISH_NODE_BINDINGS=On + env: CLANG_VERSION='4.0.0' BUILD_TYPE='Debug' ENABLE_MASON=ON ENABLE_LTO=ON ENABLE_NODE_BINDINGS=ON PUBLISH_NODE_BINDINGS=On JOBS=4 nodejs: "6" script: npm run nodejs-tests @@ -181,8 +181,12 @@ matrix: before_install: - if [[ ! -z $TARGET_ARCH ]] ; then source ./scripts/travis/before_install.$TARGET_ARCH.sh ; fi - | - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then - export JOBS=$((`nproc` + 1)) + if [[ -z $JOBS ]]; then + if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then + export JOBS=$((`nproc` + 1)) + elif [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then + export JOBS=$((`sysctl -n hw.ncpu` + 1)) + fi fi - | if [ -n "${RUN_CLANG_FORMAT}" ]; then @@ -190,7 +194,6 @@ before_install: fi - | if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then - export JOBS=$((`sysctl -n hw.ncpu` + 1)) sudo mdutil -i off / fi - |