@@ -131,23 +131,6 @@ jobs:
131
131
python : 312
132
132
platform_id : macosx_x86_64
133
133
134
- # MacOS arm64
135
- - os : macos-latest
136
- python : 38
137
- platform_id : macosx_arm64
138
- - os : macos-latest
139
- python : 39
140
- platform_id : macosx_arm64
141
- - os : macos-latest
142
- python : 310
143
- platform_id : macosx_arm64
144
- - os : macos-latest
145
- python : 311
146
- platform_id : macosx_arm64
147
- - os : macos-latest
148
- python : 312
149
- platform_id : macosx_arm64
150
-
151
134
steps :
152
135
- uses : actions/checkout@v4
153
136
with :
@@ -187,9 +170,68 @@ jobs:
187
170
name : wheel-${{ matrix.python }}-${{ matrix.platform_id }}
188
171
path : ./dist
189
172
173
+ build-wheels-macos-arm64 :
174
+ name : Build wheel for cp${{ matrix.python }}-${{ matrix.platform_id }}
175
+ runs-on : ${{ matrix.os }}
176
+ strategy :
177
+ fail-fast : false
178
+ matrix :
179
+ include :
180
+ # MacOS arm64
181
+ - os : macos-latest
182
+ python : 38
183
+ platform_id : macosx_arm64
184
+ - os : macos-latest
185
+ python : 39
186
+ platform_id : macosx_arm64
187
+ - os : macos-latest
188
+ python : 310
189
+ platform_id : macosx_arm64
190
+ - os : macos-latest
191
+ python : 311
192
+ platform_id : macosx_arm64
193
+ - os : macos-latest
194
+ python : 312
195
+ platform_id : macosx_arm64
196
+
197
+ steps :
198
+ - uses : actions/checkout@v4
199
+ with :
200
+ submodules : true
201
+
202
+ - uses : actions/setup-python@v5
203
+ name : Install Python
204
+ with :
205
+ python-version : ' 3.9'
206
+
207
+ - name : Install cibuildwheel
208
+ run : python -m pip install cibuildwheel==2.16.2 wheel==0.42
209
+
210
+ - name : Build wheels
211
+ env :
212
+ CIBW_BUILD : cp${{ matrix.python }}-*
213
+ CIBW_ARCHS_MACOS : arm64
214
+ CIBW_BUILD_VERBOSITY : 1
215
+ run : |
216
+ python -m cibuildwheel --output-dir dist
217
+
218
+ # Cross compiling wheels for arm64 with poetry creates wheels with wrong tag
219
+ # Update the wheel with the correct tag then remove the incorrect wheel
220
+ - name : Fix poetry mistagging
221
+ run : |
222
+ wheel tags --platform-tag macosx_12_0_arm64 ./dist/*-macosx_12_0_x86_64.whl
223
+ rm ./dist/*-macosx_12_0_x86_64.whl
224
+
225
+ - name : Store artifacts
226
+ uses : actions/upload-artifact@v4
227
+ with :
228
+ name : wheel-${{ matrix.python }}-${{ matrix.platform_id }}
229
+ path : ./dist/*.whl
230
+
231
+
190
232
test-package :
191
233
name : Test built package
192
- needs : [ build-wheels, build-sdist ]
234
+ needs : [ build-wheels, build-sdist, build-wheels-macos-arm64 ]
193
235
runs-on : ubuntu-latest
194
236
timeout-minutes : 30
195
237
strategy :
0 commit comments