Skip to content
This repository was archived by the owner on Jul 5, 2023. It is now read-only.

Commit bbf3eb1

Browse files
Add support for building aarch64 wheels (#182)
Co-authored-by: Shantanu <[email protected]>
1 parent 81a3c1a commit bbf3eb1

File tree

1 file changed

+37
-1
lines changed

1 file changed

+37
-1
lines changed

.github/workflows/build.yml

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ jobs:
1313
# it also takes care of procuring the correct python version for us
1414
os: [ubuntu-latest, windows-latest, macos-latest]
1515
python-version: [36, 37, 38, 39, 310]
16-
1716
steps:
1817
- uses: actions/checkout@v2
1918
- uses: actions/setup-python@v2
@@ -37,6 +36,43 @@ jobs:
3736
with:
3837
name: dist
3938
path: ./wheelhouse/*.whl
39+
build_wheels_aarch64:
40+
name: py${{ matrix.python-version }} on ${{ matrix.os }} (aarch64)
41+
runs-on: ${{ matrix.os }}
42+
strategy:
43+
fail-fast: false
44+
matrix:
45+
# cibuildwheel builds linux wheels inside a manylinux container
46+
# it also takes care of procuring the correct python version for us
47+
os: [ubuntu-latest]
48+
python-version: [36, 37, 38, 39, 310]
49+
50+
steps:
51+
- uses: actions/checkout@v2
52+
- uses: actions/setup-python@v2
53+
name: Install Python
54+
with:
55+
python-version: "3.9"
56+
- name: Setup up QEMU
57+
uses: docker/setup-qemu-action@v1
58+
with:
59+
platforms: arm64
60+
- name: Install cibuildwheel
61+
run: |
62+
python -m pip install "cibuildwheel==2.1.3"
63+
- name: Build wheels
64+
env:
65+
CIBW_BUILD: "cp${{ matrix.python-version }}-*"
66+
CIBW_ARCHS: aarch64
67+
CIBW_BUILD_VERBOSITY: 1
68+
CIBW_BEFORE_TEST: pip install pytest
69+
CIBW_TEST_COMMAND: pytest {package}
70+
run: |
71+
python -m cibuildwheel --output-dir wheelhouse .
72+
- uses: actions/upload-artifact@v2
73+
with:
74+
name: dist
75+
path: ./wheelhouse/*.whl
4076
build_sdist_python_wheel:
4177
name: sdist and python wheel
4278
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)