Skip to content

Commit b02a953

Browse files
authored
Try macos runners (#783)
This should let us build wheels across both mac architectures for now.
1 parent cc4bfa3 commit b02a953

File tree

2 files changed

+31
-6
lines changed

2 files changed

+31
-6
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ jobs:
5050
REDIS_URL: redis://localhost:6379/0
5151

5252
steps:
53-
- uses: actions/checkout@v2
54-
- uses: actions/setup-python@v2
53+
- uses: actions/checkout@v3
54+
- uses: actions/setup-python@v4
5555
with:
5656
python-version: ${{ matrix.python-version }}
5757
- name: Upgrade packaging tools
@@ -99,8 +99,8 @@ jobs:
9999
REDIS_URL: redis://localhost:6379/0
100100

101101
steps:
102-
- uses: actions/checkout@v2
103-
- uses: actions/setup-python@v2
102+
- uses: actions/checkout@v3
103+
- uses: actions/setup-python@v4
104104
with:
105105
python-version: ${{ matrix.python-version }}
106106
- name: Upgrade packaging tools

.github/workflows/release.yml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
# For cross-architecture builds
3636
# https://cibuildwheel.readthedocs.io/en/stable/faq/#emulation
3737
if: runner.os == 'Linux'
38-
uses: docker/setup-qemu-action@v1
38+
uses: docker/setup-qemu-action@v3
3939
with:
4040
platforms: all
4141
- name: Build binary wheels
@@ -51,6 +51,31 @@ jobs:
5151
with:
5252
path: ./wheelhouse/*.whl
5353

54+
build_macos_wheels:
55+
name: Build macos wheels (cross-compiles arm64)
56+
runs-on: macos-11
57+
steps:
58+
- uses: actions/checkout@v3
59+
60+
- uses: actions/setup-python@v4
61+
name: Install Python
62+
with:
63+
python-version: "3.10"
64+
65+
- name: Install cibuildwheel
66+
run: |
67+
python -m pip install --upgrade pip cibuildwheel
68+
- name: Build binary wheels
69+
env:
70+
CIBW_SKIP: "pp38-* pp39-* pp310-* pp311-*"
71+
CIBW_BUILD_VERBOSITY: 1
72+
CIBW_ARCHS_MACOS: "x86_64 arm64"
73+
run: python -m cibuildwheel
74+
75+
- uses: actions/upload-artifact@v3
76+
with:
77+
path: ./wheelhouse/*.whl
78+
5479
build_pure_wheels:
5580
name: Build pure python wheels
5681
runs-on: ubuntu-20.04
@@ -96,7 +121,7 @@ jobs:
96121
path: dist/*.tar.gz
97122

98123
upload_pypi:
99-
needs: [cibuildwheel_py38plus, build_pure_wheels, build_sdist]
124+
needs: [cibuildwheel_py38plus, build_pure_wheels, build_sdist, build_macos_wheels]
100125
runs-on: ubuntu-20.04
101126
steps:
102127
- name: Download distributions for publishing.

0 commit comments

Comments
 (0)