ci: stop building GNU gettext from source; fix the registry cache #5

Merged
schaefera merged 4 commits from ci-speedup into main 2026-10-05 12:06:46 +00:00
Collaborator

The ci job took 20–45 minutes. Almost all of that went into two C libraries that their crates build with ./configure && make. sccache can't cache those builds, even though it hits 99%+ of everything else.

Where the time went

  • gettext-sys built GNU gettext from source, once per profile. In run 21 that was 8m in clippy and 8.5m in the release check, about 16.5 of the job's 20 minutes.
  • git2's vendored-openssl built OpenSSL from source, once per build. In run 24 (this PR's first push) it took about 74s in clippy, 342s in the coverage build and 72s in the release check: about 8 of the remaining 14 minutes.
  • The cargo registry cache was never saved: "Path Validation Error: Path(s) … do(es) not exist". The workflow cached ~/.cargo/..., but CARGO_HOME is /usr/local/cargo in the rust:1-bookworm image.

Changes

  • gettext-rs now uses the gettext-system feature. On *-linux-gnu, gettext-sys then builds nothing and uses the gettext built into glibc. That holds on the desktop, in the CI image and on the phone (aarch64-linux-gnu, glibc). This affects every build, not just CI.
  • CI only: OPENSSL_NO_VENDOR=1 makes openssl-sys link the image's system OpenSSL. The phone package (cargo make click) still builds the vendored one, so CI no longer covers that build; cargo make click remains the check for it.
  • The registry cache paths now point at /usr/local/cargo/....

Results

  • Run 24, with the gettext and cache fixes: ci took 14m26s, down from 44m49s for #3. Clippy took 2m32s (from 8m24s), and the release check 2m07s (from 8m35s). The registry cache was saved.
  • The OpenSSL change: local cargo make lint and coverage-report pass without openssl-src being built. This push's CI run will show the new time; I estimate about 6 minutes.
  • cargo make click: the arm64 package builds, and click-review passes.
  • Not yet run on the phone. Translations go through glibc's gettext now, so check that UI strings still appear.

cargo audit's two warnings were already there before this change: RUSTSEC-2026-0244 (gettext-rs setlocale, unsound) and yoke-derive being yanked.

🤖 Generated with Claude Code

The `ci` job took 20–45 minutes. Almost all of that went into two C libraries that their crates build with `./configure && make`. sccache can't cache those builds, even though it hits 99%+ of everything else. ## Where the time went - **`gettext-sys` built GNU gettext from source**, once per profile. In run 21 that was 8m in clippy and 8.5m in the release check, about 16.5 of the job's 20 minutes. - **git2's `vendored-openssl` built OpenSSL from source**, once per build. In run 24 (this PR's first push) it took about 74s in clippy, 342s in the coverage build and 72s in the release check: about 8 of the remaining 14 minutes. - The **cargo registry cache was never saved**: "Path Validation Error: Path(s) … do(es) not exist". The workflow cached `~/.cargo/...`, but `CARGO_HOME` is `/usr/local/cargo` in the `rust:1-bookworm` image. ## Changes - `gettext-rs` now uses the `gettext-system` feature. On `*-linux-gnu`, `gettext-sys` then builds nothing and uses the gettext built into glibc. That holds on the desktop, in the CI image and on the phone (aarch64-linux-gnu, glibc). This affects every build, not just CI. - **CI only:** `OPENSSL_NO_VENDOR=1` makes `openssl-sys` link the image's system OpenSSL. The phone package (`cargo make click`) still builds the vendored one, so CI no longer covers that build; `cargo make click` remains the check for it. - The registry cache paths now point at `/usr/local/cargo/...`. ## Results - Run 24, with the gettext and cache fixes: `ci` took **14m26s**, down from 44m49s for #3. Clippy took 2m32s (from 8m24s), and the release check 2m07s (from 8m35s). The registry cache was saved. - The OpenSSL change: local `cargo make lint` and `coverage-report` pass without `openssl-src` being built. This push's CI run will show the new time; I estimate about 6 minutes. - `cargo make click`: the arm64 package builds, and `click-review` passes. - Not yet run on the phone. Translations go through glibc's gettext now, so check that UI strings still appear. `cargo audit`'s two warnings were already there before this change: RUSTSEC-2026-0244 (`gettext-rs` `setlocale`, unsound) and `yoke-derive` being yanked. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
CI: use glibc's gettext, cache the cargo registry where it is
All checks were successful
CI / ci (pull_request) Successful in 14m26s
CI / audit (pull_request) Successful in 14s
CI / qml (pull_request) Successful in 31s
98868bda63
gettext-sys built GNU gettext from source (./configure && make) for
every profile: ~8 min each in the clippy and release-check steps,
which sccache can't cache. glibc has gettext built in, on the desktop,
the CI image and the phone alike, so use it (gettext-system).

The registry cache pointed at ~/.cargo, but CARGO_HOME is
/usr/local/cargo in the rust image, so it was never saved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
schaefera approved these changes 2026-10-05 11:42:29 +00:00
Dismissed
CI: link the image's OpenSSL instead of building the vendored one
All checks were successful
CI / ci (pull_request) Successful in 8m56s
CI / qml (pull_request) Successful in 40s
CI / audit (pull_request) Successful in 18s
aaa23f7dff
git2's vendored-openssl builds OpenSSL with Configure && make, which
sccache can't cache: about 8 of the 14 minutes left in run 24, over
the three builds. OPENSSL_NO_VENDOR makes openssl-sys use the system
library instead; the phone package still vendors it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
schaefera approved these changes 2026-10-05 11:48:27 +00:00
Dismissed
CI: key the sccache cache on Cargo.toml and the workflow too
All checks were successful
CI / ci (pull_request) Successful in 9m6s
CI / qml (pull_request) Successful in 42s
CI / audit (pull_request) Successful in 21s
92907d5447
actions/cache never saves over an existing key, so with a key on
Cargo.lock alone the cache stayed as first saved: run 26 missed 27%
of compiles (every crate the gettext feature or OPENSSL_NO_VENDOR
touches) and would on every run until Cargo.lock changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
schaefera approved these changes 2026-10-05 12:06:30 +00:00
Merge branch 'main' into ci-speedup
All checks were successful
CI / ci (pull_request) Successful in 7m47s
CI / qml (pull_request) Successful in 45s
CI / audit (pull_request) Successful in 17s
bb6ba0f98e
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
schaefera/TouchPass!5
No description provided.