Skip to content

Commit

Permalink
ci: enable arm64 builds
Browse files Browse the repository at this point in the history
  • Loading branch information
percevalw committed Aug 30, 2023
1 parent 80011ba commit a3134bd
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 20 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package

on:
Expand All @@ -15,19 +7,30 @@ on:

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
name: Build wheels on ${{ matrix.os }}/${{ matrix.arch || '*' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-2019, macos-latest]
include:
- os: macos-latest
arch: x86_64
- os: macos-latest
arch: arm64
- os: ubuntu-latest
arch: '*' # unused
- os: windows-latest
arch: '*' # unused

steps:
- uses: actions/checkout@v2

- name: Build wheels
uses: pypa/[email protected]
uses: pypa/[email protected]
env:
CIBW_ARCHS_MACOS: ${{ matrix.arch }}

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl

Expand All @@ -40,7 +43,7 @@ jobs:
- name: Build sdist
run: pipx run build --sdist

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz

Expand All @@ -53,12 +56,9 @@ jobs:
id-token: write

steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
26 changes: 23 additions & 3 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,40 @@
name: Test Build

on:
workflow_dispatch:
push:
branches:
- v*.*.*
- build-*

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
name: Build wheels on ${{ matrix.os }}/${{ matrix.arch || '*' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-2019, macos-latest]
include:
- os: macos-latest
arch: x86_64
- os: macos-latest
arch: arm64
- os: ubuntu-latest
arch: '*' # unused
- os: windows-latest
arch: '*' # unused

steps:
- uses: actions/checkout@v2

- name: Build wheels
uses: pypa/[email protected]
uses: pypa/[email protected]
env:
CIBW_ARCHS_MACOS: ${{ matrix.arch }}

- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl

build_sdist:
name: Build source distribution
Expand All @@ -32,3 +48,7 @@ jobs:

- name: Build sdist
run: pipx run build --sdist

- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz

0 comments on commit a3134bd

Please sign in to comment.