On Tue, Aug 10, 2021 at 06:12:41PM -0700, Junio C Hamano wrote: > > * cb/ci-build-pedantic (2021-08-09) 1 commit > - ci: run a pedantic build as part of the GitHub workflow > (this branch uses cb/many-alternate-optim-fixup.) > > CI update. > > Will merge to 'next'. this version has the bug you reported[1] and provided a fix for because the base image doesn't include git, and while the bug is harmless it is still silly enough that should be worth fixing before going to next IMHO.. I was preparing a version 2 reroll that included the tests, as you suggested, which I was also planning to make a little more useful by including other test dependencies missing from other jobs. on that line, I also forgot to build with PCRE, which was the reason why it was included as a dependency, and that has been corrected as well; alternatively it could be removed and make the job slightly faster. but if you want to have a less buggy and even faster job[2] in next meanwhile could use instead the "1.5" reroll below which will be also easier to base on for v2; alternatively it could wait, but was also tempted to include UBsan in this job, and so it would need additional fixes before it can be promoted in that case Carlo [1] https://lore.kernel.org/git/xmqqeeb1dumx.fsf@gitster.g/ [2] https://github.com/carenas/git/runs/3298216810 --- >8 --- Subject: [PATCH v1.5] 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 <carenas@xxxxxxxxx> Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx> --- Changes in v1.5 * really build with PCRE * install a smaller perl and git (used by the CI scripts) .github/workflows/main.yml | 2 ++ ci/install-docker-dependencies.sh | 6 ++++++ ci/run-build-and-tests.sh | 11 ++++++++--- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 73856bafc9..b93561978d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 diff --git a/ci/install-docker-dependencies.sh b/ci/install-docker-dependencies.sh index 26a6689766..eba4b212e4 100755 --- a/ci/install-docker-dependencies.sh +++ b/ci/install-docker-dependencies.sh @@ -15,4 +15,10 @@ 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 gcc make findutils diffutils perl-interpreter \ + gettext git zlib-devel expat-devel openssl-devel \ + curl-devel pcre2-devel >/dev/null + ;; esac diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh index 3ce81ffee9..724f9b54c8 100755 --- a/ci/run-build-and-tests.sh +++ b/ci/run-build-and-tests.sh @@ -10,6 +10,12 @@ 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 + export USE_LIBPCRE=1 +fi + make case "$jobname" in linux-gcc) @@ -35,10 +41,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 -- 2.33.0.rc1.379.g2890ef5eb6