]> git.ipfire.org Git - thirdparty/git.git/commitdiff
ci: run a pedantic build as part of the GitHub workflow
authorCarlo Marcelo Arenas Belón <carenas@gmail.com>
Mon, 9 Aug 2021 01:38:33 +0000 (18:38 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 11 Aug 2021 18:25:06 +0000 (11:25 -0700)
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 <carenas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
.github/workflows/main.yml
ci/install-docker-dependencies.sh
ci/run-build-and-tests.sh

index 73856bafc9debd7cfed82419706a4b023c69651b..b93561978d3f4dfef648de660664f64bbbc2e1cd 100644 (file)
@@ -324,6 +324,8 @@ jobs:
           image: alpine
         - jobname: Linux32
           image: daald/ubuntu32:xenial
+        - jobname: pedantic
+          image: fedora
     env:
       jobname: ${{matrix.vector.jobname}}
     runs-on: ubuntu-latest
index 26a6689766d7f17b3d38e01de2937838430a5770..07a8c6b199d39cc1df0e1a2bd739c49820741fd0 100755 (executable)
@@ -15,4 +15,8 @@ linux-musl)
        apk add --update build-base curl-dev openssl-dev expat-dev gettext \
                pcre2-dev python3 musl-libintl perl-utils ncurses >/dev/null
        ;;
+pedantic)
+       dnf -yq update >/dev/null &&
+       dnf -yq install make gcc findutils diffutils perl python3 gettext zlib-devel expat-devel openssl-devel curl-devel pcre2-devel >/dev/null
+       ;;
 esac
index 3ce81ffee941b2efb2d129d6b6df15e779894958..f3aba5d6cbb9311749b05b487d316754f226a018 100755 (executable)
@@ -10,6 +10,11 @@ windows*) cmd //c mklink //j t\\.prove "$(cygpath -aw "$cache_dir/.prove")";;
 *) ln -s "$cache_dir/.prove" t/.prove;;
 esac
 
+if test "$jobname" = "pedantic"
+then
+       export DEVOPTS=pedantic
+fi
+
 make
 case "$jobname" in
 linux-gcc)
@@ -35,10 +40,9 @@ linux-clang)
        export GIT_TEST_DEFAULT_HASH=sha256
        make test
        ;;
-linux-gcc-4.8)
+linux-gcc-4.8|pedantic)
        # Don't run the tests; we only care about whether Git can be
-       # built with GCC 4.8, as it errors out on some undesired (C99)
-       # constructs that newer compilers seem to quietly accept.
+       # built with GCC 4.8 or with pedantic
        ;;
 *)
        make test