Skip to content

Commit 85b8751

Browse files
Merge pull request #208 from odidev/odidev_aarch64
Add Linux AArch64 and MacOS Arm64 wheel build support.
2 parents 1472575 + a1a0652 commit 85b8751

File tree

1 file changed

+47
-1
lines changed

1 file changed

+47
-1
lines changed

.github/workflows/main.yml

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,41 @@ jobs:
4242
name: coverage
4343
path: .coverage.*
4444

45+
test_aarch64_linux:
46+
name: Test (${{ matrix.python.os }}, ${{ matrix.python.python-version }}, aarch64)
47+
runs-on: ${{ matrix.python.os }}
48+
strategy:
49+
matrix:
50+
python:
51+
- {os: ubuntu-latest, python-version: 3.6, pyver: py36}
52+
- {os: ubuntu-latest, python-version: 3.7, pyver: py37}
53+
- {os: ubuntu-latest, python-version: 3.8, pyver: py38}
54+
- {os: ubuntu-latest, python-version: 3.9, pyver: py39}
55+
- {os: ubuntu-latest, python-version: "3.10", pyver: py310}
56+
env:
57+
py: python${{ matrix.python.python-version }}
58+
steps:
59+
- name: Checkout
60+
uses: actions/checkout@v2
61+
- name: Set up QEMU
62+
id: qemu
63+
uses: docker/setup-qemu-action@v1
64+
- name: Test with tox
65+
run: |
66+
docker run --rm -v ${{ github.workspace }}:/io:rw --workdir=/io \
67+
arm64v8/ubuntu \
68+
bash -exc 'apt-get update && \
69+
apt install software-properties-common -y && \
70+
add-apt-repository ppa:deadsnakes/ppa -y && \
71+
apt install -y ${{ env.py }} && \
72+
apt install -y ${{ env.py }}-venv && \
73+
${{ env.py }} -m venv .env && \
74+
source .env/bin/activate && \
75+
pip install -U pip wheel setuptools && \
76+
pip install tox tox-gh-actions && \
77+
tox -e ${{ matrix.python.pyver }} && \
78+
deactivate'
79+
4580
test_macos:
4681
name: Test (${{ matrix.os }}, ${{ matrix.python-version }})
4782
runs-on: ${{ matrix.os }}
@@ -187,18 +222,28 @@ jobs:
187222
path: dist/*.whl
188223

189224
bdist_wheel:
190-
name: Build wheels (3.6+) on ${{ matrix.os }}
225+
name: Build wheels (3.6+) on ${{ matrix.os }} for ${{ matrix.arch }}
191226
needs:
192227
- test_linux
228+
- test_aarch64_linux
193229
- test_macos
194230
- test_windows_py27
195231
- test_windows
196232
runs-on: ${{ matrix.os }}
197233
strategy:
198234
matrix:
199235
os: [ubuntu-latest, windows-latest, macos-latest]
236+
arch: [auto]
237+
include:
238+
- os: ubuntu-latest
239+
arch: aarch64
240+
- os: macos-latest
241+
arch: arm64
200242
steps:
201243
- uses: actions/checkout@v2
244+
- name: Set up QEMU
245+
if: ${{ matrix.arch == 'aarch64' }}
246+
uses: docker/setup-qemu-action@v1
202247
- name: Build wheels
203248
uses: pypa/[email protected]
204249
with:
@@ -207,6 +252,7 @@ jobs:
207252
WRAPT_INSTALL_EXTENSIONS: true
208253
CIBW_SKIP: pp*
209254
CIBW_BUILD_VERBOSITY: 1
255+
CIBW_ARCHS: ${{ matrix.arch }}
210256
- uses: actions/upload-artifact@v2
211257
with:
212258
name: dist

0 commit comments

Comments
 (0)