ci: inherit --jobs via MAKEFLAGS in run-build-and-tests
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Sun, 27 Jan 2019 23:26:52 +0000 (15:26 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 28 Jan 2019 18:34:28 +0000 (10:34 -0800)
Let's not decide in the generic ci/ part how many jobs to run in
parallel; different CI configurations would favor a different number of
parallel jobs, and it is easy enough to hand that information down via
the `MAKEFLAGS` variable.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
ci/lib.sh
ci/run-build-and-tests.sh
ci/run-linux32-build.sh
ci/run-static-analysis.sh
ci/test-documentation.sh
index 3f286d86a63eeb32c5590e3426e25e430d68b165..32a28fd209bb184b173b47d365380d935ef2fef8 100755 (executable)
--- a/ci/lib.sh
+++ b/ci/lib.sh
@@ -101,6 +101,7 @@ then
        BREW_INSTALL_PACKAGES="git-lfs gettext"
        export GIT_PROVE_OPTS="--timer --jobs 3 --state=failed,slow,save"
        export GIT_TEST_OPTS="--verbose-log -x --immediate"
+       export MAKEFLAGS="--jobs=2"
 else
        echo "Could not identify CI type" >&2
        exit 1
index db342bb6a82bc91766a8cbf0782d412288233ee5..80d72d120f6fa9131859ce4433562fb4ab91ef35 100755 (executable)
@@ -7,7 +7,7 @@
 
 ln -s "$cache_dir/.prove" t/.prove
 
-make --jobs=2
+make
 make --quiet test
 if test "$jobname" = "linux-gcc"
 then
index 2c60d2e70ae56b59b1ff8046a21b9bc4bf87e3e6..09e9276e1276e089fdde09da4cb89f15404be416 100755 (executable)
@@ -55,6 +55,6 @@ linux32 --32bit i386 su -m -l $CI_USER -c '
        set -ex
        cd /usr/src/git
        test -n "$cache_dir" && ln -s "$cache_dir/.prove" t/.prove
-       make --jobs=2
+       make
        make --quiet test
 '
index dc189c7456b3b02585e4d89cde4bd314d194bc90..a19aa7ebbc0931fa56acfccdcc0d8bc1ad94ea2c 100755 (executable)
@@ -5,7 +5,7 @@
 
 . ${0%/*}/lib.sh
 
-make --jobs=2 coccicheck
+make coccicheck
 
 set +x
 
index 7d0beb28327633505e0f52bde88c8430bacd9673..be3b7d376ac47391be71a3822a320e327f7a3a2d 100755 (executable)
@@ -12,7 +12,7 @@ make check-builtins
 make check-docs
 
 # Build docs with AsciiDoc
-make --jobs=2 doc > >(tee stdout.log) 2> >(tee stderr.log >&2)
+make doc > >(tee stdout.log) 2> >(tee stderr.log >&2)
 ! test -s stderr.log
 test -s Documentation/git.html
 test -s Documentation/git.xml
@@ -24,7 +24,7 @@ check_unignored_build_artifacts
 
 # Build docs with AsciiDoctor
 make clean
-make --jobs=2 USE_ASCIIDOCTOR=1 doc > >(tee stdout.log) 2> >(tee stderr.log >&2)
+make USE_ASCIIDOCTOR=1 doc > >(tee stdout.log) 2> >(tee stderr.log >&2)
 sed '/^GIT_VERSION = / d' stderr.log
 ! test -s stderr.log
 test -s Documentation/git.html