Skip to content

Commit

Permalink
ci: Select number of parallel make jobs depending on CI environment
Browse files Browse the repository at this point in the history
This should improve compilation times on macOS. Things can certainly
be improved further, e.g., by running the benchmarks in parallel.
  • Loading branch information
real-or-random committed Mar 3, 2021
1 parent 28eccdf commit 9361f36
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ env:
CTIMETEST: yes
BENCH: yes
ITERS: 2
MAKEFLAGS: -j2

cat_logs_snippet: &CAT_LOGS
always:
Expand Down Expand Up @@ -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:
Expand Down
5 changes: 3 additions & 2 deletions ci/cirrus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ valgrind --version || true
--with-valgrind="$WITH_VALGRIND" \
--host="$HOST" $EXTRAFLAGS

make -j2
# We have set "-j<n>" in MAKEFLAGS.
make

# Print information about binaries so that we can see that the architecture is correct
file *tests || true
Expand All @@ -30,7 +31,7 @@ file .libs/* || true

if [ -n "$BUILD" ]
then
make -j2 "$BUILD"
make "$BUILD"
fi

if [ "$RUN_VALGRIND" = "yes" ]
Expand Down

0 comments on commit 9361f36

Please sign in to comment.