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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AVRENKftQqGoEeswiR9TDQ
This commit is contained in:
1 parent
034ee44e60
commit
22fac502fa
2 files changed
+19
-3
No files matched your search
@@ -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
|
||||
|
||||
+6
-3
@@ -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
|
||||
|
||||
Reference in new issue
Block a user