]> git.ipfire.org Git - thirdparty/git.git/commitdiff
ci: convert "pedantic" job into full build with breaking changes
authorPatrick Steinhardt <ps@pks.im>
Thu, 2 Oct 2025 07:29:33 +0000 (09:29 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 2 Oct 2025 16:32:32 +0000 (09:32 -0700)
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>
.github/workflows/main.yml
.gitlab-ci.yml
ci/install-dependencies.sh
ci/run-build-and-tests.sh

index d122e79415a13e3f8ee77cb92949c4caa57eab0b..393ea4d1ccf784ce6247c55abf8a75888b00fb46 100644 (file)
@@ -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
index af10ebb59a3ada48385fcb32a9f2afeb18387bff..4248506909959b5debeb9a85fafa47fb2831d8af 100644 (file)
@@ -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
index d061a4729339e097f868ac3bc5e01461f0ee42f7..35bd05b85b90851c82e0a5bf44c7208562f2310e 100755 (executable)
@@ -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.
index 01823fd0f140bb43fc94eedf47384fd6a125f728..3680446649e6942d28ac78656b309f1458c2059e 100755 (executable)
@@ -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