Skip to content

Commit 5553d8f

Browse files
odsodidev
andauthored
Add wheel build support for linux aarch64 (#839)
Co-authored-by: odidev <[email protected]>
1 parent a96d9d6 commit 5553d8f

File tree

1 file changed

+55
-1
lines changed

1 file changed

+55
-1
lines changed

.github/workflows/publish.yml

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,23 @@ jobs:
3636
fail-fast: false
3737
matrix:
3838
os: [ubuntu-latest, macos-latest, windows-latest]
39+
arch: [auto]
40+
include:
41+
- os: ubuntu-latest
42+
arch: aarch64
3943
steps:
4044
- uses: actions/checkout@v2
4145
- uses: actions/setup-python@v2
4246
with:
4347
python-version: 3.7
48+
- name: Set up QEMU
49+
if: ${{ matrix.arch == 'aarch64' }}
50+
uses: docker/setup-qemu-action@v1
4451
- name: Build wheels
4552
env:
53+
CIBW_ARCHS_LINUX: ${{matrix.arch}}
4654
CIBW_BUILD: cp36-* cp37-* cp38-* cp39-*
55+
CIBW_SKIP: '*-musllinux*'
4756
CIBW_BEFORE_BUILD_LINUX: pip install -r requirements-cython.txt && yum install -y zlib-devel
4857
# On windows and mac we should have z library preinstalled
4958
CIBW_BEFORE_BUILD: pip install -r requirements-cython.txt
@@ -198,10 +207,55 @@ jobs:
198207
rm -rf aiokafka
199208
make ci-test-unit
200209
210+
test-wheels-aarch64-linux:
211+
needs: [package-source, package-wheel]
212+
runs-on: ubuntu-latest
213+
env:
214+
py: /opt/python/${{ matrix.pyver }}/bin/python
215+
img: quay.io/pypa/manylinux2014_aarch64
216+
217+
strategy:
218+
matrix:
219+
include:
220+
- pyver: cp36-cp36m
221+
aiokafka_whl: dist/aiokafka-*-cp36-cp36m-manylinux*_aarch64.whl
222+
- pyver: cp37-cp37m
223+
aiokafka_whl: dist/aiokafka-*-cp37-cp37m-manylinux*_aarch64.whl
224+
- pyver: cp38-cp38
225+
aiokafka_whl: dist/aiokafka-*-cp38-cp38-manylinux*_aarch64.whl
226+
- pyver: cp39-cp39
227+
aiokafka_whl: dist/aiokafka-*-cp39-cp39-manylinux*_aarch64.whl
228+
229+
steps:
230+
- uses: actions/checkout@v2
231+
- name: Set up QEMU
232+
id: qemu
233+
uses: docker/setup-qemu-action@v1
234+
- name: Download distributions
235+
uses: actions/download-artifact@v2
236+
with:
237+
name: dist
238+
path: dist/
239+
- name: Test Wheel
240+
run: |
241+
docker run --rm -v ${{ github.workspace }}:/ws:rw --workdir=/ws \
242+
${{ env.img }} \
243+
bash -exc '${{ env.py }} -m venv .env && \
244+
source .env/bin/activate && \
245+
yum install -y epel-release && \
246+
yum-config-manager --enable epel && \
247+
yum install -y snappy-devel libzstd-devel krb5-devel && \
248+
pip install --upgrade pip setuptools wheel && \
249+
pip install -r requirements-ci.txt && \
250+
pip install ${{ matrix.aiokafka_whl }} && \
251+
rm -rf aiokafka && \
252+
make ci-test-unit && \
253+
deactivate'
254+
201255
deploy:
202256

203257
runs-on: ubuntu-latest
204-
needs: [test-wheels-linux, test-wheels-mac, test-wheels-windows]
258+
needs: [test-wheels-linux, test-wheels-aarch64-linux, test-wheels-mac, test-wheels-windows]
205259

206260
steps:
207261
- uses: actions/checkout@v2

0 commit comments

Comments
 (0)