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

Build aarch64 wheels #639

Closed
wants to merge 1 commit into from
Closed
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
41 changes: 30 additions & 11 deletions .github/workflows/create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
CIBW_REPAIR_WHEEL_COMMAND_MACOS: ''
strategy:
matrix:
os: ['ubuntu-latest', 'windows-latest', 'macos-latest']
os: ['windows-latest', 'macos-latest']
architecture: ['x64']
include:
- os: windows-latest
Expand All @@ -25,9 +25,18 @@ jobs:
cibw_skip: '*-win32'
- os: ubuntu-latest
architecture: 'x64'
cibw_skip: '*-manylinux_i686'
cibw_archs: 'x86_64'
- os: ubuntu-latest
architecture: 'aarch64'
cibw_archs: aarch64
runs-on: ${{ matrix.os }}
steps:
- name: Set up QEMU for aarch64 wheels
if: ${{ matrix.cibw_archs == 'aarch64' }}
uses: docker/setup-qemu-action@v1
with:
platforms: arm64

- name: Checkout pyjnius
uses: actions/checkout@v3

Expand All @@ -47,9 +56,21 @@ jobs:
distribution: 'temurin'
architecture: ${{ matrix.architecture }}

- name: Build wheels
- name: Build Windows and MacOS wheels
if: ${{ matrix.os != 'ubuntu-latest' }}
env:
CIBW_SKIP: '*musllinux* ${{ matrix.cibw_skip }}'
run: python -m cibuildwheel --output-dir dist

- name: Build and test Linux wheels
if: ${{ matrix.os == 'ubuntu-latest' }}
env:
CIBW_SKIP: '*musllinux* ${{ matrix.cibw_skip }}'
CIBW_ARCHS: '${{ matrix.cibw_archs }}'
CIBW_TEST_REQUIRES: 'pytest'
CIBW_TEST_EXTRAS: 'dev,ci'
CIBW_BEFORE_TEST: 'yum install ant -y && cd {project} && ant all'
CIBW_TEST_COMMAND: 'cd {project}/tests/ && CLASSPATH=../build/test-classes:../build/classes python -m pytest -v'
run: python -m cibuildwheel --output-dir dist

- name: upload wheels
Expand Down Expand Up @@ -88,16 +109,14 @@ jobs:
continue-on-error: true
strategy:
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
os: ['macos-latest', 'windows-latest']
python: ['3.7', '3.8', '3.9', '3.10', 'pypy-3.7', 'pypy-3.8', 'pypy-3.9']
include:
# We may would like to introduce tests also on windows-latest on x86 (win32 wheels)?
- os: windows-latest
architecture: 'x64'
- os: macos-latest
architecture: 'x64'
- os: ubuntu-latest
architecture: 'x64'
- os: apple-silicon-m1
architecture: 'aarch64'
python: '3.8.13'
Expand Down Expand Up @@ -145,11 +164,11 @@ jobs:
arm64_set_path_and_python_version ${{ matrix.python }}
ant all

- name: Build test-classes via ant (Linux, Windows)
if: (matrix.os == 'ubuntu-latest') || (matrix.os == 'windows-latest')
- name: Build test-classes via ant (Windows)
if: matrix.os == 'windows-latest'
run: ant all

- name: Install pyjnius wheel + test prerequisites (Windows, Linux, macOS x64)
- name: Install pyjnius wheel + test prerequisites (Windows, macOS x64)
if: matrix.os != 'apple-silicon-m1'
run: python -m pip install --find-links=dist pyjnius[dev,ci]

Expand All @@ -160,8 +179,8 @@ jobs:
arm64_set_path_and_python_version ${{ matrix.python }}
python -m pip install --find-links=dist pyjnius[dev,ci]

- name: Test wheel (Linux, macOS x64)
if: (matrix.os == 'ubuntu-latest') || (matrix.os == 'macos-latest')
- name: Test wheel (macOS x64)
if: matrix.os == 'macos-latest'
run: |
cd tests
CLASSPATH=../build/test-classes:../build/classes python -m pytest -v
Expand Down