summaryrefslogtreecommitdiffstats
path: root/ci/run-build-and-tests.sh
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-12-13 11:41:23 +0100
committerJunio C Hamano <gitster@pobox.com>2024-12-13 15:48:47 +0100
commiteab5dbab92fa60298aa4a1952fcbc6cae824d939 (patch)
treed16c18dd63a433d5b8dcf378ed617331d8cf44df /ci/run-build-and-tests.sh
parentt: introduce compatibility options to clar-based tests (diff)
downloadgit-eab5dbab92fa60298aa4a1952fcbc6cae824d939.tar.xz
git-eab5dbab92fa60298aa4a1952fcbc6cae824d939.zip
ci: wire up Meson builds
Wire up CI builds for both GitLab and GitHub that use the Meson build system. While the setup is mostly trivial, one gotcha is the test output directory used to be in "t/", but now it is contained in the build directory. To unify the logic across Makefile- and Meson-based builds we explicitly set up the `TEST_OUTPUT_DIRECTORY` variable so that it is the same for both build systems. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'ci/run-build-and-tests.sh')
-rwxr-xr-xci/run-build-and-tests.sh31
1 files changed, 24 insertions, 7 deletions
diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh
index 2e28d02b20..c4a41bba0b 100755
--- a/ci/run-build-and-tests.sh
+++ b/ci/run-build-and-tests.sh
@@ -48,12 +48,29 @@ pedantic)
;;
esac
-group Build make
-if test -n "$run_tests"
-then
- group "Run tests" make test ||
- handle_failed_tests
-fi
-check_unignored_build_artifacts
+case "$jobname" in
+*-meson)
+ group "Configure" meson setup build . \
+ --warnlevel 2 --werror \
+ --wrap-mode nofallback
+ group "Build" meson compile -C build --
+ if test -n "$run_tests"
+ then
+ group "Run tests" meson test -C build --print-errorlogs --test-args="$GIT_TEST_OPTS" || (
+ ./t/aggregate-results.sh "${TEST_OUTPUT_DIRECTORY:-t}/test-results"
+ handle_failed_tests
+ )
+ fi
+ ;;
+*)
+ group Build make
+ if test -n "$run_tests"
+ then
+ group "Run tests" make test ||
+ handle_failed_tests
+ fi
+ ;;
+esac
+check_unignored_build_artifacts
save_good_tree