Skip to content

Commit b7c234c

Browse files
committed
ci: generalize emulated Linux wheel builds
Turn the current ppc64le build into the sole matrix entry in a new general build job for all emulated Linux builds, to make supporting additional architectures easier. Human note: The entirety of the commit message is written manually. Assisted-by: GPT-5.5
1 parent d86662e commit b7c234c

1 file changed

Lines changed: 14 additions & 7 deletions

File tree

.github/workflows/wheels.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,17 @@ jobs:
9797
name: wheels-${{ matrix.name }}
9898
path: ./wheelhouse/*.whl
9999

100-
build_wheels_ppc:
101-
name: Wheels for linux-ppc
100+
build_wheels_emulated_linux:
101+
name: Wheels for ${{ matrix.name }}
102102
runs-on: ubuntu-24.04
103103
needs: sdist
104+
strategy:
105+
fail-fast: true
106+
matrix:
107+
include:
108+
- name: linux-ppc64le
109+
qemu_platform: linux/ppc64le
110+
cibw_arch: ppc64le
104111

105112
steps:
106113
- uses: actions/setup-python@v6
@@ -109,7 +116,7 @@ jobs:
109116

110117
- uses: docker/setup-qemu-action@v4
111118
with:
112-
platforms: linux/ppc64le
119+
platforms: ${{ matrix.qemu_platform }}
113120

114121
- name: Download sdist
115122
uses: actions/download-artifact@v8
@@ -124,20 +131,20 @@ jobs:
124131
shell: bash
125132
run: python -m cibuildwheel dist/*.tar.gz --output-dir wheelhouse
126133
env:
127-
CIBW_ARCHS: ppc64le
134+
CIBW_ARCHS: ${{ matrix.cibw_arch }}
128135
CIBW_ENVIRONMENT: LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.9.4 LIBGIT2=/project/ci
129136

130137
- uses: actions/upload-artifact@v7
131138
with:
132-
name: wheels-linux-ppc
139+
name: wheels-${{ matrix.name }}
133140
path: ./wheelhouse/*.whl
134141

135142
twine-check:
136143
name: Twine check
137144
# It is good to do this check on non-tagged commits.
138145
# Note, pypa/gh-action-pypi-publish (see job below) does this automatically.
139146
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
140-
needs: [build_wheels, build_wheels_ppc, sdist]
147+
needs: [build_wheels, build_wheels_emulated_linux, sdist]
141148
runs-on: ubuntu-latest
142149

143150
steps:
@@ -151,7 +158,7 @@ jobs:
151158

152159
pypi:
153160
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
154-
needs: [build_wheels, build_wheels_ppc, sdist]
161+
needs: [build_wheels, build_wheels_emulated_linux, sdist]
155162
permissions:
156163
contents: write # to create GitHub Release
157164
runs-on: ubuntu-24.04

0 commit comments

Comments
 (0)