Skip to content

Commit 0fe7832

Browse files
committed
cicd/lib-build-and-push: merge aarch64 job to build-wheels
1 parent 8af76d1 commit 0fe7832

File tree

1 file changed

+15
-43
lines changed

1 file changed

+15
-43
lines changed

.github/workflows/lib-build-and-push.yml

Lines changed: 15 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
do
3838
if [[ "${os}" == "linux" ]]; then
3939
[ -n "$was_added" ] && echo -n "," >> /tmp/matrix.json
40-
echo -n '{"os":"ubuntu-20.04","platform":"x86_64"},{"os":"ubuntu-20.04","platform":"PyPy"}' >> /tmp/matrix.json
40+
echo -n '{"os":"ubuntu-20.04","platform":"x86_64"},{"os":"ubuntu-20.04","platform":"PyPy"},{"os":"ubuntu-24.04","platform":"aarch64"}' >> /tmp/matrix.json
4141
was_added=1
4242
elif [[ "${os}" == "windows" ]]; then
4343
[ -n "$was_added" ] && echo -n "," >> /tmp/matrix.json
@@ -85,6 +85,13 @@ jobs:
8585
run: |
8686
choco install openssl --version=3.4.1 -f -y --no-progress
8787
88+
- name: Set up QEMU
89+
if: runner.os == 'Linux' && matrix.platform == 'aarch64'
90+
uses: docker/setup-qemu-action@v3
91+
with:
92+
platforms: all
93+
image: 'docker.io/tonistiigi/binfmt:desktop-v8.1.5'
94+
8895
- name: Install Conan
8996
if: runner.os == 'Windows'
9097
uses: turtlebrowser/get-conan@main
@@ -122,9 +129,15 @@ jobs:
122129
fi
123130
124131
- name: Build wheels
132+
if: runner.os != 'Linux' || matrix.platform != 'aarch64'
125133
run: |
126134
python3 -m cibuildwheel --output-dir wheelhouse
127135
136+
- name: Build wheels
137+
if: runner.os == 'Linux' && matrix.platform == 'aarch64'
138+
run: |
139+
python -m cibuildwheel --archs aarch64 --output-dir wheelhouse
140+
128141
- uses: actions/upload-artifact@v4
129142
with:
130143
name: wheels-${{ runner.os }}-${{ matrix.platform }}
@@ -149,50 +162,9 @@ jobs:
149162
name: source-dist
150163
path: dist/*.tar.gz
151164

152-
build-wheels-extra-arch:
153-
# The host should always be linux
154-
runs-on: ubuntu-24.04
155-
name: Build extra arch ${{ matrix.archs }} wheels
156-
strategy:
157-
fail-fast: false
158-
matrix:
159-
archs: [ aarch64,] # ppc64le ]
160-
161-
steps:
162-
- uses: actions/checkout@v4
163-
164-
- name: Set up QEMU
165-
id: qemu
166-
uses: docker/setup-qemu-action@v3
167-
with:
168-
platforms: all
169-
image: 'docker.io/tonistiigi/binfmt:desktop-v8.1.5'
170-
if: runner.os == 'Linux'
171-
172-
- uses: actions/setup-python@v5
173-
name: Install Python
174-
with:
175-
python-version: ${{ inputs.python-version }}
176-
allow-prereleases: 'true'
177-
178-
- name: Install cibuildwheel
179-
run: |
180-
python -m pip install cibuildwheel==2.22.0
181-
182-
- name: Build wheels
183-
env:
184-
CIBW_BUILD: "cp39* cp310* cp311* cp312* cp313*" # limit to specific version since it take much more time than jobs limit
185-
run: |
186-
python -m cibuildwheel --archs ${{ matrix.archs }} --output-dir wheelhouse
187-
188-
- uses: actions/upload-artifact@v4
189-
with:
190-
name: wheels-${{ matrix.archs }}
191-
path: ./wheelhouse/*.whl
192-
193165
upload_pypi:
194166
if: inputs.upload
195-
needs: [build-wheels, build-wheels-extra-arch, build-sdist]
167+
needs: [build-wheels, build-sdist]
196168
runs-on: ubuntu-24.04
197169
permissions:
198170
id-token: write

0 commit comments

Comments
 (0)