ci: give each static Linux target its own cache and job #21

Merged
fristyagent merged 1 commits from ci/target-cache-cli-jobs into main 2026-11-17 16:57:29 +03:00
Collaborator

📋 Description

Two separate problems made the CLI checks slow.

CLI (linux-arm64, static) (74 s → 5 m 34 s). The x86-64 musl check I added rebuilt from
scratch on every run — 4 m 12 s — because the cache was saved under the arm64 key, and
actions/cache refuses to save under a key that already exists:

13:18:29  Cache hit occurred on the primary key Linux-cargo-arm64-check-…, not saving cache.

The x86-64 build now lives in its own job with its own cache entry, so both targets are saved and
the two builds run in parallel instead of back to back.

CLI (windows) (98 s warm, 258–306 s cold). cargo check takes 50 s, but the job cached
cli/target — 291 MB that had to be uploaded on every miss, which took 2 m 06 s:

13:14:01  Finished `dev` profile … in 49.86s
13:14:01  Post job cleanup.
13:16:07  Post job cleanup.

Only the cargo registry is cached now, which is what the check actually needs.

Debug info. Measured in git.fristy.net/actions/runner-images:ubuntu-latest, restoring exactly
the two cached paths into the same target directory:

cache payload cold build rebuild after restore
debug info on 3.8 GB 99 s 52 s
CARGO_PROFILE_DEV_DEBUG=0 1.7 GB 80 s < 1 s

The remaining 52 s was the linker working on a 2.9 GB debug binary, so the static Linux jobs now
build without debug info. A fresh checkout still recompiles the frislit crate itself; touching a
source file costs 5 s.

Expected result: both Linux jobs around 30–60 s once the new keys are warm, Windows around 70 s
instead of 3 m. The first run after merging is cold for the three new keys.

🚀 Changes made to ...

  • 🔧 Server
  • 🖥️ Client
  • ⌨️ CLI
  • 📚 Documentation
  • 🔄 Other: CI pipeline

✅ Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have tested my changes locally
  • I have looked for similar pull requests in the repository and found none

🔗 Related Issues

No issue: follow-up to #20, where the x86-64 check was added to the arm64 job without noticing that
the cache key could not be reused.

## 📋 Description Two separate problems made the CLI checks slow. **`CLI (linux-arm64, static)` (74 s → 5 m 34 s).** The x86-64 musl check I added rebuilt from scratch on every run — 4 m 12 s — because the cache was saved under the arm64 key, and `actions/cache` refuses to save under a key that already exists: ``` 13:18:29 Cache hit occurred on the primary key Linux-cargo-arm64-check-…, not saving cache. ``` The x86-64 build now lives in its own job with its own cache entry, so both targets are saved and the two builds run in parallel instead of back to back. **`CLI (windows)` (98 s warm, 258–306 s cold).** `cargo check` takes 50 s, but the job cached `cli/target` — 291 MB that had to be uploaded on every miss, which took 2 m 06 s: ``` 13:14:01 Finished `dev` profile … in 49.86s 13:14:01 Post job cleanup. 13:16:07 Post job cleanup. ``` Only the cargo registry is cached now, which is what the check actually needs. **Debug info.** Measured in `git.fristy.net/actions/runner-images:ubuntu-latest`, restoring exactly the two cached paths into the same target directory: | | cache payload | cold build | rebuild after restore | |---|---|---|---| | debug info on | 3.8 GB | 99 s | 52 s | | `CARGO_PROFILE_DEV_DEBUG=0` | 1.7 GB | 80 s | < 1 s | The remaining 52 s was the linker working on a 2.9 GB debug binary, so the static Linux jobs now build without debug info. A fresh checkout still recompiles the `frislit` crate itself; touching a source file costs 5 s. Expected result: both Linux jobs around 30–60 s once the new keys are warm, Windows around 70 s instead of 3 m. The first run after merging is cold for the three new keys. ## 🚀 Changes made to ... - [ ] 🔧 Server - [ ] 🖥️ Client - [ ] ⌨️ CLI - [ ] 📚 Documentation - [x] 🔄 Other: CI pipeline ## ✅ Checklist - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [x] I have tested my changes locally - [x] I have looked for similar pull requests in the repository and found none ## 🔗 Related Issues No issue: follow-up to #20, where the x86-64 check was added to the arm64 job without noticing that the cache key could not be reused.
fristyagent added 1 commit 2026-11-17 16:44:48 +03:00
ci: give each static Linux target its own cache and job
CI / Docker image (pull_request) Successful in 15s
CI / CLI (pull_request) Successful in 15s
CI / Server (pull_request) Successful in 25s
CI / CLI (linux-arm64, static) (pull_request) Successful in 1m44s
CI / CLI (windows) (pull_request) Successful in 2m8s
CI / CLI (linux-x86-64, static) (pull_request) Successful in 3m32s
962320f553
Both checks rebuilt from scratch every run: the arm64 key already existed, so
the cache was never saved. Cache per target, build without debug info, check
x86-64 in its own job, and stop caching cli/target on Windows.
fristyagent merged commit 67c3f3b484 into main 2026-11-17 16:57:29 +03:00
fristy deleted branch ci/target-cache-cli-jobs 2026-11-17 16:58:07 +03:00
Sign in to join this conversation.