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 build support #289

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
19 changes: 18 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: "*27* pp* *35*"
Expand All @@ -27,11 +32,23 @@ jobs:
with:
python-version: '3.9'

- 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

- name: Build wheel for aarch64
if: ${{ matrix.arch == 'aarch64' }}
env:
CIBW_ENVIRONMENT: 'DISABLE_NUMCODECS_AVX2=1 DISABLE_NUMCODECS_SSE2=1'
Copy link
Member

Choose a reason for hiding this comment

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

Could these have also be set in the setup.py rather than passing? Just wondering if having a single place to look would prevent future issues.

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
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