@@ -144,30 +144,41 @@ jobs:
144
144
path : dist
145
145
146
146
build-wheels :
147
- name : Build wheels on ${{ matrix.os }}
148
- runs-on : ${{ matrix.os }}
147
+ name : Build wheels on ${{ matrix.os }} ${{ matrix.qemu }}
148
+ runs-on : ${{ matrix.os }}-latest
149
149
needs : pre-deploy
150
150
strategy :
151
151
matrix :
152
- os : [ubuntu-20.04, windows-2019, macos-10.15]
152
+ os : [ubuntu, windows, macos]
153
+ qemu : ['']
154
+ include :
155
+ # Split ubuntu job for the sake of speed-up
156
+ - os : ubuntu
157
+ qemu : aarch64
158
+ - os : ubuntu
159
+ qemu : ppc64le
160
+ - os : ubuntu
161
+ qemu : s390x
153
162
steps :
154
163
- name : Checkout
155
164
uses : actions/checkout@v2.3.4
156
165
- name : Set up QEMU
157
- if : runner.os == 'Linux'
166
+ if : ${{ matrix.qemu }}
158
167
uses : docker/setup-qemu-action@v1
159
168
with :
160
169
platforms : all
161
170
id : qemu
162
- - name : Available platforms
163
- if : runner.os == 'Linux'
164
- run : echo "${{ steps.qemu.outputs.platforms }}"
171
+ - name : Prepare emulation
172
+ run : |
173
+ if [[ -n "${{ matrix.qemu }}" ]]; then
174
+ # Build emulated architectures only if QEMU is set,
175
+ # use default "auto" otherwise
176
+ echo "CIBW_ARCHS_LINUX=${{ matrix.qemu }}" >> $GITHUB_ENV
177
+ fi
178
+ shell : bash
165
179
- name : Build wheels
166
180
uses : pypa/cibuildwheel@v2.2.0a1
167
181
env :
168
- # configure cibuildwheel to build native archs ('auto'), and some
169
- # emulated ones
170
- CIBW_ARCHS_LINUX : auto aarch64 ppc64le s390x
171
182
CIBW_ARCHS_MACOS : x86_64 arm64 universal2
172
183
- uses : actions/upload-artifact@v2
173
184
with :
0 commit comments