From 9361f360bb04156c7a0fa8f2664680b74d463ed5 Mon Sep 17 00:00:00 2001 From: Tim Ruffing Date: Wed, 3 Mar 2021 01:21:18 +0100 Subject: [PATCH] ci: Select number of parallel make jobs depending on CI environment This should improve compilation times on macOS. Things can certainly be improved further, e.g., by running the benchmarks in parallel. --- .cirrus.yml | 3 +++ ci/cirrus.sh | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 646518b7840ad..9399fbda47e2f 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -16,6 +16,7 @@ env: CTIMETEST: yes BENCH: yes ITERS: 2 + MAKEFLAGS: -j2 cat_logs_snippet: &CAT_LOGS always: @@ -131,6 +132,8 @@ task: env: HOMEBREW_NO_AUTO_UPDATE: 1 HOMEBREW_NO_INSTALL_CLEANUP: 1 + # Cirrus gives us a fixed number of 12 virtual CPUs. Not that we even have that many jobs at the moment... + MAKEFLAGS: -j13 matrix: << : *ENV_MATRIX matrix: diff --git a/ci/cirrus.sh b/ci/cirrus.sh index 2175a04e0dbf1..f223a91ca0a5b 100755 --- a/ci/cirrus.sh +++ b/ci/cirrus.sh @@ -21,7 +21,8 @@ valgrind --version || true --with-valgrind="$WITH_VALGRIND" \ --host="$HOST" $EXTRAFLAGS -make -j2 +# We have set "-j" in MAKEFLAGS. +make # Print information about binaries so that we can see that the architecture is correct file *tests || true @@ -30,7 +31,7 @@ file .libs/* || true if [ -n "$BUILD" ] then - make -j2 "$BUILD" + make "$BUILD" fi if [ "$RUN_VALGRIND" = "yes" ]