Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add linux aarch64 wheel support #183

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,46 @@ jobs:

- name: Tests
run: pytest --cov=h3 --full-trace

test-arm64:
name: "Test ${{ matrix.pyver }} aarch64"
strategy:
matrix:
pyver: [cp36-cp36m, cp37-cp37m, cp38-cp38, cp39-cp39]
fail-fast: false
runs-on: ubuntu-latest
env:
py: /opt/python/${{ matrix.pyver }}/bin/python
img: quay.io/pypa/manylinux2014_aarch64
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Checkout submodules
run: |
git submodule init
git submodule update
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v1
- name: Install tools
run: |
docker run --rm -v ${{ github.workspace }}:/ws:rw --workdir=/ws \
${{ env.img }} ${{ env.py }} -m pip install -U pip build
- name: Install dependencies
run: |
docker run --rm -v ${{ github.workspace }}:/ws:rw --workdir=/ws \
${{ env.img }} \
bash -exc '${{ env.py }} -m pip install virtualenv && ${{ env.py }} -m venv .env && \
source .env/bin/activate && \
python -m pip install --upgrade pip && \
deactivate'
- name: Test with pytest
run: |
docker run --rm -v ${{ github.workspace }}:/ws:rw --workdir=/ws \
${{ env.img }} \
bash -exc '\
source .env/bin/activate && \
pip install --upgrade pip setuptools wheel && \
pip install .[all] && \
pytest --cov=h3 --full-trace && \
deactivate'
52 changes: 52 additions & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,55 @@ jobs:
TWINE_PASSWORD: ${{ secrets.pypi_password }}
run: |
twine upload wheelhouse/*

arm64_make_wheels:
name: build aarch64 wheel
runs-on: [ubuntu-latest]
strategy:
matrix:
python_tag: [ "cp36-*", "cp37-*", "cp38-*", "cp39-*"]

steps:

## Setup Env

- uses: actions/checkout@v2.3.3
with:
submodules: recursive

- uses: actions/setup-python@v2
with:
python-version: 3.8

- uses: docker/setup-qemu-action@v1
name: Set up QEMU

- name: Install cibuildwheel
run: pip install --upgrade cibuildwheel

- name: Build Linux
env:
CIBW_ARCHS_LINUX: aarch64
CIBW_BUILD: ${{matrix.python_tag}}
run: |
python -m cibuildwheel --output-dir wheelhouse
## Upload

- name: Check with Twine
run: |
pip install --upgrade twine
twine check wheelhouse/*
- name: Upload artifacts to GitHub
if: github.event_name == 'release'
uses: actions/upload-artifact@v2
with:
name: wheels
path: ./wheelhouse

- name: Release to PyPI
if: github.event_name == 'release' && github.event.action == 'published'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.pypi_password }}
run: |
twine upload wheelhouse/*