Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add macOS arm64 support and use latest runners for cibuildwheel #7548

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
freebsd_instance:
image_family: freebsd-12-1
image_family: freebsd-13-2

task:
install_script: |
Expand Down Expand Up @@ -28,7 +28,7 @@ build_and_store_wheels: &BUILD_AND_STORE_WHEELS
delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}

install_cibuildwheel_script:
- $PYTHON -m pip install cibuildwheel==2.12.0
- $PYTHON -m pip install cibuildwheel==2.16.2

run_cibuildwheel_script:
- cibuildwheel
Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/cibuildwheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ jobs:
"include": [
{"os": "ubuntu-latest", "CIBW_BUILD": "cp37-manylinux_*", "CIBW_ARCHS": "x86_64"},
{"os": "ubuntu-latest", "CIBW_BUILD": "cp37-musllinux_*", "CIBW_ARCHS": "x86_64"},
{"os": "macos-12", "CIBW_BUILD": "cp37-*", "CIBW_ARCHS": "x86_64"},
{"os": "windows-2022", "CIBW_BUILD": "cp37-*", "CIBW_ARCHS": "AMD64"}
{"os": "macos-latest", "CIBW_BUILD": "cp37-*", "CIBW_ARCHS": "x86_64"},
{"os": "macos-latest", "CIBW_BUILD": "cp39-*", "CIBW_ARCHS": "arm64"},
Copy link

@efiop efiop Dec 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI fails on wheel repair, specifically

delocate.delocating.DelocationError: Some missing architectures in wheel
  Required arch arm64 missing from /usr/local/Cellar/openssl@3/3.1.4/lib/libssl.3.dylib
  Required arch arm64 missing from libtorrent/__init__.cpython-39-darwin.so

so it looks like libtorrent wasn't built with arm64 support and openssl doesn't have it either. Here's how pygit2 went about it https://github.com/libgit2/pygit2/blob/master/.github/workflows/wheels.yml#L41C16-L41C16 , it builds openssl and itself with arm64 support before creating wheels CIBW_BEFORE_ALL and then uses a custom CIBW_REPAIR_WHEEL_COMMAND_MACOS to repair them. Looks we'll have to do the same here. Also might as well build universal wheels here instead of just arm64, so that we can drop pure x86_64 later on (though maybe this is arguable).

{"os": "windows-latest", "CIBW_BUILD": "cp37-*", "CIBW_ARCHS": "AMD64"}
]
}
MATRIX_WORKFLOW_DISPATCH: |
Expand All @@ -58,9 +59,10 @@ jobs:
{"os": "ubuntu-latest", "CIBW_BUILD": "cp*-manylinux_*", "CIBW_ARCHS": "aarch64"},
{"os": "ubuntu-latest", "CIBW_BUILD": "cp*-musllinux_*", "CIBW_ARCHS": "x86_64"},
{"os": "ubuntu-latest", "CIBW_BUILD": "cp*-musllinux_*", "CIBW_ARCHS": "aarch64"},
{"os": "macos-12", "CIBW_BUILD": "cp*", "CIBW_ARCHS": "x86_64"},
{"os": "windows-2022", "CIBW_BUILD": "cp*", "CIBW_ARCHS": "x86"},
{"os": "windows-2022", "CIBW_BUILD": "cp*", "CIBW_ARCHS": "AMD64"}
{"os": "macos-latest", "CIBW_BUILD": "cp*", "CIBW_ARCHS": "x86_64"},
{"os": "macos-latest", "CIBW_BUILD": "cp39-*", "CIBW_ARCHS": "arm64"},
{"os": "windows-latest", "CIBW_BUILD": "cp*", "CIBW_ARCHS": "x86"},
{"os": "windows-latest", "CIBW_BUILD": "cp*", "CIBW_ARCHS": "AMD64"}
]
}

Expand Down Expand Up @@ -91,7 +93,7 @@ jobs:
CIBW_TEST_SKIP: "*-win32"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

Expand All @@ -101,10 +103,10 @@ jobs:
path: wheelhouse
key: wheel-${{ matrix.CIBW_BUILD }}-${{ matrix.CIBW_ARCHS }}-${{ github.sha }}

- uses: docker/setup-qemu-action@v2
- uses: docker/setup-qemu-action@v3
if: steps.cache-wheel.outputs.cache-hit != 'true' && runner.os == 'Linux'

- uses: pypa/cibuildwheel@v2.12.3
- uses: pypa/cibuildwheel@v2.16.2
if: steps.cache-wheel.outputs.cache-hit != 'true'

- uses: actions/upload-artifact@v3
Expand Down
Loading