Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

WIP: build aarch64 wheels on release branches #14016

Closed
wants to merge 10 commits 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
26 changes: 25 additions & 1 deletion .github/workflows/release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,28 +95,52 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04, macos-10.15]
emulate_aarch64: [false, true]
# is_pr is a flag used to exclude certain jobs from the matrix on PRs.
# It is not read by the rest of the workflow.
is_pr:
- ${{ startsWith(github.ref, 'refs/pull/') }}

exclude:
# Don't build macos wheels on PR CI.
- is_pr: true
os: "macos-10.15"
# Don't build aarch64 wheels on mac.
- os: "macos-10.15"
emulate_aarch64: true
# Don't build aarch64 wheels on PR CI.
- is_pr: true
emulate_aarch64: true

steps:
- name: Debug
run: echo '${{ toJSON(matrix) }}'

- uses: actions/checkout@v3

- uses: actions/setup-python@v3

- name: Set up QEMU to emulate arm64
if: matrix.emulate_aarch64
uses: docker/setup-qemu-action@v2
with:
platforms: arm64

- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.9.0 poetry==1.2.0

# Only build a single wheel in CI.
- name: Set env vars.
- name: "Env: build single wheel for CI"
run: |
echo "CIBW_BUILD="cp37-manylinux_x86_64"" >> $GITHUB_ENV
if: startsWith(github.ref, 'refs/pull/')

# Only build a single wheel in CI.
- name: "Env: build aarch64 wheels"
run: |
echo "CIBW_ARCHS_LINUX=aarch64" >> $GITHUB_ENV
Copy link
Contributor

@MichaIng MichaIng Oct 10, 2022

Choose a reason for hiding this comment

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

@DMRobertson
The build failed since x86 and aarch64 flags seems to have been mixed. Did you try to replace CIBW_BUILD accordingly?

Suggested change
echo "CIBW_ARCHS_LINUX=aarch64" >> $GITHUB_ENV
echo "CIBW_ARCHS_LINUX=aarch64" >> $GITHUB_ENV
sed -i '/^CIBW_BUILD=/c\CIBW_BUILD=cp37-manylinux_aarch64' $GITHUB_ENV

if: matrix.emulate_aarch64

- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Tests
on:
push:
branches: ["develop", "release-*"]
pull_request:
# pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
1 change: 1 addition & 0 deletions changelog.d/14016.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Build wheels for ARM (aarch64) on release branches.