From 22fac502fa19b0dec04bf2f834d0cb283ee746a7 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 8 Oct 2026 17:35:16 +0000 Subject: [PATCH] release: one Cargo job on GitHub's runners again The Release run on this branch lost its Linux and Flatpak runners about 30 minutes in, while the generated UI library compiled next to other crates: the runners have 16 GB and were killed. The same jobs passed with one job (8359ba8). The GitHub release workflow sets CARGO_BUILD_JOBS=1 again, and its Flatpak job adds it to the manifest before building, since flatpak-builder does not pass the job's environment on. The Gitea workflow, the Docker images and the manifest itself keep Cargo's default job count. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AVRENKftQqGoEeswiR9TDQ --- .github/workflows/release.yml | 13 +++++++++++++ docs/ci.md | 9 ++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ed52189..f3c9749 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,6 +20,12 @@ permissions: env: CARGO_TERM_COLOR: always RUST_BACKTRACE: "0" + # GitHub's runners have 16 GB: the generated UI library does not fit + # in that next to other crates, and the runner is killed. The Gitea + # workflow keeps Cargo's default job count. The Flatpak job sets it in + # the manifest too. + CARGO_BUILD_JOBS: "1" + CARGO_INCREMENTAL: "0" jobs: package-linux: @@ -108,6 +114,13 @@ jobs: python3 -m venv /tmp/venv /tmp/venv/bin/pip install --quiet "aiohttp>=3.9.5,<4" "tomlkit>=0.13.3,<1" "PyYAML>=6.0.2,<7" /tmp/venv/bin/python /tmp/flatpak-cargo-generator.py Cargo.lock -o packaging/flatpak/cargo-sources.json + # flatpak-builder does not pass the job's environment into its sandbox, + # and the manifest keeps Cargo's default job count for Gitea: one job + # here, as for the other packages. + - name: One Cargo job + run: | + sed -i 's/^ CARGO_NET_OFFLINE: "true"$/&\n CARGO_BUILD_JOBS: "1"/' packaging/flatpak/io.github.faumaray.Voelin.yml + grep -q '^ CARGO_BUILD_JOBS: "1"$' packaging/flatpak/io.github.faumaray.Voelin.yml - uses: flatpak/flatpak-github-actions/flatpak-builder@v6 with: bundle: voelin.flatpak diff --git a/docs/ci.md b/docs/ci.md index 227f42c..44b844c 100644 --- a/docs/ci.md +++ b/docs/ci.md @@ -9,9 +9,12 @@ Both GitHub and Gitea provide release packaging; see [release.md](release.md) and [building.md](building.md). Cargo builds use one job in CI (`ci.yml`) so the generated UI library and -its test target do not compile concurrently. The release workflows, their -Docker images and the Flatpak build use Cargo's defaults (one job per CPU, -no incremental builds in release mode). The release profile uses ThinLTO and +its test target do not compile concurrently. GitHub's release workflow uses +one job too, also inside its Flatpak build: on its 16 GB runners the UI +library does not fit next to other crates, and the runner is killed. The +Gitea release workflow, its Docker images and the Flatpak manifest itself +use Cargo's defaults (one job per CPU, no incremental builds in release +mode). The release profile uses ThinLTO and 16 codegen units instead of fat LTO and one unit, reducing peak compiler memory while retaining optimised builds and panic unwinding. This trades some whole-program optimisation for lower build-memory requirements; release