ci: cache hygiene + faster builds#273
Merged
Merged
Conversation
…, registry docker cache)
ntatschner
pushed a commit
that referenced
this pull request
Jul 20, 2026
The type=registry Docker cache (from #273) fails on the private registry with '413 Payload Too Large' when exporting mode=max cache blobs (#29 exporting cache to registry). The IMAGE push succeeds, but the post-push cache export fails the whole 'Release images' job. Revert cache-from/cache-to to the previously-working type=gha for api/web/config-images. The rust-cache save-if + mold + CARGO_INCREMENTAL speedups from #273 are unaffected and kept.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Workflow-only CI speed-up. No app code, no change to release binaries or local dev.
save-if— everySwatinem/rust-cache@v2block now setssave-if: ${{ github.ref == 'refs/heads/next' || github.ref == 'refs/heads/main' }}(acrossci.yml,release.yml,promote.yml). PR runs restore from the shared cache but stop writing to it, so PRs no longer pollute the branch-scoped cache with throwaway state; onlynext/mainpushes refresh it.env:(CARGO_INCREMENTAL: "0",CARGO_PROFILE_DEV_DEBUG: "0") toci.yml,release.yml,promote.yml. This is the documented rust-cache best practice: incremental compilation bloats the cache for no benefit on a clean-checkout runner, and dropping dev/test debuginfo shrinkstarget/further. Release builds use thereleaseCargo profile and are unaffected.rui314/setup-mold@v1(guardedif: runner.os == 'Linux') right afterdtolnay/rust-toolchainin every job that compiles Rust, across all three workflows. Linking is a large share of the Tauri build time; mold cuts it substantially. No-ops cleanly on the Windows matrix legs.gha→registry—release-images.yml's three cache pairs (API, Web, matrix config-images) now push/pulltype=registrycache to${{ secrets.REGISTRY_URL }}/starstats/<image>:buildcacheinstead oftype=gha. The GH Actions cache backend has a 10 GB repo-wide cap and branch-scoped eviction that was thrashing; the private registry (already authenticated via the existing login step) has no such limit and persists across branches.Test plan
python -c "import yaml; ..."— all 4 workflow files parse cleanly.actionlintjob (gated on workflow-file changes) will lint this PR.Swatinem/rust-cache@v2block has a matchingsave-if:; everytype=ghainrelease-images.ymlis gone; each of the 3 Rust-touching workflows hasCARGO_INCREMENTAL+ matching mold steps (counts line up 1:1 per file).nextafter merge (cache-write + mold + registry-cache paths) are the two things to actually watch — see Concerns below.Concerns / things to watch on first run
:buildcachetags atstarstats/<image>:buildcacheand thatmode=maxcache layers don't blow past registry quota. Firstrelease-images.ymlrun after merge (or the next branch/tag push that fires it) is the real test — worth checking the Build & push steps' timing/log output specifically.Roadmap: untracked (CI-only chore, no user-visible behaviour change).