From 546e7b21f83f877c28c951dfc6cd89e2383ce1bc Mon Sep 17 00:00:00 2001 From: xavier2k6 <42386382+xavier2k6@users.noreply.github.com> Date: Tue, 14 Nov 2023 18:44:25 +0000 Subject: [PATCH] Add macOS arm64 support and use latest runners for cibuildwheel --- .github/workflows/cibuildwheel.yml | 18 ++++++++++-------- pyproject.toml | 1 + 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index 9002aac5cb7..ecde6192b6e 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -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": "cp37-*", "CIBW_ARCHS": "arm64"}, + {"os": "windows-latest", "CIBW_BUILD": "cp37-*", "CIBW_ARCHS": "AMD64"} ] } MATRIX_WORKFLOW_DISPATCH: | @@ -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": "cp*", "CIBW_ARCHS": "arm64"}, + {"os": "windows-latest", "CIBW_BUILD": "cp*", "CIBW_ARCHS": "x86"}, + {"os": "windows-latest", "CIBW_BUILD": "cp*", "CIBW_ARCHS": "AMD64"} ] } @@ -91,7 +93,7 @@ jobs: CIBW_TEST_SKIP: "*-win32" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true @@ -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 diff --git a/pyproject.toml b/pyproject.toml index a3b0b8c6955..ab9b2c17a76 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,6 +15,7 @@ test-command = [ ] [tool.cibuildwheel.macos.environment] +archs = ["x86_64", "arm64"] BOOST_BUILD_PATH = "/tmp/boost/tools/build" BOOST_ROOT = "/tmp/boost" BOOST_VERSION = "1.81.0"