Skip to content

Commit 3167b60

Browse files
committed
ci: upgrade to using macos-13
In April, GitHub announced that the `macos-13` pool is available: https://github.blog/changelog/2023-04-24-github-actions-macos-13-is-now-available/. It is only a matter of time until the `macos-12` pool is going away, therefore we should switch now, without pressure of a looming deadline. 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 for details about the software available on the `macos-13` pool's runners. Also, on macOS 13, Homebrew seems to install a `gcc@9` package that no longer comes with a regular `unistd.h` (there seems only to be a `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 <unistd.h> | ^~~~~~~~~~ compilation terminated. The reason why we install GCC v9.x explicitly is historical, and back in the days it was because it was the _newest_ version available via Homebrew: 176441b (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. Backported-from: 682a868 (ci: upgrade to using macos-13, 2023-11-03) Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
1 parent bddc176 commit 3167b60

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,11 +262,11 @@ jobs:
262262
pool: ubuntu-20.04
263263
- jobname: osx-clang
264264
cc: clang
265-
pool: macos-12
265+
pool: macos-13
266266
- jobname: osx-gcc
267267
cc: gcc
268-
cc_package: gcc-9
269-
pool: macos-12
268+
cc_package: gcc-13
269+
pool: macos-13
270270
- jobname: linux-gcc-default
271271
cc: gcc
272272
pool: ubuntu-latest

ci/lib.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,11 +253,9 @@ ubuntu-*)
253253
export PATH="$GIT_LFS_PATH:$P4_PATH:$PATH"
254254
;;
255255
macos-*)
256-
if [ "$jobname" = osx-gcc ]
256+
MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python3)"
257+
if [ "$jobname" != osx-gcc ]
257258
then
258-
MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python3)"
259-
else
260-
MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python2)"
261259
MAKEFLAGS="$MAKEFLAGS NO_APPLE_COMMON_CRYPTO=NoThanks"
262260
MAKEFLAGS="$MAKEFLAGS NO_OPENSSL=NoThanks"
263261
fi

0 commit comments

Comments
 (0)