-
Notifications
You must be signed in to change notification settings - Fork 153
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 arm64 Docker image #115
Build arm64 Docker image #115
Conversation
Hard-code tag for testing Fix Docker image name Attempt to build multi-arch image Free up runner disk space and disable Docker parallelism Attempt to build arm64 image only Test build on BuildJet arm64 runner Attempt to build images on native runners Remove duplicate 'runs-on' key Fix YAML syntax error Check ghcr.io login first Fix another YAML syntax issue This better work... Run build only on tags
@mmzx mentioning you in case GitHub doesn't send notifications for PRs. 😅 |
ee1d784
to
0fdcdb8
Compare
I think we can do this! Thank you! |
@mmzx Any idea when the next Erd release might be available to include these changes? I'm just looking for a rough idea when I can start integrating this in downstream projects. ✌🏻 |
@mmzx I noticed the CI build job failed after merging these changes. Adding this step at the beginning of the workflow should resolve the repository naming issue seen here:
And then use For the other job that failed on the BuildJet runner, you'll have to set up BuildJet on your account here. If this is an issue because @BurntSushi is the repo owner and it can only be done by him, I may have to build and publish the images in my fork instead. |
Hey @mmzx, is this still something you'd be willing to look into? |
Builds and tests a multi-architecture Docker image for both
linux/amd64
andlinux/arm64
platforms as discussed in this comment and in #114. This allows ARM-based machines to run the image natively with no emulation.This includes the following changes:
linux/amd64
andlinux/arm64
images on dedicated native runners. The typical "low-effort" QEMU-based approach to building multi-arch images is not possible in this case due to memory constraints with the free GitHub runners, so the changes in this PR rely on a 3rd-party integration with BuildJet to provide the nativearm64
runner. BuildJet provides $5 of free runner time to get started, which equates to $5 / $0.008 = 625 minutes total with the runner I chose (see pricing info). Each build takes about 15 minutes, so I don't anticipate this project needing to spend any money whatsoever on this for the forseeable future. They also didn't collect credit card information from me when I signed up, so there's no danger of being accidentally charged.examples/nfldb.er
diagram and stores the resulting PNG as an artifact for review.haskell:8-slim
, which is about half the size ofhaskell:8
(341MB vs 635MB).I appreciate that this reliance on a 3rd party is far from optimal and fully understand if the decision is made to reject this PR. The only two other viable approaches to build multi-archecture binaries would be to:
arm64
runner.amd64
runners. This is apparently quite complex to do with Haskell and beyond the effort I'm willing to contribute.Closes #40
Closes #114