Skip to content

ci: build zccache with setup-soldr - #408

Merged
zackees merged 7 commits into
mainfrom
feat/setup-soldr-ci
May 26, 2026
Merged

zackees merged 7 commits into
mainfrom
feat/setup-soldr-ci

Conversation

@zackees

@zackees zackees commented May 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • migrate normal zccache build/test workflows to the pinned setup-soldr ref that contains cleanup and soldr-cook support
  • enable prebuild-deps: soldr-cook for build-heavy jobs and the shared native build composite action
  • stop the setup-soldr builder daemon before zccache self-tests, then run tests with fresh isolated ZCCACHE_CACHE_DIR roots and SOLDR_CACHE_LIFECYCLE=command
  • document intentional exceptions: release-auto remains untouched; action/benchmark/perf-cluster workflows keep their control-specific cache topology

Validation

  • actionlint
  • git diff --check
  • searched .github for stale zackees/setup-soldr@v0 and version: 0.7.18
  • confirmed remaining Swatinem/rust-cache use is limited to the documented perf-rust-cluster.yml exception

Closes #406.
Part of #405.

@zackees
zackees merged commit 46077b5 into main May 26, 2026
14 checks passed
@zackees
zackees deleted the feat/setup-soldr-ci branch May 26, 2026 21:02
zackees added a commit that referenced this pull request Jun 20, 2026
…813) (#831)

Adds Dockerfile.jobserver-test mirroring the existing Dockerfile.cc-test
pattern, validating issue #813's compile-concurrency cap end-to-end
inside a Docker container.

Test flow:
- Stage `builder` — compile zccache + zccache-daemon (release).
- Stage `tester` — Rust toolchain image; runs:
  1. Generate 60 trivial Rust source files
  2. Start zccache-daemon --foreground with
     ZCCACHE_MAX_PARALLEL_COMPILES=1 in env
  3. Launch a 50ms-cadence sampler that polls `pgrep -f rustc`
  4. Fire 60 concurrent `zccache rustc` invocations
  5. Stop daemon + sampler
  6. Parse the CSV samples; assert peak rustc count <= 1

This validates the same property the in-process test #826 validates
(no overlapping compile intervals when cap=1) but at the REAL
end-to-end level — actual daemon, real cargo-style rustc spawns,
observable via system process counting.

## Why process counting rather than log parsing

The original design was to grep daemon-lifecycle.log for the
`compile_start`/`compile_end` events #816 added. Empirically:

- daemon-lifecycle.log contains only structured JSON spawn/
  shutdown events (it's an EventLogger sink, not the
  tracing-subscriber output).
- tracing::info! output from #816's compile_exec instrumentation
  goes to a separate file the daemon stdout/stderr redirect
  doesn't capture (likely a non-blocking tracing-appender file
  layer somewhere; ran out of time pinning down the exact path).

Sampling `pgrep` is more robust:
- Works regardless of where tracing logs land.
- Observes the same property (cap enforced) end-to-end.
- Doesn't depend on the log format staying stable across
  refactors of the instrumentation code.

A follow-up could pin down the tracing-subscriber file location
and parse those events for richer assertion (per-compile durations,
exit codes) — filing that as a small task on the meta.

## Verification status

- Builds zccache successfully (cached layer from build #1).
- Tester stage runs and daemon binds socket (verified across builds
  #2-7).
- Final local validation hit a Docker Desktop daemon hang on this
  Win10 box (the documented "wsl --shutdown required" failure mode
  per #408's cancellation-recovery checklist). CI will validate on
  fresh runners.

Refs #813
Refs #817

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
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.

ci: migrate zccache non-release workflows to setup-soldr safely

1 participant