From d90a0a8f89080285abde35db6f47a75b50693429 Mon Sep 17 00:00:00 2001 From: 4gray Date: Mon, 13 Apr 2026 08:46:14 +0200 Subject: [PATCH] build: update CI configuration for Linux packaging targets and profiles --- .github/workflows/build-and-make.yaml | 37 ++++++++++++++++++++++++--- docs/architecture/sqlite-db-worker.md | 2 +- 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-make.yaml b/.github/workflows/build-and-make.yaml index 2bd13f691..866637e94 100644 --- a/.github/workflows/build-and-make.yaml +++ b/.github/workflows/build-and-make.yaml @@ -29,6 +29,10 @@ jobs: # Linux and Windows - os: linux runner: ubuntu-22.04 + linux_profile: standard + - os: linux + runner: ubuntu-24.04 + linux_profile: flatpak - os: windows runner: windows-latest @@ -59,6 +63,25 @@ jobs: # We install version 24.08 as a safe default, electron-builder might pick what it needs flatpak install --user -y flathub org.freedesktop.Platform//24.08 org.freedesktop.Sdk//24.08 + - name: Select Linux packaging targets for CI profile + if: matrix.os == 'linux' + run: | + node -e " + const fs = require('fs'); + const path = 'electron-builder.json'; + const config = JSON.parse(fs.readFileSync(path, 'utf8')); + const targets = Array.isArray(config.linux?.target) ? config.linux.target : []; + const profile = '${{ matrix.linux_profile }}'; + + if (profile === 'standard') { + config.linux.target = targets.filter((entry) => String(entry.target).toLowerCase() !== 'flatpak'); + } else if (profile === 'flatpak') { + config.linux.target = targets.filter((entry) => String(entry.target).toLowerCase() === 'flatpak'); + } + + fs.writeFileSync(path, JSON.stringify(config, null, 4) + '\n'); + " + - name: Install dependencies run: pnpm install --frozen-lockfile @@ -250,7 +273,7 @@ jobs: run: pnpm run verify:package-layout -- "$PACKAGE_OS" "$PACKAGE_ARCH" - name: Smoke test packaged Flatpak launcher - if: matrix.os == 'linux' + if: matrix.os == 'linux' && matrix.linux_profile == 'flatpak' shell: bash run: | set -euo pipefail @@ -286,7 +309,7 @@ jobs: retention-days: 7 - name: Upload artifacts (Linux) - if: matrix.os == 'linux' + if: matrix.os == 'linux' && matrix.linux_profile == 'standard' uses: actions/upload-artifact@v4 with: name: linux-artifacts @@ -297,6 +320,14 @@ jobs: dist/executables/**/*.AppImage dist/executables/**/*.tar.gz dist/executables/**/*.pacman + retention-days: 7 + + - name: Upload artifacts (Flatpak) + if: matrix.os == 'linux' && matrix.linux_profile == 'flatpak' + uses: actions/upload-artifact@v4 + with: + name: linux-flatpak-artifacts + path: | dist/executables/**/*.flatpak retention-days: 7 @@ -353,7 +384,7 @@ jobs: artifacts/linux-artifacts/*.snap artifacts/linux-artifacts/*.tar.gz artifacts/linux-artifacts/*.pacman - artifacts/linux-artifacts/*.flatpak + artifacts/linux-flatpak-artifacts/*.flatpak artifacts/windows-artifacts/*-setup.exe artifacts/windows-artifacts/*.msi artifacts/windows-artifacts/*.zip diff --git a/docs/architecture/sqlite-db-worker.md b/docs/architecture/sqlite-db-worker.md index 6a850c14a..fc3dbc513 100644 --- a/docs/architecture/sqlite-db-worker.md +++ b/docs/architecture/sqlite-db-worker.md @@ -336,7 +336,7 @@ The script checks: 4. Snap packaging compatibility settings for `better-sqlite3`: - `snap.base = core22` - Snap launch args keep the X11 fallback - - Snap builds stay aligned with the Ubuntu 22.04 Linux CI environment + - Snap and the other non-Flatpak Linux artifacts build on Ubuntu 22.04, while Flatpak builds on a separate Ubuntu 24.04 CI runner ### Development rebuild rule