Skip to content

Commit 6ab3977

Browse files
pks-tgitster
authored andcommitted
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 6a8cbc4 (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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8f5daaf commit 6ab3977

File tree

4 files changed

+17
-26
lines changed

4 files changed

+17
-26
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,8 @@ jobs:
379379
- jobname: linux-breaking-changes
380380
cc: gcc
381381
image: ubuntu:rolling
382+
- jobname: fedora-breaking-changes-meson
383+
image: fedora:latest
382384
- jobname: linux-leaks
383385
image: ubuntu:rolling
384386
cc: gcc
@@ -396,8 +398,6 @@ jobs:
396398
# Supported until 2025-04-02.
397399
- jobname: linux32
398400
image: i386/ubuntu:focal
399-
- jobname: pedantic
400-
image: fedora:latest
401401
# A RHEL 8 compatible distro. Supported until 2029-05-31.
402402
- jobname: almalinux-8
403403
image: almalinux:8

.gitlab-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ test:linux:
4545
- jobname: linux-breaking-changes
4646
image: ubuntu:20.04
4747
CC: gcc
48+
- jobname: fedora-breaking-changes-meson
49+
image: fedora:latest
4850
- jobname: linux-TEST-vars
4951
image: ubuntu:20.04
5052
CC: gcc
@@ -58,8 +60,6 @@ test:linux:
5860
- jobname: linux-asan-ubsan
5961
image: ubuntu:rolling
6062
CC: clang
61-
- jobname: pedantic
62-
image: fedora:latest
6363
- jobname: linux-musl-meson
6464
image: alpine:latest
6565
- jobname: linux32

ci/install-dependencies.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,12 @@ alpine-*)
3030
bash cvs gnupg perl-cgi perl-dbd-sqlite perl-io-tty >/dev/null
3131
;;
3232
fedora-*|almalinux-*)
33+
case "$jobname" in
34+
*-meson)
35+
MESON_DEPS="meson ninja";;
36+
esac
3337
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
3539
;;
3640
ubuntu-*|i386/ubuntu-*|debian-*)
3741
# Required so that apt doesn't wait for user input on certain packages.

ci/run-build-and-tests.sh

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@
55

66
. ${0%/*}/lib.sh
77

8-
run_tests=t
9-
108
case "$jobname" in
11-
linux-breaking-changes)
9+
fedora-breaking-changes-musl|linux-breaking-changes)
1210
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
1311
export WITH_BREAKING_CHANGES=YesPlease
12+
MESONFLAGS="$MESONFLAGS -Dbreaking_changes=true"
1413
;;
1514
linux-TEST-vars)
1615
export OPENSSL_SHA1_UNSAFE=YesPlease
@@ -36,12 +35,6 @@ linux-sha256)
3635
linux-reftable|linux-reftable-leaks|osx-reftable)
3736
export GIT_TEST_DEFAULT_REF_FORMAT=reftable
3837
;;
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-
;;
4538
esac
4639

4740
case "$jobname" in
@@ -54,21 +47,15 @@ case "$jobname" in
5447
-Dtest_output_directory="${TEST_OUTPUT_DIRECTORY:-$(pwd)/t}" \
5548
$MESONFLAGS
5649
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+
)
6454
;;
6555
*)
6656
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
7259
;;
7360
esac
7461

0 commit comments

Comments
 (0)