Skip to content

Commit cebead1

Browse files
carenasgitster
authored andcommitted
ci: run a pedantic build as part of the GitHub workflow
similar to the recently added sparse task, it is nice to know as early as possible. add a dockerized build using fedora (that usually has the latest gcc) to be ahead of the curve and avoid older ISO C issues at the same time. Signed-off-by: Carlo Marcelo Arenas Belón <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 581a3bb commit cebead1

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,8 @@ jobs:
324324
image: alpine
325325
- jobname: Linux32
326326
image: daald/ubuntu32:xenial
327+
- jobname: pedantic
328+
image: fedora
327329
env:
328330
jobname: ${{matrix.vector.jobname}}
329331
runs-on: ubuntu-latest

ci/install-docker-dependencies.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,8 @@ linux-musl)
1515
apk add --update build-base curl-dev openssl-dev expat-dev gettext \
1616
pcre2-dev python3 musl-libintl perl-utils ncurses >/dev/null
1717
;;
18+
pedantic)
19+
dnf -yq update >/dev/null &&
20+
dnf -yq install make gcc findutils diffutils perl python3 gettext zlib-devel expat-devel openssl-devel curl-devel pcre2-devel >/dev/null
21+
;;
1822
esac

ci/run-build-and-tests.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ windows*) cmd //c mklink //j t\\.prove "$(cygpath -aw "$cache_dir/.prove")";;
1010
*) ln -s "$cache_dir/.prove" t/.prove;;
1111
esac
1212

13+
if test "$jobname" = "pedantic"
14+
then
15+
export DEVOPTS=pedantic
16+
fi
17+
1318
make
1419
case "$jobname" in
1520
linux-gcc)
@@ -35,10 +40,9 @@ linux-clang)
3540
export GIT_TEST_DEFAULT_HASH=sha256
3641
make test
3742
;;
38-
linux-gcc-4.8)
43+
linux-gcc-4.8|pedantic)
3944
# Don't run the tests; we only care about whether Git can be
40-
# built with GCC 4.8, as it errors out on some undesired (C99)
41-
# constructs that newer compilers seem to quietly accept.
45+
# built with GCC 4.8 or with pedantic
4246
;;
4347
*)
4448
make test

0 commit comments

Comments
 (0)