flatpak-github-actions
flatpak-github-actions copied to clipboard
Add aarch64 variante of the docker images
The Problem
I am developing an app which I create flatpak images for, both for x86_64
and aarch64
. The Problem is, that the CI Pipeline regularly fails with "no storage space left on device" or similar errors for the aarch64
builds. The reason this is happening is simple:
The current images only include the x86_64
variants of the Platforms and SDKs. When building for aarch64
, the flatpak builder action installs the missing aarch64
libraries. You can see this happening here: https://github.com/flatpak/flatpak-github-actions/actions/runs/10935029440/job/30356078699#step:6:58
The problem is that having both architectures installed simply costs to much space and brings the GitHub Actions Runners to their limits, especially when adding additional SDKs like llvm or building larger projects that need to install additional stuff.
This seems to affect other people as well, see #181.
The Solution
This PR proposes a solution to that problem. Simply build 2 images for each SDK - one with the x86_64
arch and one using aarch64
. This PR does this by adding another dimension to the build matrix and dynamically "inserting" the correct arch for each build. I also made sure to not break the existing images, which is why the tags of the old ones are not changed, but instead a new one for aarch64
is added. For example, for the freedesktop-24.08
SDK, the following images will be created:
-
bilelmoussaoui/flatpak-github-actions:freedesktop-24.08
(x86_64
- name has not changed) -
bilelmoussaoui/flatpak-github-actions:freedesktop-24.08-aarch64
(aarch64
- new image tag)
Please note that the CI
Pipeline will fail until the first images have been published, because it now uses the aarch64
variant of it's image for the corresponding tests.
If you want to try out the new images first, I uploaded one for freedesktop and one for gnome under my own prefix to test the changes myself: https://hub.docker.com/repository/docker/skycoder42/flatpak-github-actions/general
If you have any further questions or suggestions, please don't hesitate to ask!