Skip to content

Commit b93832b

Browse files
Sync readme from flathub's fork
including aarch64 image usage
1 parent 10a3c29 commit b93832b

File tree

1 file changed

+39
-1
lines changed

1 file changed

+39
-1
lines changed

README.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161

6262
#### Building for multiple CPU architectures
6363

64-
To build for CPU architectures other than `x86_64`, the GitHub Actions workflow has to either natively be running on that architecture (e.g. on an `cch64` self-hosted GitHub Actions runner), or the container used must be configured to emulate the requested architecture (e.g. with QEMU).
64+
To build for CPU architectures other than `x86_64`, the GitHub Actions workflow has to either natively be running on that architecture (e.g. on an `aarch64` self-hosted GitHub Actions runner), or the container used must be configured to emulate the requested architecture (e.g. with QEMU).
6565

6666
For example, to build a Flatpak for both `x86_64` and `aarch64` using emulation, use the following workflow as a guide:
6767

@@ -107,6 +107,44 @@ jobs:
107107
arch: ${{ matrix.arch }}
108108
```
109109

110+
#### Multi arch build using public ARM64 runners
111+
112+
Since, January 2025, [GitHub offers public ARM64 runners](https://github.blog/changelog/2025-01-16-linux-arm64-hosted-runners-now-available-for-free-in-public-repositories-public-preview/).
113+
So a multi-arch build can be performed using that.
114+
115+
```yaml
116+
name: CI
117+
118+
on:
119+
push:
120+
branches: [main]
121+
pull_request:
122+
123+
jobs:
124+
flatpak:
125+
name: "Flatpak"
126+
container:
127+
image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-48
128+
options: --privileged
129+
strategy:
130+
matrix:
131+
variant:
132+
- arch: x86_64
133+
runner: ubuntu-24.04
134+
- arch: aarch64
135+
runner: ubuntu-24.04-arm
136+
runs-on: ${{ matrix.variant.runner }}
137+
steps:
138+
- uses: actions/checkout@<commit hash>
139+
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
140+
with:
141+
bundle: palette.flatpak
142+
manifest-path: org.gnome.zbrown.Palette.yml
143+
cache-key: flatpak-builder-${{ github.sha }}
144+
arch: ${{ matrix.variant.arch }}
145+
verbose: true
146+
```
147+
110148
#### Building for Automated Tests
111149

112150
As described in the [Inputs](#inputs) documentation, specifying `run-tests: true` will amend the Flatpak manifest to enable Network and X11 access automatically. Any other changes to the manifest must be made manually, such as building the tests (e.g. `-Dtests=true`) or any other options (e.g. `--buildtype=debugoptimized`).

0 commit comments

Comments
 (0)