From c2160f2d1943d0b72a18e21300f98ef008e48696 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sun, 27 Jan 2019 15:26:50 -0800 Subject: ci: rename the library of common functions The name is hard-coded to reflect that we use Travis CI for continuous testing. In the next commits, we will extend this to be able use Azure DevOps, too. So let's adjust the name to make it more generic. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- ci/run-build-and-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ci/run-build-and-tests.sh') diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh index cda170d5c2..db342bb6a8 100755 --- a/ci/run-build-and-tests.sh +++ b/ci/run-build-and-tests.sh @@ -3,7 +3,7 @@ # Build and test Git # -. ${0%/*}/lib-travisci.sh +. ${0%/*}/lib.sh ln -s "$cache_dir/.prove" t/.prove -- cgit v1.2.3 From eaa62291fff35f3b33780a1572ee6e1a265adb4c Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sun, 27 Jan 2019 15:26:52 -0800 Subject: ci: inherit --jobs via MAKEFLAGS in run-build-and-tests 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 Signed-off-by: Junio C Hamano --- ci/lib.sh | 1 + ci/run-build-and-tests.sh | 2 +- ci/run-linux32-build.sh | 2 +- ci/run-static-analysis.sh | 2 +- ci/test-documentation.sh | 4 ++-- 5 files changed, 6 insertions(+), 5 deletions(-) (limited to 'ci/run-build-and-tests.sh') diff --git a/ci/lib.sh b/ci/lib.sh index 3f286d86a6..32a28fd209 100755 --- 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 diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh index db342bb6a8..80d72d120f 100755 --- a/ci/run-build-and-tests.sh +++ b/ci/run-build-and-tests.sh @@ -7,7 +7,7 @@ ln -s "$cache_dir/.prove" t/.prove -make --jobs=2 +make make --quiet test if test "$jobname" = "linux-gcc" then diff --git a/ci/run-linux32-build.sh b/ci/run-linux32-build.sh index 2c60d2e70a..09e9276e12 100755 --- a/ci/run-linux32-build.sh +++ b/ci/run-linux32-build.sh @@ -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 ' diff --git a/ci/run-static-analysis.sh b/ci/run-static-analysis.sh index dc189c7456..a19aa7ebbc 100755 --- a/ci/run-static-analysis.sh +++ b/ci/run-static-analysis.sh @@ -5,7 +5,7 @@ . ${0%/*}/lib.sh -make --jobs=2 coccicheck +make coccicheck set +x diff --git a/ci/test-documentation.sh b/ci/test-documentation.sh index 7d0beb2832..be3b7d376a 100755 --- a/ci/test-documentation.sh +++ b/ci/test-documentation.sh @@ -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 -- cgit v1.2.3 From 4b060a4d973ddfb9c8e03585aa5a80253980ed59 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sun, 27 Jan 2019 15:26:53 -0800 Subject: ci: use a junction on Windows instead of a symlink Symbolic links are still not quite as easy to use on Windows as on Linux (for example, on versions older than Windows 10, only administrators can create symlinks, and on Windows 10 you still need to be in developer mode for regular users to have permission), but NTFS junctions can give us a way out. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- ci/run-build-and-tests.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ci/run-build-and-tests.sh') diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh index 80d72d120f..74d838ea01 100755 --- a/ci/run-build-and-tests.sh +++ b/ci/run-build-and-tests.sh @@ -5,7 +5,10 @@ . ${0%/*}/lib.sh -ln -s "$cache_dir/.prove" t/.prove +case "$CI_OS_NAME" in +windows*) cmd //c mklink //j t\\.prove "$(cygpath -aw "$cache_dir/.prove")";; +*) ln -s "$cache_dir/.prove" t/.prove;; +esac make make --quiet test -- cgit v1.2.3