From 7107ab82e3d5d75b8cd5ac9d81aa07efffaa5e39 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 1 Nov 2023 14:36:04 +0100 Subject: [PATCH] ci: upgrade to using macos-13 It is only a matter of time until the `macos-12` pool is going away, and we may even get a performance boost by switching over to `macos-13`. Since the `macos-13` runners no longer include Python2, we also drop specifically testing with Python2 and switch uniformly to Python3, see https://github.com/actions/runner-images/blob/HEAD/images/macos/macos-13-Readme.md Also, on macOS 13, Homebrew seems to install a `gcc@9` package that no longer has `unistd.h`, only `ssp/unistd.h`, and hence builds would fail with: In file included from base85.c:1: git-compat-util.h:223:10: fatal error: unistd.h: No such file or directory 223 | #include | ^~~~~~~~~~ compilation terminated. The reason why we install GCC v9.x is historical, and back in the days it was because it was the _newest_ version available via Homebrew: 176441bfb58 (ci: build Git with GCC 9 in the 'osx-gcc' build job, 2019-11-27). To reinstate the spirit of that commit _and_ to fix that build failure, let's switch to the now-newest GCC version: v13.x. Signed-off-by: Johannes Schindelin --- .github/workflows/main.yml | 6 +++--- ci/lib.sh | 6 ++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dcf7d78f1d004c..9fdbd5402898bf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -276,11 +276,11 @@ jobs: pool: ubuntu-20.04 - jobname: osx-clang cc: clang - pool: macos-12 + pool: macos-13 - jobname: osx-gcc cc: gcc - cc_package: gcc-9 - pool: macos-12 + cc_package: gcc-13 + pool: macos-13 - jobname: linux-gcc-default cc: gcc pool: ubuntu-latest diff --git a/ci/lib.sh b/ci/lib.sh index 6fbb5bade127c3..bc0b23099df29e 100755 --- a/ci/lib.sh +++ b/ci/lib.sh @@ -253,11 +253,9 @@ ubuntu-*) export PATH="$GIT_LFS_PATH:$P4_PATH:$PATH" ;; macos-*) - if [ "$jobname" = osx-gcc ] + MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python3)" + if [ "$jobname" != osx-gcc ] then - MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python3)" - else - MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python2)" MAKEFLAGS="$MAKEFLAGS APPLE_COMMON_CRYPTO_SHA1=Yes" fi ;;