Skip to content

CI: build statically linked Linux arm64 binaries #6098

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

Merged
merged 2 commits into from
Mar 26, 2023

Conversation

cknitt
Copy link
Member

@cknitt cknitt commented Mar 26, 2023

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 to

  • macOS x64
  • macOS arm64
  • Linux x64 (statically linked)
  • Linux arm64 (statically linked)
  • Windows x64

For 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.

@cknitt cknitt force-pushed the aarch64 branch 4 times, most recently from b5277db to 33a3124 Compare March 26, 2023 07:26
@cknitt cknitt force-pushed the aarch64 branch 7 times, most recently from efeb3c9 to ce85897 Compare March 26, 2023 13:10
@cknitt cknitt marked this pull request as ready for review March 26, 2023 19:22
@cknitt cknitt requested review from cristianoc and ryyppy March 26, 2023 19:22
@cristianoc
Copy link
Collaborator

Seems unlikely a test would fail only on linux64. I guess there's no need to add anything.

@cristianoc cristianoc merged commit 3d810f2 into rescript-lang:master Mar 26, 2023
@cknitt cknitt deleted the aarch64 branch March 28, 2023 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants