Skip to content

Commit 15a0f5e

Browse files
colindeanjordemort
andauthored
Attempts to build wheels across more architectures (#120)
* 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]>
1 parent ab561ae commit 15a0f5e

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

.github/workflows/build_wheels.yml

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,30 @@ jobs:
3333

3434
# Build binary distributions for PyPI
3535
build_wheels:
36-
name: Build ${{ matrix.build }} on ${{ matrix.os }}
36+
name: Build on ${{ matrix.os }} for ${{matrix.cibw_python}} ${{matrix.cibw_arch}}
3737
runs-on: ${{ matrix.os }}
3838
strategy:
3939
fail-fast: false
4040
matrix:
4141
# Windows isn't working right now: https://github.com/caketop/python-starlark-go/issues/4
42-
# os: [ubuntu-latest, windows-latest, macos-latest]
4342
os: [ubuntu-latest, macos-latest]
44-
build: [cp311, cp310, cp39, cp38, cp37]
45-
43+
cibw_python: ["cp37-*", "cp38-*", "cp39-*", "cp310-*", "cp311-*"]
44+
cibw_arch: ["x86_64", "aarch64", "universal2"]
45+
exclude:
46+
- os: ubuntu-latest
47+
cibw_arch: universal2
48+
- os: macos-latest
49+
cibw_arch: aarch64
50+
- os: macos-latest
51+
cibw_arch: x86_64
52+
- os: macos-latest
53+
cibw_python: "cp37-*"
54+
cibw_arch: universal2
55+
include:
56+
- os: macos-latest
57+
cibw_python: "cp37-*"
58+
cibw_arch: x86_64
59+
4660
steps:
4761
- uses: actions/checkout@v3
4862
with:
@@ -58,7 +72,9 @@ jobs:
5872
- name: Build wheels
5973
uses: pypa/[email protected]
6074
env:
61-
CIBW_BUILD: ${{ matrix.build }}-*
75+
CIBW_BUILD_VERBOSITY: 1
76+
CIBW_BUILD: ${{ matrix.cibw_python }}
77+
CIBW_ARCHS: ${{ matrix.cibw_arch }}
6278

6379
- uses: actions/upload-artifact@v3
6480
with:

0 commit comments

Comments
 (0)