-
Notifications
You must be signed in to change notification settings - Fork 99
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
Add build support for arm64-linux #1055
base: main
Are you sure you want to change the base?
Conversation
Adds support for arm64-linux. Uses buildx to build multi-platform image. Spawned by: googleforgames#611
/gcbrun |
1 similar comment
/gcbrun |
Was |
Yeah, it works on my machine ™️ . I build on an apple m2 pro with docker-desktop. I noticed that the error messages complains about building
|
…lation issue with Ring
/gcbrun |
Added setting CC explicitly, as suggested by briansmith/ring#2127. |
I'm new to the Rust eco-system so I'm mainly searching the internet to find people who's had similar issues. |
/gcbrun |
Ah fun, so you would be building on ARM, and Cloud Build is building on Intel. My suggestion would be to add the package quilkin/build/build-image/Dockerfile Lines 28 to 31 in 00345be
Which should give the system what it needs, when it says:
|
Gotcha. Let's test this version then! |
/gcbrun |
|
Updated PR to use docker-container as build driver. However, according to docs,
Docs for
=> does not seem to work for multi-arch images. So we perhaps need to restructure a bit to push directly, or configure some other reasonable output. Any thoughts on this? |
In my experience the multi arch image is stored temporarily in the build cache, so a subsequent |
/gcbrun |
Well it built! But the image could not be found after the fact. |
Well, it's progress at least! And I see in the logs that it build for both architectures, so that's nice. |
/gcbrun |
Restructured test-agones to require build-image directly since it's already doing the pushing.
/gcbrun |
So it successfully built, but the image uploaded to CI doesn't look multi arch to me.
|
No, I concur. One of the other manifests uploaded to the registry at the same time do have different entries for arm64 and amd64:
I'm trying to figure out what more needs to be done. Just to make sure, I've tried to run the image created on arm64 and it does not work. |
It does work to run on arm64 if I explicitly use a different manifest-file, the one I referred to above. So need to figure out why the manifests get messed up.
|
/gcbrun |
Seeing the same result unfortunately
|
Thanks for running the gcbruns for me on this PR, I'll investigate further where the problem is. |
Minor fix for quoting issue on package_version
/gcbrun |
/gcbrun |
Build Succeeded 🥳 Build Id: 68ec68b6-20ee-4397-88af-36d008f94c96 The following development images have been built, and will exist for the next 30 days: To build this version:
|
Is this now a working build and deploy ready for merging? Happy to jump in and take a look if not. |
@maggie44 Thanks for the ping! It's not ready for merging yet. What happens is that the manifest list is created and it's populated with the arm64 and amd64 builds. However, in the repository, the manifest list image isn't tagged, but instead one of the arm64/amd64 images is tagged. I haven't figured out why. On my local machine, I've run the |
I see there were a few attempts at different versions, did we try using buildx to build, tag and push in one?
This should generate the relevant manifests and push both architecture images and manifest all at once. I think the missing step might be the tagging of the manifest file, which should be done by the above. |
Yes, that didn't work because the driver didn't support the multiplatform part in |
Creating and enabling the driver first?
|
Yes, it's been tried and it ended up with the manifest list being wrongly tag. The explicit creation of manifest list was created in the hopes of fixing that problem, but we've ended up in the same situation. (also, usual caveats, I might have stumbled earlier and the proposed solution might work, but as far as I know, it's been tested) |
I wonder how the makefile is called. It seems the modification was made to the Line 186 in 0aa6b83
So the makefile |
How about separating the steps. Build stays as build was before and builds for the local environment (which it will choose automatically). And then add a
There is some value in doing the build from source for a deploy anyway, especially when using tagged GitHub commits. I see the challenge @kaboing, without access to the runners it’s hard to debug it. |
Adds support for arm64-linux.
Uses buildx to build multi-platform image.
Spawned by: #611
What type of PR is this?
/kind feature
What this PR does / Why we need it:
Adds support for arm64/linux. Builds multi-platform using buildx.
Which issue(s) this PR fixes:
Closes #611
Special notes for your reviewer: