CI: build statically linked Linux arm64 binaries #6098
Merged
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.
This PR adds building Linux arm64 binaries to the CI process. Like the Linux x64 binaries, these are statically linked and therefore need to be built in an Alpine-based Docker container. For this, I extended the Docker image used for CI (https://github.com/rescript-lang/docker-rescript-ci-build) to be multi-platform (x64 + arm64).
As GitHub Actions currently does not provide an ARM-based Linux runner and running in QEMU is too slow, the Linux arm64 builds are performed on a BuildJet ARM 2 vCPU runner. The costs for that runner are covered by the ReScript Association as set up by @ryyppy.
This extends the list of supported platforms for which pre-built binaries are included in the
rescript
npm package toFor the moment, only the final "installation tests" with the finished npm package are run for Linux arm64. To get the other tests to run, too, further refactoring of the build process will be needed because following the same process as for the other platforms currently fails due to an error in
setup-ocaml
.I think this is good enough for now though. I am still planning further refactoring of the build process, but I would like to wait with that until the runtime and test sources are fully converted to .res syntax as that should simplify a lot of things.