Skip to content

Commit

Permalink
ci: inherit --jobs via MAKEFLAGS in run-build-and-tests
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
dscho authored and gitster committed Jan 28, 2019
1 parent b011fab commit eaa6229
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions ci/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ci/run-build-and-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

ln -s "$cache_dir/.prove" t/.prove

make --jobs=2
make
make --quiet test
if test "$jobname" = "linux-gcc"
then
Expand Down
2 changes: 1 addition & 1 deletion ci/run-linux32-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
'
2 changes: 1 addition & 1 deletion ci/run-static-analysis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

. ${0%/*}/lib.sh

make --jobs=2 coccicheck
make coccicheck

set +x

Expand Down
4 changes: 2 additions & 2 deletions ci/test-documentation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit eaa6229

Please sign in to comment.