Skip to content
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

ci: add basic multiarch build #663

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

no2chem
Copy link

@no2chem no2chem commented Sep 8, 2023

This PR adds a basic multiarch build, modifying the containers.yml pipeline to build both linux/amd64 and linux/arm64 images using buildx.

QEMU is used to perform the multiarch build on arm64, since Github runners don't support CI yet. This could be potentially slow. If it is, we could modify the Dockerfile to use $TARGETARCH vars and direct the compilers to cross-compile instead.

Signed-off-by: Michael Wei <michael@wei.email>
@lalithsuresh
Copy link
Collaborator

lalithsuresh commented Sep 8, 2023

Thanks @no2chem. Could you attempt a build and let us know how fast it runs? Last time I tried it it was painfully slow but I didn't spend much time on it either.

@no2chem
Copy link
Author

no2chem commented Sep 8, 2023

Hm, if you think it's going to be painfully slow I can take a few minutes to modify the dockerfile to cross-compile instead. I know rustc is definitely slow in qemu.

@lalithsuresh
Copy link
Collaborator

lalithsuresh commented Sep 8, 2023

What I recall trying was using docker build with --platform linux/amd64,linux/aarch64, which is what I think the CI configuration you shared would do. I ran it on Apple Silicon, so maybe this runs better on x86.

@no2chem
Copy link
Author

no2chem commented Sep 8, 2023

Yeah more or less. I added multiarch cross-compile to the dockerfile so hopefully it works, just running it locally, will let you know if it works after I come back from lunch

Also, node 19.x I guess is deprecated, it causes a 60 second wait displaying a warning, might be worth updating it to 20 if it doesn't break anything for you.

Signed-off-by: Michael Wei <michael@wei.email>
@no2chem
Copy link
Author

no2chem commented Sep 8, 2023

Okay, I added a cross compiling dockerfile which seems to work. I don't know how long it'll add to your build pipeline because I can't run it, but it appears to complete in a reasonable amount of time for me locally.

gz added a commit that referenced this pull request Sep 10, 2023
Before we used a script that is now deprecated. They also
added a 60s deprecation warning to that script as reported
by @no2chem in #663.

This updates to the recommended method described
here: https://github.com/nodesource/distributions#ubuntu-versions

Signed-off-by: Gerd Zellweger <mail@gerdzellweger.com>
gz added a commit that referenced this pull request Sep 10, 2023
Before we used a script that is now deprecated. They also
added a 60s deprecation warning to that script as reported
by @no2chem in #663.

This updates to the recommended method described
here: https://github.com/nodesource/distributions#ubuntu-versions

Signed-off-by: Gerd Zellweger <mail@gerdzellweger.com>
gz added a commit that referenced this pull request Sep 13, 2023
Before we used a script that is now deprecated. They also
added a 60s deprecation warning to that script as reported
by @no2chem in #663.

This updates to the recommended method described
here: https://github.com/nodesource/distributions#ubuntu-versions

Signed-off-by: Gerd Zellweger <mail@gerdzellweger.com>
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.

None yet

2 participants