-
Notifications
You must be signed in to change notification settings - Fork 749
Use ARM runners for CPython and Numpy #1609
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
base: master
Are you sure you want to change the base?
Use ARM runners for CPython and Numpy #1609
Conversation
Sounds good, but why are the CI actions not running? 🤔 |
Ok, the formatting of the workflows was incorrect. Now it still fails, so anyway please fix it! |
The numpy workflow seems to have failed because the ubuntu image has the wrong sources.list for apt, ARM64 packages are hosted at |
It seems the github action tries to workaround an Actions issue by selecting a mirror, but the mirror selected is the
|
Appears to be a problem with javacpp-presets/.github/actions/deploy-ubuntu/action.yml Lines 84 to 85 in 754110d
|
Ok, so could you try to fix it? |
If I remember correctly, the checks for "amd64" is to detect cross compilation, so we should be able to skip all that when running actually running on ARM... |
…t/javacpp-presets into numpy-arm-no-cross
I've attempted a fix by simply disabling mirror selection for arm64 runners |
Hmm, both runs failed again, with an error on fallocate... I do see that the fallocate command is being used to create a 4GB swap file, but I can't imagine the arm64 runners would be so resource constrained that they can't allocate an additional 4GB on the filesystem...
I've pushed a new commit that just disables the fallocate call, but it didn't seem to change anything. I'll revert that commit and continue looking for the cause of the error |
To test the actions, you'll need to change temporarily the workflows to point to your branch |
if [[ ! "$ARCH" == "amd64" ]]; then | ||
# arm64 runners don't work with apt-spy2, | ||
# the selected mirrors don't have arm64 binaries | ||
if [[ ! "$ARCH" == "amd64" && ! "$ARCH" == "arm64" ]]; then |
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.
We need this when cross compiling though. Please disable it only when we're running on ARM
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.
Will do
Yeah I figured that out, been playing whackamole with some more issues on a different branch of mine. Slowly getting there |
This PR enables ARM builds for CPython and Numpy by using the Github Actions ARM runners. It also makes minor changes to the
cppbuild.sh
scripts for both to fix compilation issues on ARM. For numpy, this entailed removing the workaround implemented in #1386.Note
I made the minimal changes necessary to fix ARM compilation. This means that the cpython build still essentially does cross-compilation to target ARM even when running on ARM hosts. It may be desirable to add a check for whether the target and host platforms match to improve build times.
The cpp build was verified to succeed on a Raspberry Pi 4, I have not yet verified full end-to-end success via maven due to a missing dependency on the pi.