[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 11/17] .travis.yml: probe for number of available processors
From: |
Alex Bennée |
Subject: |
[PATCH v3 11/17] .travis.yml: probe for number of available processors |
Date: |
Mon, 3 Feb 2020 09:09:26 +0000 |
The arm64 hardware was especially hit by only building on 3 of the 32
available cores. Introduce a JOBS environment variable which we use
for all parallel builds. We still run the main checks single threaded
though so to make it easier to spot hangs.
Signed-off-by: Alex Bennée <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Tested-by: Philippe Mathieu-Daudé <address@hidden>
---
.travis.yml | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 1b92f40eab2..a600f508b0a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -85,6 +85,8 @@ git:
# Common first phase for all steps
before_install:
- if command -v ccache ; then ccache --zero-stats ; fi
+ - export JOBS=$(($(getconf _NPROCESSORS_ONLN) + 1))
+ - echo "=== Using ${JOBS} simultaneous jobs ==="
# Configure step - may be overridden
before_script:
@@ -93,7 +95,7 @@ before_script:
# Main build & test - rarely overridden - controlled by TEST_CMD
script:
- - BUILD_RC=0 && make -j3 || BUILD_RC=$?
+ - BUILD_RC=0 && make -j${JOBS} || BUILD_RC=$?
- if [ "$BUILD_RC" -eq 0 ] ; then travis_retry ${TEST_CMD} ; else $(exit
$BUILD_RC); fi
after_script:
- if command -v ccache ; then ccache --show-stats ; fi
@@ -125,7 +127,7 @@ matrix:
env:
- BASE_CONFIG="--enable-tools"
- CONFIG="--disable-user --disable-system"
- - TEST_CMD="make check-unit check-softfloat -j3"
+ - TEST_CMD="make check-unit check-softfloat -j${JOBS}"
- CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
@@ -160,13 +162,13 @@ matrix:
- name: "check-unit coroutine=ucontext"
env:
- CONFIG="--with-coroutine=ucontext --disable-tcg"
- - TEST_CMD="make check-unit -j3 V=1"
+ - TEST_CMD="make check-unit -j${JOBS} V=1"
- name: "check-unit coroutine=sigaltstack"
env:
- CONFIG="--with-coroutine=sigaltstack --disable-tcg"
- - TEST_CMD="make check-unit -j3 V=1"
+ - TEST_CMD="make check-unit -j${JOBS} V=1"
# Check we can build docs and tools (out of tree)
@@ -366,7 +368,7 @@ matrix:
- name: "GCC check-tcg (user)"
env:
- CONFIG="--disable-system --enable-debug-tcg"
- - TEST_CMD="make -j3 check-tcg V=1"
+ - TEST_CMD="make -j${JOBS} check-tcg V=1"
- CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg"
@@ -375,7 +377,7 @@ matrix:
- name: "GCC plugins check-tcg (user)"
env:
- CONFIG="--disable-system --enable-plugins --enable-debug-tcg
--target-list-exclude=sparc64-linux-user"
- - TEST_CMD="make -j3 check-tcg V=1"
+ - TEST_CMD="make -j${JOBS} check-tcg V=1"
- CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg"
@@ -383,7 +385,7 @@ matrix:
- name: "GCC check-tcg (some-softmmu)"
env:
- CONFIG="--enable-debug-tcg
--target-list=xtensa-softmmu,arm-softmmu,aarch64-softmmu,alpha-softmmu"
- - TEST_CMD="make -j3 check-tcg V=1"
+ - TEST_CMD="make -j${JOBS} check-tcg V=1"
- CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg"
@@ -391,7 +393,7 @@ matrix:
- name: "GCC plugins check-tcg (some-softmmu)"
env:
- CONFIG="--enable-plugins --enable-debug-tcg
--target-list=xtensa-softmmu,arm-softmmu,aarch64-softmmu,alpha-softmmu"
- - TEST_CMD="make -j3 check-tcg V=1"
+ - TEST_CMD="make -j${JOBS} check-tcg V=1"
- CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg"
- name: "[aarch64] GCC check-tcg"
@@ -500,7 +502,7 @@ matrix:
- BUILD_DIR="release/build/dir" SRC_DIR="../../.."
- BASE_CONFIG="--prefix=$PWD/dist"
-
CONFIG="--target-list=x86_64-softmmu,aarch64-softmmu,armeb-linux-user,ppc-linux-user"
- - TEST_CMD="make install -j3"
+ - TEST_CMD="make install -j${JOBS}"
- QEMU_VERSION="${TRAVIS_TAG:1}"
- CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
script:
--
2.20.1
- [PATCH v3 04/17] travis.yml: Install genisoimage package, (continued)
- [PATCH v3 04/17] travis.yml: Install genisoimage package, Alex Bennée, 2020/02/03
- [PATCH v3 05/17] .shippable: --disable-docs for cross-compile tests, Alex Bennée, 2020/02/03
- [PATCH v3 06/17] hw/hppa/Kconfig: LASI chipset requires PARALLEL port, Alex Bennée, 2020/02/03
- [PATCH v3 07/17] .travis.yml: Drop superfluous use of --python=python3 parameter, Alex Bennée, 2020/02/03
- [PATCH v3 09/17] .travis.yml: build documents under bionic, Alex Bennée, 2020/02/03
- [PATCH v3 10/17] .travis.yml: move cache flushing to early common phase, Alex Bennée, 2020/02/03
- [PATCH v3 08/17] .travis.yml: Add description to each job, Alex Bennée, 2020/02/03
- [PATCH v3 12/17] tests/tcg: add a configure compiler check for ARMv8.1 and SVE, Alex Bennée, 2020/02/03
- [PATCH v3 14/17] .travis.yml: introduce TEST_BUILD_CMD and use it for check-tcg, Alex Bennée, 2020/02/03
- [PATCH v3 11/17] .travis.yml: probe for number of available processors,
Alex Bennée <=
- [PATCH v3 13/17] tests/tcg: gate pauth-% tests on having compiler support, Alex Bennée, 2020/02/03
- [PATCH v3 16/17] .travis.yml: drop cris-linux-user from the plugins test, Alex Bennée, 2020/02/03
- [PATCH v3 15/17] .travis.yml: drop the travis_retry from tests, Alex Bennée, 2020/02/03
- [PATCH v3 17/17] .travis.yml: single thread build-tcg, Alex Bennée, 2020/02/03