{"thread":{"id":"60461","subject":"[PATCH] ci: upgrade to using macos-13","startedAt":"2023-11-03T07:27:43Z","lastAt":"2023-11-03T08:16:23Z","messageCount":2,"participants":["Johannes Schindelin via GitGitGadget","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"484383","messageId":"pull.1607.git.1698996455218.gitgitgadget@gmail.com","threadId":"60461","inReplyTo":null,"subject":"[PATCH] ci: upgrade to using macos-13","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2023-11-03T07:27:35Z","receivedAt":"2023-11-03T07:27:43Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nIn April, GitHub announced that the `macos-13` pool is available:\nhttps://github.blog/changelog/2023-04-24-github-actions-macos-13-is-now-available/.\nIt is only a matter of time until the `macos-12` pool is going away,\ntherefore we should switch now, without pressure of a looming deadline.\n\nSince the `macos-13` runners no longer include Python2, we also drop\nspecifically testing with Python2 and switch uniformly to Python3, see\nhttps://github.com/actions/runner-images/blob/HEAD/images/macos/macos-13-Readme.md\nfor details about the software available on the `macos-13` pool's\nrunners.\n\nAlso, on macOS 13, Homebrew seems to install a `gcc@9` package that no\nlonger comes with a regular `unistd.h` (there seems only to be a\n`ssp/unistd.h`), and hence builds would fail with:\n\n    In file included from base85.c:1:\n    git-compat-util.h:223:10: fatal error: unistd.h: No such file or directory\n      223 | #include <unistd.h>\n          |          ^~~~~~~~~~\n    compilation terminated.\n\nThe reason why we install GCC v9.x explicitly is historical, and back in\nthe days it was because it was the _newest_ version available via\nHomebrew: 176441bfb58 (ci: build Git with GCC 9 in the 'osx-gcc' build\njob, 2019-11-27).\n\nTo reinstate the spirit of that commit _and_ to fix that build failure,\nlet's switch to the now-newest GCC version: v13.x.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n    ci: upgrade to using macos-13\n    \n    GitHub announced in April that the macos-13 pool is available\n    [https://github.blog/changelog/2023-04-24-github-actions-macos-13-is-now-available/],\n    so let's switch. This might also stave off CI failures we experience\n    over in GitGitGadget (e.g. here\n    [https://github.com/gitgitgadget/git/actions/runs/6729366919/job/18290134547#step:3:56])\n    and in Git for Windows (e.g. here\n    [https://github.com/git-for-windows/git/actions/runs/6708618181/job/18252834721#step:3:57])\n    where occasionally macos-12-xl runners seem to be co-opted to cope with\n    macos-12 workload (and the former don't have Python2 in their PATH).\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-1607%2Fdscho%2Fswitch-ci-to-macos-13-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1607/dscho/switch-ci-to-macos-13-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/1607\n\n .github/workflows/main.yml | 6 +++---\n ci/lib.sh                  | 6 ++----\n 2 files changed, 5 insertions(+), 7 deletions(-)\n\ndiff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\nindex dcf7d78f1d0..9fdbd540289 100644\n--- a/.github/workflows/main.yml\n+++ b/.github/workflows/main.yml\n@@ -276,11 +276,11 @@ jobs:\n             pool: ubuntu-20.04\n           - jobname: osx-clang\n             cc: clang\n-            pool: macos-12\n+            pool: macos-13\n           - jobname: osx-gcc\n             cc: gcc\n-            cc_package: gcc-9\n-            pool: macos-12\n+            cc_package: gcc-13\n+            pool: macos-13\n           - jobname: linux-gcc-default\n             cc: gcc\n             pool: ubuntu-latest\ndiff --git a/ci/lib.sh b/ci/lib.sh\nindex 6fbb5bade12..bc0b23099df 100755\n--- a/ci/lib.sh\n+++ b/ci/lib.sh\n@@ -253,11 +253,9 @@ ubuntu-*)\n \texport PATH=\"$GIT_LFS_PATH:$P4_PATH:$PATH\"\n \t;;\n macos-*)\n-\tif [ \"$jobname\" = osx-gcc ]\n+\tMAKEFLAGS=\"$MAKEFLAGS PYTHON_PATH=$(which python3)\"\n+\tif [ \"$jobname\" != osx-gcc ]\n \tthen\n-\t\tMAKEFLAGS=\"$MAKEFLAGS PYTHON_PATH=$(which python3)\"\n-\telse\n-\t\tMAKEFLAGS=\"$MAKEFLAGS PYTHON_PATH=$(which python2)\"\n \t\tMAKEFLAGS=\"$MAKEFLAGS APPLE_COMMON_CRYPTO_SHA1=Yes\"\n \tfi\n \t;;\n\nbase-commit: 692be87cbba55e8488f805d236f2ad50483bd7d5\n-- \ngitgitgadget\n"},{"id":"484384","messageId":"xmqqo7gbjlpu.fsf@gitster.g","threadId":"60461","inReplyTo":"pull.1607.git.1698996455218.gitgitgadget@gmail.com","subject":"Re: [PATCH] ci: upgrade to using macos-13","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2023-11-03T08:16:13Z","receivedAt":"2023-11-03T08:16:23Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com>\nwrites:\n\n> From: Johannes Schindelin <johannes.schindelin@gmx.de>\n>\n> In April, GitHub announced that the `macos-13` pool is available:\n> https://github.blog/changelog/2023-04-24-github-actions-macos-13-is-now-available/.\n> It is only a matter of time until the `macos-12` pool is going away,\n> therefore we should switch now, without pressure of a looming deadline.\n> ...\n> To reinstate the spirit of that commit _and_ to fix that build failure,\n> let's switch to the now-newest GCC version: v13.x.\n\nThank you very much for a well reasoned patch that is very timely.\nI am tempted to fast-track this one down from 'seen' to 'maint'\nbefore we tag -rc1.\n\nWill queue.\n"}]}