From a69b4658865a241191d0da91d057fdfdfefab03e Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 4 Oct 2026 20:51:52 +0000 Subject: [PATCH] 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 Claude-Session: https://claude.ai/code/session_01VZBWxxMsxUzp4PSTKVzbZN --- .gitea/workflows/release.yml | 2 -- .github/workflows/release.yml | 2 -- crates/voelin-gateway/Dockerfile | 1 - docker/android.Dockerfile | 2 -- docker/linux.Dockerfile | 2 -- docker/windows.Dockerfile | 2 -- docs/ci.md | 16 +++++++++------- packaging/flatpak/io.github.faumaray.Voelin.yml | 3 --- 8 files changed, 9 insertions(+), 21 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 6b18187..75cb628 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -9,8 +9,6 @@ on: env: CARGO_TERM_COLOR: always - CARGO_BUILD_JOBS: "1" - CARGO_INCREMENTAL: "0" RUST_BACKTRACE: "0" jobs: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 796d6bc..c10b6b3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,8 +20,6 @@ permissions: env: CARGO_TERM_COLOR: always RUST_BACKTRACE: "0" - CARGO_BUILD_JOBS: "1" - CARGO_INCREMENTAL: "0" jobs: package-linux: diff --git a/crates/voelin-gateway/Dockerfile b/crates/voelin-gateway/Dockerfile index ac5e3c4..1a997f4 100644 --- a/crates/voelin-gateway/Dockerfile +++ b/crates/voelin-gateway/Dockerfile @@ -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 . . diff --git a/docker/android.Dockerfile b/docker/android.Dockerfile index ca9770d..e3079cb 100644 --- a/docker/android.Dockerfile +++ b/docker/android.Dockerfile @@ -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 \ diff --git a/docker/linux.Dockerfile b/docker/linux.Dockerfile index 1ce37cf..efb3e92 100644 --- a/docker/linux.Dockerfile +++ b/docker/linux.Dockerfile @@ -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. diff --git a/docker/windows.Dockerfile b/docker/windows.Dockerfile index 4a2ae86..3233179 100644 --- a/docker/windows.Dockerfile +++ b/docker/windows.Dockerfile @@ -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. diff --git a/docs/ci.md b/docs/ci.md index 0de20b5..227f42c 100644 --- a/docs/ci.md +++ b/docs/ci.md @@ -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, diff --git a/packaging/flatpak/io.github.faumaray.Voelin.yml b/packaging/flatpak/io.github.faumaray.Voelin.yml index 6a7a5c8..f2e7b31 100644 --- a/packaging/flatpak/io.github.faumaray.Voelin.yml +++ b/packaging/flatpak/io.github.faumaray.Voelin.yml @@ -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: