CI: Add nightly flatpak workflow
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run

This will build both aarch64 and x86_64 flatpaks nightly. The test jobs
I did with the default GitHub runners took ~1h30m for aarch64 and
~2h30m for x86_64, but this will hopefully improve over time as the
cache is built up. And be better time-wise on the blacksmith runners.

Disk space is a large concern with these flatpak builds. A naive script
on my local machine showed that we needed a max of 10.3 GiB of free
space for the x86_64 build, with clang as the compiler. For some reason,
building with default gcc 14 uses more disk space than that, bumping
up against the default 14 GiB free space limit guaranteed by GitHub for
their default runners.
This commit is contained in:
Andrew Kaster 2025-07-15 14:34:59 -06:00 committed by Andrew Kaster
commit 09c031fa96
Notes: github-actions[bot] 2025-07-23 22:29:12 +00:00
2 changed files with 49 additions and 0 deletions

30
.github/workflows/flatpak-template.yml vendored Normal file
View file

@ -0,0 +1,30 @@
name: Flatpak Build
on:
workflow_call:
inputs:
arch:
required: true
type: string
runner_labels:
required: true
type: string
jobs:
flatpak:
runs-on: ${{ fromJSON(inputs.runner_labels) }}
container:
image: ghcr.io/flathub-infra/flatpak-github-actions:kde-6.9
options: --privileged
steps:
- uses: actions/checkout@v4
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
bundle: Ladybird.flatpak
manifest-path: Meta/CMake/flatpak/org.ladybird.Ladybird.json
cache: 'true'
arch: ${{ inputs.arch }}
# Note: default cache key is 'flatpak-builder-${arch}-${sha256(manifestPath)}'
upload-artifact: 'true'

View file

@ -77,3 +77,22 @@ jobs:
arch: ${{ matrix.arch }}
build_preset: ${{ matrix.build_preset }}
clang_plugins: ${{ matrix.clang_plugins }}
flatpak:
if: github.repository == 'LadybirdBrowser/ladybird'
name: Flatpak ${{ matrix.arch }}
strategy:
fail-fast: false
matrix:
arch: [ 'x86_64' ]
runner_labels: [ '["blacksmith-8vcpu-ubuntu-2404"]' ]
include:
- arch: 'aarch64'
runner_labels: '["blacksmith-8vcpu-ubuntu-2404-arm"]'
secrets: inherit
uses: ./.github/workflows/flatpak-template.yml
with:
arch: ${{ matrix.arch }}
runner_labels: ${{ matrix.runner_labels }}