From d62db57427f60da57f936cbe049ee27b10c3f8d4 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Wed, 16 Aug 2023 14:39:58 +0100 Subject: [PATCH] ci: Use Homebrew's gcc in native macOS task Co-authored-by: Tim Ruffing --- .cirrus.yml | 1 + ci/cirrus.sh | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index 57280fdfe2728..7deecdac49828 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -139,6 +139,7 @@ task: - env: {BUILD: distcheck} brew_script: - brew install automake libtool gcc + - ln -s /opt/homebrew/bin/gcc-?? /opt/homebrew/bin/gcc test_script: - ./ci/cirrus.sh << : *CAT_LOGS diff --git a/ci/cirrus.sh b/ci/cirrus.sh index fe54b5ea883c4..66119edf15fe3 100755 --- a/ci/cirrus.sh +++ b/ci/cirrus.sh @@ -43,6 +43,13 @@ esac env >> test_env.log +# If gcc is requested, assert that it's in fact gcc (and not some symlinked Apple clang). +case "${CC:-undefined}" in + *gcc*) + $CC -v 2>&1 | grep -q "gcc version" || exit 1; + ;; +esac + if [ -n "${CC+x}" ]; then # The MSVC compiler "cl" doesn't understand "-v" $CC -v || true