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>

Patrick Steinhardt committed Oct 2, 2025 at 09:29 UTC 6ab3977200fc6f69c1a01c0dbefabbbed6b45fb0
4 files changed +17 -26
.github/workflows/main.yml
+2 -2
@@ -379,6 +379,8 @@ jobs:
379 - jobname: linux-breaking-changes
380 cc: gcc
381 image: ubuntu:rolling
382 + - jobname: fedora-breaking-changes-meson
383 + image: fedora:latest
384 - jobname: linux-leaks
385 image: ubuntu:rolling
386 cc: gcc
@@ -396,8 +398,6 @@ jobs:
398 # Supported until 2025-04-02.
399 - jobname: linux32
400 image: i386/ubuntu:focal
399 - - jobname: pedantic
400 - image: fedora:latest
401 # A RHEL 8 compatible distro. Supported until 2029-05-31.
402 - jobname: almalinux-8
403 image: almalinux:8
.gitlab-ci.yml
+2 -2
@@ -45,6 +45,8 @@ test:linux:
45 - jobname: linux-breaking-changes
46 image: ubuntu:20.04
47 CC: gcc
48 + - jobname: fedora-breaking-changes-meson
49 + image: fedora:latest
50 - jobname: linux-TEST-vars
51 image: ubuntu:20.04
52 CC: gcc
@@ -58,8 +60,6 @@ test:linux:
60 - jobname: linux-asan-ubsan
61 image: ubuntu:rolling
62 CC: clang
61 - - jobname: pedantic
62 - image: fedora:latest
63 - jobname: linux-musl-meson
64 image: alpine:latest
65 - jobname: linux32
ci/install-dependencies.sh
+5 -1
@@ -30,8 +30,12 @@ alpine-*)
30 bash cvs gnupg perl-cgi perl-dbd-sqlite perl-io-tty >/dev/null
31 ;;
32 fedora-*|almalinux-*)
33 + case "$jobname" in
34 + *-meson)
35 + MESON_DEPS="meson ninja";;
36 + esac
37 dnf -yq update >/dev/null &&
34 - 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
38 + 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
39 ;;
40 ubuntu-*|i386/ubuntu-*|debian-*)
41 # Required so that apt doesn't wait for user input on certain packages.
ci/run-build-and-tests.sh
+8 -21
@@ -5,12 +5,11 @@
5
6 . ${0%/*}/lib.sh
7
8 -run_tests=t
9 -
8 case "$jobname" in
11 -linux-breaking-changes)
9 +fedora-breaking-changes-musl|linux-breaking-changes)
10 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
11 export WITH_BREAKING_CHANGES=YesPlease
12 + MESONFLAGS="$MESONFLAGS -Dbreaking_changes=true"
13 ;;
14 linux-TEST-vars)
15 export OPENSSL_SHA1_UNSAFE=YesPlease
@@ -36,12 +35,6 @@ linux-sha256)
35 linux-reftable|linux-reftable-leaks|osx-reftable)
36 export GIT_TEST_DEFAULT_REF_FORMAT=reftable
37 ;;
39 -pedantic)
40 - # Don't run the tests; we only care about whether Git can be
41 - # built.
42 - export DEVOPTS=pedantic
43 - run_tests=
44 - ;;
38 esac
39
40 case "$jobname" in
@@ -54,21 +47,15 @@ case "$jobname" in
47 -Dtest_output_directory="${TEST_OUTPUT_DIRECTORY:-$(pwd)/t}" \
48 $MESONFLAGS
49 group "Build" meson compile -C build --
57 - if test -n "$run_tests"
58 - then
59 - group "Run tests" meson test -C build --print-errorlogs --test-args="$GIT_TEST_OPTS" || (
60 - ./t/aggregate-results.sh "${TEST_OUTPUT_DIRECTORY:-t}/test-results"
61 - handle_failed_tests
62 - )
63 - fi
50 + group "Run tests" meson test -C build --print-errorlogs --test-args="$GIT_TEST_OPTS" || (
51 + ./t/aggregate-results.sh "${TEST_OUTPUT_DIRECTORY:-t}/test-results"
52 + handle_failed_tests
53 + )
54 ;;
55 *)
56 group Build make
67 - if test -n "$run_tests"
68 - then
69 - group "Run tests" make test ||
70 - handle_failed_tests
71 - fi
57 + group "Run tests" make test ||
58 + handle_failed_tests
59 ;;
60 esac
61