Git fork

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>

authored by

Patrick Steinhardt and committed by
Junio C Hamano
6ab39772 8f5daaff

+17 -26
+2 -2
.github/workflows/main.yml
··· 379 379 - jobname: linux-breaking-changes 380 380 cc: gcc 381 381 image: ubuntu:rolling 382 + - jobname: fedora-breaking-changes-meson 383 + image: fedora:latest 382 384 - jobname: linux-leaks 383 385 image: ubuntu:rolling 384 386 cc: gcc ··· 396 398 # Supported until 2025-04-02. 397 399 - jobname: linux32 398 400 image: i386/ubuntu:focal 399 - - jobname: pedantic 400 - image: fedora:latest 401 401 # A RHEL 8 compatible distro. Supported until 2029-05-31. 402 402 - jobname: almalinux-8 403 403 image: almalinux:8
+2 -2
.gitlab-ci.yml
··· 45 45 - jobname: linux-breaking-changes 46 46 image: ubuntu:20.04 47 47 CC: gcc 48 + - jobname: fedora-breaking-changes-meson 49 + image: fedora:latest 48 50 - jobname: linux-TEST-vars 49 51 image: ubuntu:20.04 50 52 CC: gcc ··· 58 60 - jobname: linux-asan-ubsan 59 61 image: ubuntu:rolling 60 62 CC: clang 61 - - jobname: pedantic 62 - image: fedora:latest 63 63 - jobname: linux-musl-meson 64 64 image: alpine:latest 65 65 - jobname: linux32
+5 -1
ci/install-dependencies.sh
··· 30 30 bash cvs gnupg perl-cgi perl-dbd-sqlite perl-io-tty >/dev/null 31 31 ;; 32 32 fedora-*|almalinux-*) 33 + case "$jobname" in 34 + *-meson) 35 + MESON_DEPS="meson ninja";; 36 + esac 33 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 35 39 ;; 36 40 ubuntu-*|i386/ubuntu-*|debian-*) 37 41 # Required so that apt doesn't wait for user input on certain packages.
+8 -21
ci/run-build-and-tests.sh
··· 5 5 6 6 . ${0%/*}/lib.sh 7 7 8 - run_tests=t 9 - 10 8 case "$jobname" in 11 - linux-breaking-changes) 9 + fedora-breaking-changes-musl|linux-breaking-changes) 12 10 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 13 11 export WITH_BREAKING_CHANGES=YesPlease 12 + MESONFLAGS="$MESONFLAGS -Dbreaking_changes=true" 14 13 ;; 15 14 linux-TEST-vars) 16 15 export OPENSSL_SHA1_UNSAFE=YesPlease ··· 36 35 linux-reftable|linux-reftable-leaks|osx-reftable) 37 36 export GIT_TEST_DEFAULT_REF_FORMAT=reftable 38 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 - ;; 45 38 esac 46 39 47 40 case "$jobname" in ··· 54 47 -Dtest_output_directory="${TEST_OUTPUT_DIRECTORY:-$(pwd)/t}" \ 55 48 $MESONFLAGS 56 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 + ) 64 54 ;; 65 55 *) 66 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 72 59 ;; 73 60 esac 74 61