-
Notifications
You must be signed in to change notification settings - Fork 34
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
Support ARM64 and simplify GitHub Action for building OCI images #37
Conversation
6486f46
to
26da254
Compare
Can I recommend due to the length of job we also configure a concurrency expression? https://docs.github.com/en/actions/using-jobs/using-concurrency |
Are you referring to lowering the number of parallel jobs running at the same time? |
looks like the slowness is mainly coming from QEMU's emulation. We can disable arm64 builds on PRs and only enable it for master just like how they did it here: DSpace/DSpace#8315 |
731c2ce
to
4c858dc
Compare
I like this solution, happy to implement. |
No, concurrency will group jobs together which are the same and can allow push to cancel previous in-process jobs in order to save runner minutes. |
5ff7d82
to
c6d3163
Compare
@Matthew-Beckett I did some tweaks like reordering the layers to achieve more caching. Somehow the builds now finish in 2-3 minutes for both architectures. Can you please review my changes and check if we are really building both platforms :D because it sounds too good to be true. |
It would appear it is in fact too good to be true, when checking the package in the GitHub UI you can see that the ARM and AMD64 commit hashes have diverged and are not on the same commit, also in the logs of the last run I don't see any linux/arm64 docker build only linux/amd64. I don't think it's working properly. |
59062ba
to
065e35b
Compare
b945469
to
e6865de
Compare
@Matthew-Beckett I got it working! I reworked the builds. latest run only took 6 minutes! The speed bump is coming from not using emulation to build arm64 binaries. Currently i'm building the arm64 binaries over amd64 images. the changes are inspired from: https://www.docker.com/blog/faster-multi-platform-builds-dockerfile-cross-compilation-guide/ |
fixes #20 |
This PR adds QEMU and configures docker buildx to use an ARM64 emulation on AMD64 to build ARM64 targeted images on AMD64 runners.