Use native Linux ARM runners for ARM 64-bit builds #94
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The build workflows generate ARM 64-bit builds of the application for Linux, macOS, and Windows hosts. When those builds are performed in the x86 "ubuntu-latest" runner machine, they fail due to incompatibility between the Docker container in which the builds are performed and the runner architecture:
The established solution (arduino/arduino-cli#2850, arduino/arduino-cli#2896, arduino/arduino-cli#3007, arduino/arduino-lint#952) for this problem is to instead use the Linux ARM "ubuntu-24.04-arm" runner machine for those
builds:
The builds can be performed on this runner due to it having the required host architecture for compatibility
with the build containers.
Previously (#93), an alternative solution was used in this project: using QEMU to emulate the required host architecture. That
solution was inferior in multiple ways:
Regarding the latter, here are the durations of the build job of the "Publish Tester Build" workflow, for the QEMU based approach implemented by #93 and the native approach proposed by this pull request:
main(s)The durations are the averaged of two separate runs of each workflow, interleaved. This was done to reduce the possible influence of transient conditions on the results. The deviation between runs of each variant of the workflow was not significant.
For this reason, it is here proposed that the workflow be ported to using the appropriate runner machine for the ARM 64-bit build jobs instead of depending on QEMU.
Additional context
It is standard practice to use the "latest" GitHub Actions runner identifiers in the project's workflows, which causes the workflow runs to always use the newest stable runner version. However, GitHub has broken from this established convention by choosing to not provide "latest" identifiers for the Linux ARM runners (actions/partner-runner-images#118 (comment)). For this reason, the version-specific runner name was used in the workflow. It will be necessary to manually update the runner name as new stable versions are made available (or more likely fail to do so until forced after GitHub's removal of the runner in use breaks the workflows).