Skip to content

Commit

Permalink
Github Actions: Build and publish Apple Silicon Binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
Areustle committed Aug 16, 2023
1 parent f3a65e4 commit 0c379cd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
24 changes: 19 additions & 5 deletions .github/workflows/pypi-build-test-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,41 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest]
python: [38, 39, 310, 311]
arch: [x86, arm]
include:
- os: ubuntu-latest
arch: x86
platform_id: manylinux_x86_64
cibw_arch: auto
- os: macos-latest
arch: x86
platform_id: macosx_x86_64
cibw_arch: x86_64
- os: macos-latest
arch: arm
platform_id: macosx_arm64
cibw_arch: arm64
exclude:
- os: ubuntu-latest
arch: arm

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Get history and tags for SCM versioning
run: |
git fetch --prune --unshallow
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Build wheels
uses: pypa/cibuildwheel@v2.13.1
uses: pypa/cibuildwheel@v2.15.0
env:
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_ARCHS_LINUX: ${{ matrix.cibw_arch }}
CIBW_ARCHS_MACOS: ${{ matrix.cibw_arch }}
CIBW_TEST_SKIP: "*_aarch64, *_arm64, *_universal2:arm64"

- name: Upload Build Artifact
uses: actions/upload-artifact@v2.2.4
uses: actions/upload-artifact@v3
with:
name: nuspacesim-gh-pypi-artifact
path: wheelhouse/*.whl
Expand All @@ -49,7 +63,7 @@ jobs:

steps:
- name: Download Build Artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: nuspacesim-gh-pypi-artifact
path: wheelhouse/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pypi-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python: [310, 311]
python: [38, 39, 310, 311]
arch: [x86, arm]
include:
- os: ubuntu-latest
Expand Down

0 comments on commit 0c379cd

Please sign in to comment.