[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 12/21] travis: build using all available cores
From: |
Philippe Mathieu-Daudé |
Subject: |
[Qemu-devel] [PATCH v2 12/21] travis: build using all available cores |
Date: |
Thu, 22 Jun 2017 00:32:22 -0300 |
Few improvement as of today, but if Travis release their limit on the opensource
plan or upgrade their hardware, new builds will get some benefit.
Restrict to as most 4 cores to respect Travis Open Source plan.
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
.travis.yml | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 777914f759..a7512f3ab0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -62,7 +62,14 @@ notifications:
on_failure: always
env:
global:
- - TEST_CMD="make check"
+ # jobs
+ # detects cores on the hosting hardware, rather than the VM
(https://docs.travis-ci.com/user/languages/c#hints)
+ - VM_CORES="4" HW_CORES="$(getconf _NPROCESSORS_ONLN)"
+ # be kind with Travis free plan, restrict to at most 4 cores
+ - PARALLEL_JOBS="$(($(test ${HW_CORES} -gt ${VM_CORES} && echo ${VM_CORES}
|| echo ${HW_CORES}) + 1))"
+ - HOMEBREW_MAKE_JOBS="${PARALLEL_JOBS}"
+ # tests
+ - TEST_CMD="make -j${PARALLEL_JOBS} check"
matrix:
- CONFIG=""
- CONFIG="--enable-debug --enable-debug-tcg --enable-trace-backends=log"
@@ -78,9 +85,11 @@ before_install:
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install libffi gettext glib
pixman ; fi
- git submodule update --init --recursive
before_script:
+ - echo "Using ${PARALLEL_JOBS} parallel jobs"
- ./configure ${CONFIG}
script:
- - make -j3 && ${TEST_CMD}
+ - make -j${PARALLEL_JOBS}
+ - ${TEST_CMD}
matrix:
include:
# Test with CLang for compile portability
@@ -234,7 +243,7 @@ matrix:
group: edge
env:
- COVERITY=1
- - COVERITY_BUILD_CMD="make -j3"
+ - COVERITY_BUILD_CMD="make -j${PARALLEL_JOBS}"
- address@hidden
# This 'secure' setting sets COVERITY_TOKEN=<secret token>
# and was created with travis encrypt -r qemu/qemu COVERITY_TOKEN=...
--
2.11.0
- Re: [Qemu-devel] [PATCH v2 07/21] travis: update sudo-enabled Trusty images, (continued)
- [Qemu-devel] [PATCH v2 06/21] travis: Add config to do a Coverity Scan upload, Philippe Mathieu-Daudé, 2017/06/21
- [Qemu-devel] [PATCH v2 08/21] travis: use gcc-6 sanitizers, Philippe Mathieu-Daudé, 2017/06/21
- [Qemu-devel] [PATCH v2 09/21] travis: enable multiple caching features, Philippe Mathieu-Daudé, 2017/06/21
- [Qemu-devel] [PATCH v2 10/21] travis: increase S3 cache timeout, Philippe Mathieu-Daudé, 2017/06/21
- [Qemu-devel] [PATCH v2 12/21] travis: build using all available cores,
Philippe Mathieu-Daudé <=
- [Qemu-devel] [PATCH v2 13/21] travis: improve ccache use, Philippe Mathieu-Daudé, 2017/06/21
- [Qemu-devel] [PATCH v2 11/21] travis: cache git submodules, Philippe Mathieu-Daudé, 2017/06/21
- [Qemu-devel] [PATCH v2 14/21] travis: dump config.log if ./configure script fails, Philippe Mathieu-Daudé, 2017/06/21