git/ci
SZEDER Gábor 176441bfb5 ci: build Git with GCC 9 in the 'osx-gcc' build job
Our 'osx-gcc' build job on Travis CI relied on GCC 8 being installed
(but not linked) in the image we use [1].  Alas, since the last update
of this image a few days ago this is not the case anymore, and now it
contains GCC 9 (installed and linked) instead of GCC 8.  The results
are failed 'osx-gcc' jobs, because they can't find the 'gcc-8' command
[2].

Let's move on to use GCC 9, with hopefully better error reporting and
improved -Wfoo flags and what not.  On Travis CI this has the benefit
that we can spare a few seconds while installing dependencies, because
it already comes pre-installed, at least for now.  The Azure Pipelines
OSX image doesn't include GCC, so we have to install it ourselves
anyway, and then we might as well install the newer version.

In a vain attempt I tried to future-proof this a bit:

  - Install 'gcc@9' specifically, so we'll still get what we want even
    after GCC 10 comes out, and the "plain" 'gcc' package starts to
    refer to 'gcc@10'.

  - Run both 'brew install gcc@9' and 'brew link gcc@9'.  If 'gcc@9'
    is already installed and linked, then both commands are noop and
    exit with success.  But as we saw in the past, sometimes the image
    contains the expected GCC package installed but not linked, so
    maybe it will happen again in the future as well.  In that case
    'brew install' is still a noop, and instructs the user to run
    'brew link' instead, so that's what we'll do.  And if 'gcc@9' is
    not installed, then 'brew install' will install it, and the
    subsequent 'brew link' becomes a noop.

An additional benefit of this patch is that from now on we won't
unnecessarily install GCC and its dependencies in the 'osx-clang' jobs
on Azure Pipelines.

[1] 7d4733c501 (ci: fix GCC install in the Travis CI GCC OSX job,
    2019-10-24)
[2] https://travis-ci.org/git/git/jobs/615442297#L333

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-11-29 13:18:48 -08:00
..
util travis-ci: include the trash directories of failed tests in the trace log 2018-08-01 09:59:36 -07:00
install-dependencies.sh ci: build Git with GCC 9 in the 'osx-gcc' build job 2019-11-29 13:18:48 -08:00
lib.sh ci: build Git with GCC 9 in the 'osx-gcc' build job 2019-11-29 13:18:48 -08:00
make-test-artifacts.sh ci: parallelize testing on Windows 2019-01-29 09:26:47 -08:00
mount-fileshare.sh Add a build definition for Azure DevOps 2019-01-29 09:26:46 -08:00
print-test-failures.sh ci/lib.sh: add support for Azure Pipelines 2019-01-29 09:26:46 -08:00
run-build-and-tests.sh travis-ci: build with GCC 4.8 as well 2019-07-19 14:06:01 -07:00
run-linux32-build.sh Merge branch 'js/vsts-ci' 2019-02-06 22:05:26 -08:00
run-linux32-docker.sh ci: rename the library of common functions 2019-01-28 10:34:28 -08:00
run-static-analysis.sh ci: inherit --jobs via MAKEFLAGS in run-build-and-tests 2019-01-28 10:34:28 -08:00
run-test-slice.sh ci: parallelize testing on Windows 2019-01-29 09:26:47 -08:00
test-documentation.sh ci: fix AsciiDoc/Asciidoctor stderr check in the documentation build job 2019-04-05 14:41:16 +09:00