build(dev): build separate wheels for Mac OS architectures#1441
build(dev): build separate wheels for Mac OS architectures#1441jdavid merged 2 commits intolibgit2:masterfrom
Conversation
The `macos-13` (GitHub-hosted) runner will be unavailable by Dec 4 2025. See the [GitHub notice]. Apparently, Apple has deprecated support for Intel-based x86_64 architecture. This means building a universal wheel will no longer be useful. This patch builds a separate wheel for x86_64 and arm64 architectures. Doing this also allows `cibuildwheel` to properly test each architecture individually. Whereas before, there were warnings about tests not getting run for arm64 on a x86_64 runner. > [!WARNING] > Beware, the github-hosted `macos-15-intel` runner is provided to sunset x86_64 MacOS runners. > The `macos-15-intel` runner will become unavailable in August 2027. > Afterward, the CI will only be able to compile arm64 wheels for MacOS. [GitHub notice]: actions/runner-images#13046
|
All tests fail on MacOS arm64 runner with the following error: I'm still not sure what this means or how to fix it. I think libgit2 is trying to say that it can't find git config locations. Note, it only happens when running tests on the pypy11 wheel. Tests run on the CPy wheels pass as expected. |
|
As far as I can tell, this "invalid config path selector" error seems to be specific to pygit2 on pypy11. It seems that the Lines 359 to 374 in 890730c is not matching up with the libgit2 C constants of the same name: static int config_level_to_sysdir(int *out, int config_level)
{
switch (config_level) {
case GIT_CONFIG_LEVEL_SYSTEM:
*out = GIT_SYSDIR_SYSTEM;
return 0;
case GIT_CONFIG_LEVEL_XDG:
*out = GIT_SYSDIR_XDG;
return 0;
case GIT_CONFIG_LEVEL_GLOBAL:
*out = GIT_SYSDIR_GLOBAL;
return 0;
case GIT_CONFIG_LEVEL_PROGRAMDATA:
*out = GIT_SYSDIR_PROGRAMDATA;
return 0;
default:
break;
}
git_error_set(
GIT_ERROR_INVALID, "invalid config path selector %d", config_level);
return -1;
}See libgit2 source There was a similar issue in libgit2/libgit2sharp#1951 which was fixed by padding the I'm going to skip running tests on MacOS arm64 using pypy11 until this can be solved. The fact that this was never discovered is a sign that the CI was not previously able to test on MacOS arm64. |
75828a6 to
48e9fec
Compare
The
macos-13(GitHub-hosted) runner will be unavailable by Dec 4 2025. See the GitHub notice.Apparently, Apple has deprecated support for Intel-based x86_64 architecture. This means building a universal wheel will no longer be useful.
This patch builds a separate wheel for x86_64 and arm64 architectures. Doing this also allows
cibuildwheelto properly test each architecture individually. Whereas before, there were warnings about tests not getting run for arm64 on a x86_64 runner.Warning
Beware, the github-hosted
macos-15-intelrunner is provided to sunset x86_64 MacOS runners.The
macos-15-intelrunner will become unavailable in August 2027.Afterward, the CI will only be able to compile arm64 wheels for MacOS.