Skip to content

CI: kache compile cache, cargo-chef layer for the server image - #78

Merged
ndbroadbent merged 3 commits into
mainfrom
ci-kache
Dec 2, 2026
Merged

ndbroadbent merged 3 commits into
mainfrom
ci-kache

Conversation

@ndbroadbent

Copy link
Copy Markdown
Member

Build caching, as the coordinator asked (sc-8900 follow-up).

  • kache in place of Swatinem/rust-cache in lint, app, test, visual and clients, through kunobi-ninja/kache-action@v1 with kache 2.4.0 (docspring-dev runs the same version).
    • Only builds on main save the cache. Pull requests read it.
    • With the repository variables KACHE_BUCKET and KACHE_ENDPOINT set, the cache is the shared R2 bucket. Main uses KACHE_RW_* and pull requests use the read-only KACHE_RO_* keys, so a pull request can't write artifacts into main's builds.
    • Until those are set, each job uses the GitHub Actions cache. I've asked talira infra for the bucket and the two tokens.
  • The server image builds its dependencies in a cargo-chef layer (docker/server.Dockerfile, cargo-chef 0.1.78). A commit that changes only our own crates reuses that layer from the GHA layer cache.
  • The app job's Postgres user is visualci, renamed from loco. The Loco server's jobs keep loco until cutover removes them.
  • release.yml keeps rust-cache for now: its cross-compiled targets would each need their own kache setup.

Times

Before, from recent green main runs: test 2–3 min, app 0–2 min, lint under 1 min, visual 5–8 min, images 6–9 min. This PR's own run gives the cold kache numbers, and the next PR's run the warm ones. The image change shows only on main, where the images job runs: I'll report it after the merge.

@visualci-com

visualci-com Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

VisualCI

docspring/visualci · build #407 · 333 unchanged · no changes

This PR vs base: 22 changed, 2 added since #273, across 5 builds

Updated as builds change. Agents can review with VisualCI's MCP tools.

@ndbroadbent
ndbroadbent force-pushed the ci-kache branch 3 times, most recently from 5b1077a to 99ccb65 Compare December 2, 2026 16:48
…es it; the R2 bucket once KACHE_BUCKET is set, else the GitHub cache); the server image builds dependencies in a cargo-chef layer; the app job's Postgres user is visualci
…, which only main may use; kache-action pinned to a commit
…ith:, which stopped the workflow from starting)
@ndbroadbent
ndbroadbent merged commit 33c7261 into main Dec 2, 2026
11 checks passed
@ndbroadbent
ndbroadbent deleted the ci-kache branch December 2, 2026 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant