Skip to content

Commit a686336

Browse files
committed
cicd/lib-build-and-push: merge aarch64 job to build-wheels
1 parent f792b19 commit a686336

File tree

1 file changed

+16
-43
lines changed

1 file changed

+16
-43
lines changed

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

Lines changed: 16 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,14 @@ 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+
id: qemu
91+
uses: docker/setup-qemu-action@v3
92+
with:
93+
platforms: all
94+
image: 'docker.io/tonistiigi/binfmt:desktop-v8.1.5'
95+
8896
- name: Install Conan
8997
if: runner.os == 'Windows'
9098
uses: turtlebrowser/get-conan@main
@@ -113,9 +121,15 @@ jobs:
113121
fi
114122
115123
- name: Build wheels
124+
if: runner.os != 'Linux' && matrix.platform != 'aarch64'
116125
run: |
117126
python3 -m cibuildwheel --output-dir wheelhouse
118127
128+
- name: Build wheels
129+
if: runner.os == 'Linux' && matrix.platform == 'aarch64'
130+
run: |
131+
python -m cibuildwheel --archs ${{ matrix.archs }} --output-dir wheelhouse
132+
119133
- uses: actions/upload-artifact@v4
120134
with:
121135
name: wheels-${{ matrix.os }}-${{ matrix.platform }}
@@ -140,50 +154,9 @@ jobs:
140154
name: source-dist
141155
path: dist/*.tar.gz
142156

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

0 commit comments

Comments
 (0)