-
Notifications
You must be signed in to change notification settings - Fork 91
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 #563
base: main
Are you sure you want to change the base?
Build aarch64 wheels #563
Conversation
b0591df
to
4788c35
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #563 +/- ##
=======================================
Coverage 99.92% 99.92%
=======================================
Files 62 62
Lines 2761 2761
=======================================
Hits 2759 2759
Misses 2 2 |
182007e
to
31ee5d5
Compare
689c3e4
to
ebccd68
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks David! 🙏
Agree this is a good idea. Had a few questions below
elif os.name == 'posix' and os.uname()[4] != 'aarch64': | ||
# These flags aren't recognised by gcc on aarch64 | ||
# (at least when we build the aarch64 wheens on GitHub actions) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
elif os.name == 'posix' and os.uname()[4] != 'aarch64': | |
# These flags aren't recognised by gcc on aarch64 | |
# (at least when we build the aarch64 wheens on GitHub actions) | |
elif os.name == 'posix' and os.uname()[4] != 'aarch64': | |
# These instructions are not available on `aarch64`. | |
# So there is no need to disable them as they won't show up there. |
CIBW_SKIP: "pp* *-musllinux_* *win32 *_i686 *_s390x" | ||
CIBW_ARCHS_MACOS: native | ||
CIBW_ARCHS_WINDOWS: native | ||
CIBW_ARCHS_LINUX: "x86_64 aarch64" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So will this build both Linux wheels in the same job?
@@ -18,14 +30,25 @@ jobs: | |||
env: | |||
CIBW_TEST_COMMAND: python -c "import numcodecs" | |||
CIBW_BUILD: "cp310-* cp311-* cp312-* cp313-*" | |||
CIBW_SKIP: "pp* *-musllinux_* *win32 *_i686 *_s390x" | |||
CIBW_ARCHS_MACOS: native | |||
CIBW_ARCHS_WINDOWS: native |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to try the same thing for Windows ARM?
CIBW_ARCHS_WINDOWS: native | |
CIBW_ARCHS_WINDOWS: "AMD64 ARM64" |
Basing this off this doc
@@ -18,14 +30,25 @@ jobs: | |||
env: | |||
CIBW_TEST_COMMAND: python -c "import numcodecs" | |||
CIBW_BUILD: "cp310-* cp311-* cp312-* cp313-*" | |||
CIBW_SKIP: "pp* *-musllinux_* *win32 *_i686 *_s390x" | |||
CIBW_ARCHS_MACOS: native |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think we want to make sure we are building for x86_64
(native I believe) and arm64
(for M1, M2, etc.). Both we already build for. So it would be good to continue supporting them
CIBW_ARCHS_MACOS: native | |
CIBW_ARCHS_MACOS: "x86_64 arm64" |
- name: Restrict number of wheel builds on PRs | ||
if: ${{ !env.BUILD_ALL }} | ||
run: | | ||
echo "CIBW_BUILD=cp310-win_amd64 cp311-manylinux_x86_64 cp312-macosx_x86_64 cp312-macosx_arm64" >> $GITHUB_ENV |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add Python 3.13 in this list? Perhaps using the other macOS build?
echo "CIBW_BUILD=cp310-win_amd64 cp311-manylinux_x86_64 cp312-macosx_x86_64 cp312-macosx_arm64" >> $GITHUB_ENV | |
echo "CIBW_BUILD=cp310-win_amd64 cp311-manylinux_x86_64 cp312-macosx_x86_64 cp313-macosx_arm64" >> $GITHUB_ENV |
env: | ||
# Build all wheels on either: | ||
# - tagged release | ||
# - pull request opened with "test all wheels" label | ||
# - pull requests when "test all wheels" label is added | ||
BUILD_ALL: | | ||
${{ | ||
(github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')) | ||
|| contains(github.event.pull_request.labels.*.name, 'test all wheels') | ||
|| (github.event.action == 'labeled' && github.event.label.name == 'test all wheels') | ||
}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok so in this case we are relying on maintainers to add the label for the wheel builds
Is it worth considering an option users can opt-in with? Like commit message text or PR title?
ebccd68
to
e590abd
Compare
Any thoughts on my comments above? |
Sorry, I've been distracted by other stuff - thanks for the comments, will try and get round to this soon! |
This PR:
aarch64
to this list for linux buildsThis speeds up runs on PRs, but allows the flexibiility of doing a full run of wheel building if needed by adding the label.
Fixes #312, fixes #288, and an updated version of #315
TODO: