Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add release job to publish macOS arm64 binaries
Browse files Browse the repository at this point in the history
With the recent release of cibuildwheel 1.9.0 support for building arm64
binaries on macOS was added. This enables us to build release binaries
for this new platform. However, these binaries will be cross-compiled
and not tested since there are no CI resources with the platform
available. This commit adds a new release wheel job to build a aarch64
binary and publish an arm64 wheel for macOS. This will enable users who
have an arm64 mac to run retworkx without having to either build from
source or run under rosetta 2.

Fixes Qiskit#231
mtreinish committed Feb 9, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 8d2fdcc commit 8215fd8
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ jobs:
toolchain: stable
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==1.6.3 twine
python -m pip install cibuildwheel==1.9.0 twine
- name: Build wheels
run: |
python -m cibuildwheel --output-dir wheelhouse
@@ -57,7 +57,25 @@ jobs:
CIBW_SKIP: cp27-* cp34-* cp35-* pp* *win32
CIBW_BEFORE_BUILD: pip install -U setuptools-rust
CIBW_TEST_COMMAND: python -m unittest discover {project}/tests

- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl
- name: Upload to PyPI
run: twine upload ./wheelhouse/*.whl
env:
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
TWINE_USERNAME: retworkx-ci
build-mac-arm-wheels:
name: Build wheels on macos for arm
runs-on: macos-10.15
steps:
- uses: actions/checkout@v2
- name: Build wheels
uses: joerick/[email protected]
env:
CIBW_ARCHS_MACOS: arm64
CIBW_BEFORE_BUILD: pip install -U setuptools-rust
CIBW_ENVIRONMENT: CARGO_BUILD_TARGET="aarch64-apple-darwin"
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl
@@ -85,7 +103,7 @@ jobs:
run: rustup default stable-i686-pc-windows-msvc
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==1.6.3 twine
python -m pip install cibuildwheel==1.9.0 twine
- name: Build wheels
run: |
python -m cibuildwheel --output-dir wheelhouse

0 comments on commit 8215fd8

Please sign in to comment.