Skip to content

Commit

Permalink
Attempts to build wheels across more architectures (#120)
Browse files Browse the repository at this point in the history
* Attempts to build wheels across more architectures

Uses uvloop's configuration for inspiration/nearly direct copying.

https://github.com/MagicStack/uvloop/blob/afb326897c26f01b864f65f016a7f3f80d9db8ad/.github/workflows/release.yml#L72-L87

Fixes #119

* Clarify wheel build step name

This should make the step name more apparent when the matrix expands

* Remove ${{runner.os}}, Actions doesn't seem to like it

* Only build universal2 on macOS, except for 3.7

Co-authored-by: Jordan Webb <[email protected]>
Co-authored-by: Jordan Webb <[email protected]>
  • Loading branch information
3 people authored Jan 13, 2023
1 parent ab561ae commit 15a0f5e
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,30 @@ jobs:

# Build binary distributions for PyPI
build_wheels:
name: Build ${{ matrix.build }} on ${{ matrix.os }}
name: Build on ${{ matrix.os }} for ${{matrix.cibw_python}} ${{matrix.cibw_arch}}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# Windows isn't working right now: https://github.com/caketop/python-starlark-go/issues/4
# os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-latest, macos-latest]
build: [cp311, cp310, cp39, cp38, cp37]

cibw_python: ["cp37-*", "cp38-*", "cp39-*", "cp310-*", "cp311-*"]
cibw_arch: ["x86_64", "aarch64", "universal2"]
exclude:
- os: ubuntu-latest
cibw_arch: universal2
- os: macos-latest
cibw_arch: aarch64
- os: macos-latest
cibw_arch: x86_64
- os: macos-latest
cibw_python: "cp37-*"
cibw_arch: universal2
include:
- os: macos-latest
cibw_python: "cp37-*"
cibw_arch: x86_64

steps:
- uses: actions/checkout@v3
with:
Expand All @@ -58,7 +72,9 @@ jobs:
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: ${{ matrix.build }}-*
CIBW_BUILD_VERBOSITY: 1
CIBW_BUILD: ${{ matrix.cibw_python }}
CIBW_ARCHS: ${{ matrix.cibw_arch }}

- uses: actions/upload-artifact@v3
with:
Expand Down

0 comments on commit 15a0f5e

Please sign in to comment.