release: build packages with Cargo's default job count

The release workflows (GitHub and Gitea), the Docker images they build in
and the Flatpak manifest no longer set CARGO_BUILD_JOBS=1 and
CARGO_INCREMENTAL=0. CI checks keep the serial build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VZBWxxMsxUzp4PSTKVzbZN
This commit is contained in:
Claude committed 2026-10-04 20:51:52 +00:00
1 parent 8359ba8296
commit a69b465886
8 files changed
+9 -21

No files matched your search

-2
View File
@@ -9,8 +9,6 @@ on:
env:
CARGO_TERM_COLOR: always
CARGO_BUILD_JOBS: "1"
CARGO_INCREMENTAL: "0"
RUST_BACKTRACE: "0"
jobs:
-2
View File
@@ -20,8 +20,6 @@ permissions:
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: "0"
CARGO_BUILD_JOBS: "1"
CARGO_INCREMENTAL: "0"
jobs:
package-linux:
-1
View File
@@ -1,7 +1,6 @@
# Build: docker build -f crates/voelin-gateway/Dockerfile -t tsgw .
# Run: docker run -v ./tsgw.toml:/etc/tsgw/tsgw.toml -p 7788:7788 tsgw
FROM rust:1.94-bookworm AS build
ENV CARGO_BUILD_JOBS=1 CARGO_INCREMENTAL=0
WORKDIR /src
RUN apt-get update && apt-get install -y --no-install-recommends cmake libasound2-dev && rm -rf /var/lib/apt/lists/*
COPY . .
-2
View File
@@ -18,8 +18,6 @@
# unsigned.
FROM ubuntu:24.04 AS toolchain
# Serial builds keep the generated Slint UI within the CI memory budget.
ENV CARGO_BUILD_JOBS=1 CARGO_INCREMENTAL=0
ARG DEBIAN_FRONTEND=noninteractive
# JDK 17 (Gradle, the Android Gradle plugin), CMake + Ninja (the bundled libopus).
RUN apt-get update && apt-get install -y --no-install-recommends \
-2
View File
@@ -11,8 +11,6 @@
# live in cache mounts, so rebuilds are incremental.
FROM ubuntu:24.04 AS toolchain
# Serial builds keep the generated Slint UI within the CI memory budget.
ENV CARGO_BUILD_JOBS=1 CARGO_INCREMENTAL=0
ARG DEBIAN_FRONTEND=noninteractive
# The same libraries as CI (.github/actions/system-deps), plus dpkg-dev for
# the .deb's dependencies.
-2
View File
@@ -11,8 +11,6 @@
# on Windows 10 and 11. Unsigned, like CI's (signing: docs/release.md).
FROM ubuntu:24.04 AS toolchain
# Serial builds keep the generated Slint UI within the CI memory budget.
ENV CARGO_BUILD_JOBS=1 CARGO_INCREMENTAL=0
ARG DEBIAN_FRONTEND=noninteractive
# mingw-w64 (C compiler and linker), NASM (aws-lc and libvpx assembly), CMake
# (the bundled libopus, aws-lc), NSIS (the installer), zip.
+9 -7
View File
@@ -8,11 +8,12 @@ builds run by themselves, on `v*` tags, and they run none of these checks.
Both GitHub and Gitea provide release packaging; see [release.md](release.md)
and [building.md](building.md).
Cargo builds use one job in CI so the generated UI library and its test
target do not compile concurrently. The release profile uses ThinLTO and
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
16 codegen units instead of fat LTO and one unit, reducing peak compiler
memory while retaining optimised builds and panic unwinding. Flatpak sets
the Cargo job limit inside its build sandbox as well. This trades some
memory while retaining optimised builds and panic unwinding. This trades some
whole-program optimisation for lower build-memory requirements; release
runtime performance has not been benchmarked for this change.
@@ -147,9 +148,10 @@ ENDLESS_TASK_TIMEOUT = 9h
```
Keep sufficient RAM/swap and free disk for all package builds and their
Docker caches. Builds run sequentially and limit Cargo to one job. The
workflow never prunes shared Docker state or creates host swap. The token
and optional Android signing secrets are documented in
Docker caches. The package builds run one after another, each with as many
Cargo jobs as the host has CPUs. The workflow never prunes shared Docker
state or creates host swap. The token and optional Android signing secrets
are documented in
[Gitea releases](release.md#gitea-releases).
The Gitea release job builds packages only: it runs no formatting, Clippy,
@@ -37,9 +37,6 @@ build-options:
env:
CARGO_HOME: /run/build/voelin/cargo
CARGO_NET_OFFLINE: "true"
# flatpak-builder does not inherit Cargo settings from the outer job.
CARGO_BUILD_JOBS: "1"
CARGO_INCREMENTAL: "0"
LIBCLANG_PATH: /usr/lib/sdk/llvm20/lib
modules: