aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-10-02 09:29:33 +0200
committerJunio C Hamano <gitster@pobox.com>2025-10-02 09:32:32 -0700
commit6ab3977200fc6f69c1a01c0dbefabbbed6b45fb0 (patch)
tree13c96c01413412b4e10d2108af7f7aaad6e94609
parentBreakingChanges: announce Rust becoming mandatory (diff)
downloadgit-6ab3977200fc6f69c1a01c0dbefabbbed6b45fb0.tar.gz
git-6ab3977200fc6f69c1a01c0dbefabbbed6b45fb0.zip
ci: convert "pedantic" job into full build with breaking changes
The "pedantic" CI job is building on Fedora with `DEVOPTS=pedantic`. This build flag doesn't do anything anymore starting with 6a8cbc41ba (developer: enable pedantic by default, 2021-09-03), where we have flipped the default so that developers have to opt-out of pedantic builds via the "no-pedantic" option. As such, all this job really does is to do a normal build on Fedora, which isn't all that interesting. Convert that job into a full build-and-test job that uses Meson with breaking changes enabled. This plugs two gaps: - We now test on another distro that we didn't run tests on beforehand. - We verify that breaking changes work as expected with Meson. Furthermore, in a subsequent commit we'll modify both jobs that use breaking changes to also enable Rust. By converting the Fedora job to use Meson, we ensure that we test our Rust build infrastructure for both build systems. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--.github/workflows/main.yml4
-rw-r--r--.gitlab-ci.yml4
-rwxr-xr-xci/install-dependencies.sh6
-rwxr-xr-xci/run-build-and-tests.sh29
4 files changed, 17 insertions, 26 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index d122e79415..393ea4d1cc 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -379,6 +379,8 @@ jobs:
- jobname: linux-breaking-changes
cc: gcc
image: ubuntu:rolling
+ - jobname: fedora-breaking-changes-meson
+ image: fedora:latest
- jobname: linux-leaks
image: ubuntu:rolling
cc: gcc
@@ -396,8 +398,6 @@ jobs:
# Supported until 2025-04-02.
- jobname: linux32
image: i386/ubuntu:focal
- - jobname: pedantic
- image: fedora:latest
# A RHEL 8 compatible distro. Supported until 2029-05-31.
- jobname: almalinux-8
image: almalinux:8
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index af10ebb59a..4248506909 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -45,6 +45,8 @@ test:linux:
- jobname: linux-breaking-changes
image: ubuntu:20.04
CC: gcc
+ - jobname: fedora-breaking-changes-meson
+ image: fedora:latest
- jobname: linux-TEST-vars
image: ubuntu:20.04
CC: gcc
@@ -58,8 +60,6 @@ test:linux:
- jobname: linux-asan-ubsan
image: ubuntu:rolling
CC: clang
- - jobname: pedantic
- image: fedora:latest
- jobname: linux-musl-meson
image: alpine:latest
- jobname: linux32
diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
index d061a47293..35bd05b85b 100755
--- a/ci/install-dependencies.sh
+++ b/ci/install-dependencies.sh
@@ -30,8 +30,12 @@ alpine-*)
bash cvs gnupg perl-cgi perl-dbd-sqlite perl-io-tty >/dev/null
;;
fedora-*|almalinux-*)
+ case "$jobname" in
+ *-meson)
+ MESON_DEPS="meson ninja";;
+ esac
dnf -yq update >/dev/null &&
- dnf -yq install shadow-utils sudo make gcc findutils diffutils perl python3 gawk gettext zlib-devel expat-devel openssl-devel curl-devel pcre2-devel >/dev/null
+ dnf -yq install shadow-utils sudo make pkg-config gcc findutils diffutils perl python3 gawk gettext zlib-devel expat-devel openssl-devel curl-devel pcre2-devel $MESON_DEPS >/dev/null
;;
ubuntu-*|i386/ubuntu-*|debian-*)
# Required so that apt doesn't wait for user input on certain packages.
diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh
index 01823fd0f1..3680446649 100755
--- a/ci/run-build-and-tests.sh
+++ b/ci/run-build-and-tests.sh
@@ -5,12 +5,11 @@
. ${0%/*}/lib.sh
-run_tests=t
-
case "$jobname" in
-linux-breaking-changes)
+fedora-breaking-changes-musl|linux-breaking-changes)
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export WITH_BREAKING_CHANGES=YesPlease
+ MESONFLAGS="$MESONFLAGS -Dbreaking_changes=true"
;;
linux-TEST-vars)
export OPENSSL_SHA1_UNSAFE=YesPlease
@@ -36,12 +35,6 @@ linux-sha256)
linux-reftable|linux-reftable-leaks|osx-reftable)
export GIT_TEST_DEFAULT_REF_FORMAT=reftable
;;
-pedantic)
- # Don't run the tests; we only care about whether Git can be
- # built.
- export DEVOPTS=pedantic
- run_tests=
- ;;
esac
case "$jobname" in
@@ -54,21 +47,15 @@ case "$jobname" in
-Dtest_output_directory="${TEST_OUTPUT_DIRECTORY:-$(pwd)/t}" \
$MESONFLAGS
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 "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
+ )
;;
*)
group Build make
- if test -n "$run_tests"
- then
- group "Run tests" make test ||
- handle_failed_tests
- fi
+ group "Run tests" make test ||
+ handle_failed_tests
;;
esac