From 890730c1394c4b36b2c07f8679cd4c39e612fc75 Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Tue, 2 Dec 2025 09:23:05 -0800 Subject: [PATCH 1/2] build(dev): build separate wheels for Mac OS architectures 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]: https://github.com/actions/runner-images/issues/13046 --- .github/workflows/wheels.yml | 6 ++++-- pyproject.toml | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 8445527d..ab72ca70 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -25,8 +25,10 @@ jobs: os: ubuntu-24.04 - name: linux-arm os: ubuntu-24.04-arm - - name: macos - os: macos-13 + - name: macos-intel + os: macos-15-intel + - name: macos-arm + os: macos-15 - name: windows-x64 os: windows-latest - name: windows-x86 diff --git a/pyproject.toml b/pyproject.toml index 09fbaaf7..7dd52578 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,6 @@ select = "*-musllinux*" repair-wheel-command = "LD_LIBRARY_PATH=/project/ci/lib auditwheel repair -w {dest_dir} {wheel}" [tool.cibuildwheel.macos] -archs = ["universal2"] environment = {LIBGIT2_VERSION="1.9.1", LIBSSH2_VERSION="1.11.1", OPENSSL_VERSION="3.3.3", LIBGIT2="/Users/runner/work/pygit2/pygit2/ci"} repair-wheel-command = "DYLD_LIBRARY_PATH=/Users/runner/work/pygit2/pygit2/ci/lib delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}" From 48e9fec344530a52211d9f787766c6362ae0428b Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Wed, 3 Dec 2025 21:05:31 -0800 Subject: [PATCH 2/2] test: skip tests for pypy wheel on MacOS arm64 --- .github/workflows/wheels.yml | 2 ++ pyproject.toml | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index ab72ca70..ca81c6fe 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -19,6 +19,8 @@ jobs: name: Wheels for ${{ matrix.name }} runs-on: ${{ matrix.os }} strategy: + # let other jobs in matrix complete if one fails + fail-fast: false matrix: include: - name: linux-amd diff --git a/pyproject.toml b/pyproject.toml index 7dd52578..83425468 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,9 @@ test-command = "pytest" test-sources = ["test", "pytest.ini"] before-test = "pip install -r {project}/requirements-test.txt" # Will avoid testing on emulated architectures (specifically ppc64le) -test-skip = "*-*linux_ppc64le" +# Also, skip testing on pypy on macOS arm64 due issue with bootstrapping git config paths +# see https://github.com/libgit2/pygit2/issues/1442 +test-skip = "*-*linux_ppc64le pp*-macosx_arm64" [tool.cibuildwheel.linux] repair-wheel-command = "LD_LIBRARY_PATH=/project/ci/lib64 auditwheel repair -w {dest_dir} {wheel}"