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

ci: Build linux aarch64 wheels on release #315

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 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
27 changes: 26 additions & 1 deletion .github/workflows/wheel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@ on: [push, pull_request]

jobs:
build_wheels:
name: Build wheel on ${{ matrix.os }}
name: Build wheel on ${{matrix.arch}} for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
arch: [auto]
include:
- os: ubuntu-latest
arch: aarch64
env:
CIBW_ARCHS_LINUX: ${{matrix.arch}}
CIBW_TEST_COMMAND: pytest --pyargs numcodecs
CIBW_TEST_REQUIRES: pytest
CIBW_SKIP: "pp*"
Expand All @@ -24,6 +29,26 @@ jobs:

- uses: pypa/[email protected]

- uses: docker/setup-qemu-action@v1
if: ${{ matrix.arch == 'aarch64' }}
name: Set up QEMU

- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==1.8.0 wheel
Copy link
Member

@jakirkham jakirkham Apr 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this pinning or could this be dropped?

Note: We are using the cibuildwheel action above. Maybe there is some way to consolidate this work into that step (possibly through additional configuration options)?


- name: Build wheel for aarch64
if: ${{ matrix.arch == 'aarch64' }}
env:
CIBW_ENVIRONMENT: 'DISABLE_NUMCODECS_AVX2=1 DISABLE_NUMCODECS_SSE2=1'
run: |
python -m cibuildwheel --output-dir wheelhouse

- name: Build wheel
if: ${{ matrix.arch != 'aarch64' }}
run: |
python -m cibuildwheel --output-dir wheelhouse

- uses: actions/upload-artifact@v1
with:
name: wheels
Expand Down
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os
from setuptools import setup, Extension
import cpuinfo
import platform
import sys
from distutils.command.build_ext import build_ext
from distutils.errors import CCompilerError, DistutilsExecError, \
Expand All @@ -28,6 +29,8 @@
if have_cflags:
# respect compiler options set by user
pass
elif platform.machine() == 'aarch64':
pass
elif os.name == 'posix':
if disable_sse2:
base_compile_args.append('-mno-sse2')
Expand Down