From 6be147970f142428ba60a3c4180ab8ee43d1459f Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 14 Apr 2021 20:33:39 +0200 Subject: [PATCH] ci: also run the `scalar` tests Since Scalar depends on `libgit.a`, it makes sense to ensure in the CI and the PR builds that it does not get broken in case of industrious refactorings of the core Git code (speaking from experience here). Signed-off-by: Johannes Schindelin --- .github/workflows/main.yml | 15 +++++++++++++++ ci/run-build-and-tests.sh | 2 ++ ci/run-test-slice.sh | 8 ++++++-- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 92063286fffbaf..7dc5373ec5736c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -91,6 +91,13 @@ jobs: HOME: ${{runner.workspace}} NO_PERL: 1 run: . /etc/profile && ci/make-test-artifacts.sh artifacts + - name: build Scalar + shell: bash + run: | + make -C contrib/scalar && + mkdir -p artifacts/bin-wrappers artifacts/contrib/scalar && + cp contrib/scalar/scalar.exe artifacts/contrib/scalar/ && + cp bin-wrappers/scalar artifacts/bin-wrappers/ - name: zip up tracked files run: git archive -o artifacts/tracked.tar.gz HEAD - name: upload tracked files and build artifacts @@ -160,6 +167,8 @@ jobs: run: compat\vcbuild\vcpkg_copy_dlls.bat release ${{ matrix.arch }}-windows - name: generate Visual Studio solution shell: bash + env: + INCLUDE_SCALAR: YesPlease run: | cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/${{ matrix.arch }}-windows \ -DNO_GETTEXT=YesPlease -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON -DCMAKE_GENERATOR_PLATFORM=${{ matrix.arch }} -DVCPKG_ARCH=${{ matrix.arch }}-windows -DHOST_CPU=${{ matrix.arch }} @@ -173,6 +182,12 @@ jobs: run: | mkdir -p artifacts && eval "$(make -n artifacts-tar INCLUDE_DLLS_IN_ARTIFACTS=YesPlease ARTIFACTS_DIRECTORY=artifacts NO_GETTEXT=YesPlease 2>&1 | grep ^tar)" + - name: copy Scalar + shell: bash + run: | + mkdir -p artifacts/bin-wrappers artifacts/contrib/scalar && + cp contrib/scalar/scalar.exe artifacts/contrib/scalar/ && + cp bin-wrappers/scalar artifacts/bin-wrappers/ - name: zip up tracked files run: git archive -o artifacts/tracked.tar.gz HEAD - name: upload tracked files and build artifacts diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh index f3195eb265f37b..7dd7c74e4734c1 100755 --- a/ci/run-build-and-tests.sh +++ b/ci/run-build-and-tests.sh @@ -52,4 +52,6 @@ case " $MAKE_TARGETS " in *" all "*) make -C contrib/subtree test;; esac +make -C contrib/scalar $MAKE_TARGETS + save_good_tree diff --git a/ci/run-test-slice.sh b/ci/run-test-slice.sh index 279aff4da9e4db..b9167d9803d932 100755 --- a/ci/run-test-slice.sh +++ b/ci/run-test-slice.sh @@ -10,7 +10,11 @@ group "Run tests" make --quiet -C t T="$(cd t && tr '\n' ' ')" || handle_failed_tests -# Run the git subtree tests only if main tests succeeded -test 0 != "$1" || make -C contrib/subtree test +if test 0 = "$1" +then + # Run the git subtree & scalar tests only if main tests succeeded + make -C contrib/subtree test && + make -C contrib/scalar test +fi check_unignored_build_artifacts