flatpak-github-actions icon indicating copy to clipboard operation
flatpak-github-actions copied to clipboard

Provide multi-arch runner images

Open darkdragon-001 opened this issue 7 months ago • 10 comments

This allows running the builder action on a native aarch64 runner which is much faster than using QEMU.

Based on the official docs.

Fixes #178

darkdragon-001 avatar Jan 23 '24 21:01 darkdragon-001

@bilelmoussaoui could you please take a look?

darkdragon-001 avatar Feb 12 '24 07:02 darkdragon-001

Isn't it the same one?

BigmenPixel0 avatar Feb 12 '24 08:02 BigmenPixel0

Isn't it the same one?

@BigmenPixel0 No. By default only the host architecture (x86_64 = amd64) is built. With these changes, this will also create an image for ARM (arm64) architecture.

darkdragon-001 avatar Feb 12 '24 19:02 darkdragon-001

This does not work since the binfmt tooling needs to be run at runtime, so the setup-qemu-action still needs to be used to load/register binfmt.

tytan652 avatar Feb 13 '24 13:02 tytan652

This does not work since the binfmt tooling needs to be run at runtime, so the setup-qemu-action still needs to be used to load/register binfmt.

What do you mean by "it will not work"? I built the images in my branch and am running them on an arm64 runner without problems.

This builds an arm64 images with all binaries using the arm64 version, so there is no need for binfmt on an arm64 runner.

darkdragon-001 avatar Feb 13 '24 16:02 darkdragon-001

Sorry I misunderstood the PR, so it concerns a non-"wildly available" type of GitHub runner.

tytan652 avatar Feb 13 '24 17:02 tytan652

Sorry I misunderstood the PR, so it concerns a non-"wildly available" type of GitHub runner.

Yes but it makes a huge difference. On https://github.com/nanu-c/axolotl this brings down the Flatpak build for arm64 from ~180min to ~20min (~14x speedup).

darkdragon-001 avatar Feb 14 '24 20:02 darkdragon-001

@bilelmoussaoui @barthalion could you please take a look? This is working for me since quite some time, would be great to make this available for others as well.

darkdragon-001 avatar Feb 14 '24 20:02 darkdragon-001

Applied it at https://github.com/flathub-infra/flatpak-github-actions/commit/79d4438081ca6fbab81225518b16a4887ae667e9.

barthalion avatar Feb 15 '24 09:02 barthalion

@barthalion The build in flathub-infra failed as it uses a different base image than this repository which is not available for arm64 yet. I created flathub-infra/flatpak-builder-lint#298 to add this.

darkdragon-001 avatar Feb 18 '24 19:02 darkdragon-001