@@ -161,7 +161,7 @@ jobs:
161
161
needs : [release]
162
162
if : needs.release.outputs.released == 'true'
163
163
164
- name : Build wheels on ${{ matrix.os }} (${{ matrix.musl }})
164
+ name : Build wheels on ${{ matrix.os }} (${{ matrix.musl }}) [${{ matrix.qemu }}]
165
165
runs-on : ${{ matrix.os }}
166
166
strategy :
167
167
matrix :
@@ -173,27 +173,47 @@ jobs:
173
173
macos-13,
174
174
macos-latest,
175
175
]
176
- musl : ["", "musllinux"]
177
- exclude :
178
- - os : windows-2019
179
- musl : " musllinux"
180
- - os : macos-13
181
- musl : " musllinux"
182
- - os : macos-latest
183
- musl : " musllinux"
184
-
176
+ qemu : ['']
177
+ musl : [""]
178
+ include :
179
+ - os : ubuntu-latest
180
+ qemu : armv7l
181
+ musl : " "
182
+ - os : ubuntu-latest
183
+ qemu : armv7l
184
+ musl : musllinux
185
+ - os : ubuntu-latest
186
+ musl : musllinux
187
+ - os : ubuntu-24.04-arm
188
+ musl : musllinux
185
189
steps :
186
- - uses : actions/checkout@v4
190
+ - name : Checkout
191
+ uses : actions/checkout@v4
187
192
with :
188
193
fetch-depth : 0
189
194
ref : " master"
190
-
191
195
# Used to host cibuildwheel
192
196
- name : Set up Python
193
197
uses : actions/setup-python@v5
194
198
with :
195
- python-version : " 3.11"
196
-
199
+ python-version : " 3.12"
200
+ - name : Set up QEMU
201
+ if : ${{ matrix.qemu }}
202
+ uses : docker/setup-qemu-action@v3
203
+ with :
204
+ platforms : all
205
+ # This should be temporary
206
+ # xref https://github.com/docker/setup-qemu-action/issues/188
207
+ # xref https://github.com/tonistiigi/binfmt/issues/215
208
+ image : tonistiigi/binfmt:qemu-v8.1.5
209
+ id : qemu
210
+ - name : Prepare emulation
211
+ run : |
212
+ if [[ -n "${{ matrix.qemu }}" ]]; then
213
+ # Build emulated architectures only if QEMU is set,
214
+ # use default "auto" otherwise
215
+ echo "CIBW_ARCHS_LINUX=${{ matrix.qemu }}" >> $GITHUB_ENV
216
+ fi
197
217
- name : Install python-semantic-release
198
218
run : pipx install python-semantic-release==7.34.6
199
219
@@ -208,20 +228,18 @@ jobs:
208
228
ref : " ${{ steps.release_tag.outputs.newest_release_tag }}"
209
229
fetch-depth : 0
210
230
211
- - name : Build wheels ${{ matrix.musl }}
231
+ - name : Build wheels ${{ matrix.musl }} (${{ matrix.qemu }})
212
232
uses : pypa/cibuildwheel@v2.22.0
213
233
# to supply options, put them in 'env', like:
214
234
env :
215
235
CIBW_SKIP : cp36-* cp37-* pp36-* pp37-* pp38-* cp38-* *p39-*_aarch64 *p310-*_aarch64 pp*_aarch64 ${{ matrix.musl == 'musllinux' && '*manylinux*' || '*musllinux*' }}
216
236
CIBW_BEFORE_ALL_LINUX : apt install -y gcc || yum install -y gcc || apk add gcc
217
- CIBW_ARCHS_LINUX : ${{ matrix.os == 'ubuntu-24.04-arm' && 'aarch64' || 'auto' }}
218
- CIBW_BUILD_VERBOSITY : 3
219
237
REQUIRE_CYTHON : 1
220
238
221
239
- uses : actions/upload-artifact@v4
222
240
with :
223
241
path : ./wheelhouse/*.whl
224
- name : wheels-${{ matrix.os }}-${{ matrix.musl }}
242
+ name : wheels-${{ matrix.os }}-${{ matrix.musl }}-${{ matrix.qemu }}
225
243
226
244
upload_pypi :
227
245
needs : [build_wheels]
0 commit comments