Skip to content

Commit

Permalink
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
  • Loading branch information
mtreinish committed Feb 9, 2021
1 parent 8d2fdcc commit 6e7ee70
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
name: Wheel Builds

on:
push:
tags:
Expand Down Expand Up @@ -44,7 +45,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
Expand All @@ -57,7 +58,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
Expand Down Expand Up @@ -85,7 +104,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
Expand Down

0 comments on commit 6e7ee70

Please sign in to comment.