-
-
Notifications
You must be signed in to change notification settings - Fork 230
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 main image #1487
Build arm64 main image #1487
Conversation
Could you please rebase on main? Thanks! |
c2364ad
to
5e9964b
Compare
The images are building locally but I've been running into several issues with the CI:
The full pipeline now takes over an hour because it has to build both |
Indeed 🙀
We were already close to the GitHub runner limit and I guess adding the arm64 build tipped the balance. Also it might be possible to reduce the parallelization of
|
d36bb7b
to
a161e3a
Compare
I've defined a nightly CI workflow that will build the multi-arch images and also split up the @ggrossetie I couldn't figure out where the 2000ms timeout is defined for these tests. Is there a global config somewhere? I think that the problem would be resolved by increasing the timeout slightly, because running the |
I believe this is the default value of Mocha but you can override it using Lines 14 to 15 in b039f17
|
After resolving the parallelism issues (I think), I've now encountered issues with running out of disk space on the runners. For now I'm trying to run this action at the start of the workflow, and I'll see if that fixes things. @ggrossetie Please let me know if you'd like me to stop this; I don't want to waste all your CI minutes. 🙃 |
This is now good to go from my side. I've updated the PR description above with the main changes. I tested both regular (native-arch) and multi-arch CI workflows manually in the two last commits. Nightly and release builds are multi-arch, regular builds are native-arch. |
@felixvanoost perfect, I will take a closer look this weekend 👍🏻 |
I will try to build the arm64 image on an Ampere A1 Compute machine. I heard that QEMU is ~20 times slower. |
Also, in the next version we will use UMLet and PlantUML as native images (using GraalVM). So we need to produce arm64 compatible native images. |
.github/workflows/main.yaml
Outdated
- name: Free up disk space | ||
uses: jlumbroso/free-disk-space@main | ||
with: | ||
android: true | ||
dotnet: true | ||
haskell: true | ||
large-packages: true | ||
swap-storage: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should use a condition to use this action only if build_multiarch
is true
.github/workflows/main.yaml
Outdated
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
with: | ||
config-inline: | | ||
[worker.oci] | ||
max-parallelism = 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here,we should set max-parallelism to 2 when build_multiarch
is true
Thanks for all your great work @felixvanoost 🙌🏻 |
My pleasure! |
Co-authored-by: Guillaume Grossetie <[email protected]>
@ggrossetie A native QEMU is now only being used for D2, Pikchr, Mermaid, Wireviz, Blockdiag, and to put together the main Kroki image. Of those, D2, Pikchr, and Mermaid can most likely be cross-compiled with some additional effort. |
@felixvanoost I get the following errors when building images:
Not sure if it means that the disk is full or if the latest version of buildx has a bug...? Does this error sound familiar? |
Apparently, when something is failing it throws this error but this is not the root cause |
I've never experienced this before. Is this happening directly in the workflow? Update: The latest |
@felixvanoost thanks for you're porting kroki (of which I'm ever grateful @ggrossetie) to arm64!! Cheers, |
Builds an
arm64
variant of the main Kroki Docker image by leveraging the changes introduced in #1476. All images should now natively support the ARM architecture. This includes the following changes:nightly
workflow to build the multi-arch images every night at 02:00 UTC.