Skip to content

Commit e1dee30

Browse files
bdracowebknjaz
andauthored
Start building armv7l wheels (#1127)
<!-- Thank you for your contribution! --> ## What do these changes do? Copy the wheel build changes from `yarl` to use `armv7l` which also splits the `manylinux` and `musllinux` jobs which means the release process will be a bit faster ~~Note that the `manylinux` `armv7l` wheels might still not build and we will than have to add the exclude like we do for `yarl` since the previous `manylinux` image for `armv7l` did not have a working `cffi` package. In theory this has been fixed in https://github.com/pypa/cibuildwheel/releases/tag/v2.23.0~~ yarl released fine with manylinux now ## Are there changes in behavior for the user? `armv7l` wheels --------- Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
1 parent f7febaa commit e1dee30

File tree

4 files changed

+58
-5
lines changed

4 files changed

+58
-5
lines changed

.github/workflows/ci-cd.yml

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,24 @@ jobs:
124124
- ubuntu
125125
- windows
126126
- macos
127+
tag:
128+
- ''
129+
- 'musllinux'
130+
exclude:
131+
- os: windows
132+
tag: 'musllinux'
133+
- os: macos
134+
tag: 'musllinux'
135+
- os: ubuntu
136+
tag: >-
137+
${{
138+
(github.event_name != 'push' || github.ref_type != 'tag')
139+
&& 'musllinux' || 'none'
140+
}}
127141
uses: ./.github/workflows/reusable-build-wheel.yml
128142
with:
129143
os: ${{ matrix.os }}
144+
tag: ${{ matrix.tag }}
130145
wheel-tags-to-skip: >-
131146
${{
132147
(github.event_name != 'push' || !contains(github.ref, 'refs/tags/'))
@@ -135,7 +150,8 @@ jobs:
135150
*-musllinux_*
136151
*-win32
137152
pp*'
138-
|| ''
153+
|| (matrix.tag == 'musllinux') && '*-manylinux_* pp*'
154+
|| '*-musllinux_* pp*'
139155
}}
140156
source-tarball-name: >-
141157
${{ needs.build-pure-python-dists.outputs.sdist-filename }}
@@ -504,7 +520,7 @@ jobs:
504520
echo "Predeploy step"
505521
506522
build-wheels-for-odd-archs:
507-
name: Build wheels on ${{ matrix.os }} ${{ matrix.qemu }}
523+
name: Build wheels on ${{ matrix.tag }} ${{ matrix.qemu }}
508524
needs:
509525
- build-pure-python-dists
510526
- pre-deploy
@@ -515,9 +531,20 @@ jobs:
515531
- aarch64
516532
- ppc64le
517533
- s390x
534+
- armv7l
535+
tag:
536+
- ''
537+
- musllinux
518538
uses: ./.github/workflows/reusable-build-wheel.yml
519539
with:
520540
qemu: ${{ matrix.qemu }}
541+
tag: ${{ matrix.tag }}
542+
wheel-tags-to-skip: >-
543+
${{
544+
(matrix.tag == 'musllinux')
545+
&& '*-manylinux_* pp*'
546+
|| '*-musllinux_* pp*'
547+
}}
521548
source-tarball-name: >-
522549
${{ needs.build-pure-python-dists.outputs.sdist-filename }}
523550
dists-artifact-name: ${{ needs.pre-setup.outputs.dists-artifact-name }}

.github/workflows/reusable-build-wheel.yml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ on:
1919
default: ''
2020
required: false
2121
type: string
22+
tag:
23+
description: Build platform tag wheels
24+
default: ''
25+
required: false
26+
type: string
2227
source-tarball-name:
2328
description: Sdist filename wildcard
2429
required: true
@@ -37,10 +42,26 @@ env:
3742
jobs:
3843

3944
build-wheel:
40-
name: Build wheels on ${{ inputs.os }} ${{ inputs.qemu }}
45+
name: >-
46+
Build ${{ inputs.tag }} wheels on ${{ inputs.os }} ${{ inputs.qemu }}
4147
runs-on: ${{ inputs.os }}-latest
4248
timeout-minutes: ${{ inputs.qemu && 120 || 15 }}
4349
steps:
50+
- name: Compute GHA artifact name ending
51+
id: gha-artifact-name
52+
run: |
53+
from hashlib import sha512
54+
from os import environ
55+
from pathlib import Path
56+
FILE_APPEND_MODE = 'a'
57+
inputs_json_str = """${{ toJSON(inputs) }}"""
58+
hash = sha512(inputs_json_str.encode()).hexdigest()
59+
with Path(environ['GITHUB_OUTPUT']).open(
60+
mode=FILE_APPEND_MODE,
61+
) as outputs_file:
62+
print(f'hash={hash}', file=outputs_file)
63+
shell: python
64+
4465
- name: Retrieve the project source from an sdist inside the GHA artifact
4566
uses: re-actors/checkout-python-sdist@release/v2
4667
with:
@@ -75,8 +96,11 @@ jobs:
7596
- name: Upload built artifacts for testing and publishing
7697
uses: actions/upload-artifact@v4
7798
with:
78-
name: >-
79-
${{ inputs.dists-artifact-name }}-${{ inputs.os }}-${{ inputs.qemu }}
99+
name: ${{ inputs.dists-artifact-name }}-
100+
${{ inputs.os }}-
101+
${{ inputs.qemu }}-
102+
${{ inputs.tag }}-
103+
${{ steps.gha-artifact-name.outputs.hash }}
80104
path: ./wheelhouse/*.whl
81105

82106
...

CHANGES/1127.feature.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Started building armv7l wheels -- by :user:`bdraco`.

docs/spelling_wordlist.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
armv
12
aarch64
23
i686
34
ppc64le

0 commit comments

Comments
 (0)