Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 39887b8

Browse filesBrowse files
authored
feat: add armv7l wheel builds (#1517)
1 parent a15a1e0 commit 39887b8
Copy full SHA for 39887b8

File tree

1 file changed

+36
-18
lines changed
Filter options

1 file changed

+36
-18
lines changed

‎.github/workflows/ci.yml

Copy file name to clipboardExpand all lines: .github/workflows/ci.yml
+36-18Lines changed: 36 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ jobs:
161161
needs: [release]
162162
if: needs.release.outputs.released == 'true'
163163

164-
name: Build wheels on ${{ matrix.os }} (${{ matrix.musl }})
164+
name: Build wheels on ${{ matrix.os }} (${{ matrix.musl }}) [${{ matrix.qemu }}]
165165
runs-on: ${{ matrix.os }}
166166
strategy:
167167
matrix:
@@ -173,27 +173,47 @@ jobs:
173173
macos-13,
174174
macos-latest,
175175
]
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
185189
steps:
186-
- uses: actions/checkout@v4
190+
- name: Checkout
191+
uses: actions/checkout@v4
187192
with:
188193
fetch-depth: 0
189194
ref: "master"
190-
191195
# Used to host cibuildwheel
192196
- name: Set up Python
193197
uses: actions/setup-python@v5
194198
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
197217
- name: Install python-semantic-release
198218
run: pipx install python-semantic-release==7.34.6
199219

@@ -208,20 +228,18 @@ jobs:
208228
ref: "${{ steps.release_tag.outputs.newest_release_tag }}"
209229
fetch-depth: 0
210230

211-
- name: Build wheels ${{ matrix.musl }}
231+
- name: Build wheels ${{ matrix.musl }} (${{ matrix.qemu }})
212232
uses: pypa/cibuildwheel@v2.22.0
213233
# to supply options, put them in 'env', like:
214234
env:
215235
CIBW_SKIP: cp36-* cp37-* pp36-* pp37-* pp38-* cp38-* *p39-*_aarch64 *p310-*_aarch64 pp*_aarch64 ${{ matrix.musl == 'musllinux' && '*manylinux*' || '*musllinux*' }}
216236
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
219237
REQUIRE_CYTHON: 1
220238

221239
- uses: actions/upload-artifact@v4
222240
with:
223241
path: ./wheelhouse/*.whl
224-
name: wheels-${{ matrix.os }}-${{ matrix.musl }}
242+
name: wheels-${{ matrix.os }}-${{ matrix.musl }}-${{ matrix.qemu }}
225243

226244
upload_pypi:
227245
needs: [build_wheels]

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.