Skip to content

perf(ci): trim platform Test to --lib --bins; full suite on Integration job - #165

Merged
zackees merged 1 commit into
mainfrom
ci/issue-106-trim-platform-check
May 11, 2026
Merged

zackees merged 1 commit into
mainfrom
ci/issue-106-trim-platform-check

Conversation

@zackees

@zackees zackees commented May 11, 2026

Copy link
Copy Markdown
Collaborator

Refs #106.

PR #161 split Test into its own job and PR #164 trimmed `--all-targets` from Check. The remaining bottleneck is the Test job on Windows (7m48s on main HEAD): `cargo test --workspace --no-fail-fast` compiles every integration test binary under `crates/*/tests/` even though most of their tests are `#[ignore]`'d. Each of the 17 integration test files in `zccache-daemon` alone becomes its own MSVC-linked binary, costing ~4m of Windows test-compile per run.

Two-lane split

  1. Platform Test (`ci-check.yml`) runs `cargo test --workspace --lib --bins --no-fail-fast` on Linux / macOS / Windows. Still exercises every library unit test (110 in zccache-compiler, 60 in zccache-fingerprint, 21 in zccache-cli, etc.) and every binary unit test, but skips compiling the integration test binaries.
  2. Integration (new `.github/workflows/integration.yml`) runs `cargo test --workspace --no-fail-fast` on `ubuntu-latest` only. Linux test-compile is fastest by 10×+, and platform-specific tests are already gated behind `#[cfg(windows)]` modules whose lib tests still run in step 1.

No coverage lost — every test that runs today still runs, just possibly in a different lane.

Also

Adds simple per-step timing into `$GITHUB_STEP_SUMMARY` so warm/cold regressions surface in the PR summary panel without raw-log inspection.

Verification

  • Local smoke: `soldr cargo test -p zccache-daemon --lib --bins --no-run` produces 2 binaries (lib + main), not 17 (no `tests/*` binaries) — exactly the win we want.
  • YAML validity: both workflow files parse cleanly.
  • CI on this PR: expect Windows Test to drop from ~7m48s toward ~2m. Integration job should pass on Linux with the full `--workspace` set.

Expected effect

Platform Test on Windows is the only place this shows up dramatically. macOS / Linux should be a few seconds faster too; never slower. The Windows-only `#159` session-end-after-rust-plan-save failure is independent and unchanged by this PR.

🤖 Generated with Claude Code

…on job

Issue #106 — keep platform Check / Test jobs under ~2 minutes.

PR #161 split Test into its own job; PR #164 trimmed --all-targets from
Check. The remaining bottleneck is `cargo test --workspace --no-fail-fast`
on Windows: it compiles every integration test binary under
`crates/*/tests/` even though most of their tests are #[ignore]'d. Each
of the 17 integration test files in zccache-daemon alone becomes its own
MSVC-linked binary, costing ~4m of Windows test-compile per run.

Two-lane split:

1. **Platform Test** (`ci-check.yml`) runs `cargo test --workspace
   --lib --bins --no-fail-fast` on Linux / macOS / Windows. This still
   exercises every library unit test (110 in zccache-compiler, 60 in
   zccache-fingerprint, etc.) and every binary unit test, but skips
   compiling the integration test binaries.

2. **Integration** (new `integration.yml`) runs `cargo test --workspace
   --no-fail-fast` on `ubuntu-latest` only. Linux test-compile is
   fastest by 10×+ and the integration tests that matter on Windows
   are already gated behind `#[cfg(windows)]` modules whose unit tests
   run in the platform Test job.

Also adds simple per-step timing to `$GITHUB_STEP_SUMMARY` so warm/cold
regressions are visible in the PR summary instead of needing a raw log
inspection.

No coverage lost: every test that runs today still runs, just possibly
in a different lane.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@codecov

codecov Bot commented May 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@zackees
zackees merged commit 439a6d8 into main May 11, 2026
10 of 13 checks passed
zackees added a commit that referenced this pull request May 11, 2026
Patch bump covering everything merged since v1.4.0:

- fix(daemon,ci): tolerate unknown sessions and stop killing soldr's
  daemon (#168, closes #166 + #167)
- feat(cli): expose session_end_idempotent for all daemon callers (#163)
- fix(daemon): deterministic flush primitive for event log (#162)
- feat(cli,daemon): relocate daemon exe to global runtime-binaries dir (#158)
- fix(depgraph): normalize workspace-path inputs out of rustc cache key (#160)
- perf(ci): trim platform Test, drop --all-targets from Check, split
  Test/Check jobs (#161, #164, #165)
- chore(ci): drop invalid target-cache-paths from build-target action (#157)

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
zackees added a commit that referenced this pull request May 12, 2026
…#173)

* perf(ci): dogfood zccache action for Check/Test to hit 2-minute target (#106)

ci-check.yml now uses this repo's own ./ action (RUSTC_WRAPPER=zccache +
target snapshot + `zccache warm` + mtime touching) instead of
zackees/setup-soldr@v0 (target/ blob cache only). On warm runs cargo's
fingerprint should see no dirty files, dropping `cargo check --workspace`
from 135s -> tens of seconds on Windows.

Why: After #161, #164, #165 cut work, Windows Check is stuck at 3:15
because `setup-soldr`'s target blob cache doesn't engage zccache as a
rustc wrapper and doesn't normalize mtimes. The ./ action (validated
cross-platform by test-action.yml on Linux x64/arm, macOS 14/15,
Windows 2025 x64/arm) does both.

Side wins:
- Drops the 30-line `python - <<PY` cleanup block in favor of
  ./action/cleanup (which saves caches, stops the daemon, builds the
  target snapshot).
- Drops the bundled-zccache 1.4.0 soldr at-exit teardown carve-out
  (a659804) — no soldr in CI means no soldr session-end errors to
  ignore.
- Splits Check/Test cache namespaces via shared-key so they don't
  poison each other.

PR #102's `hot` regression doesn't apply: that was setup-soldr's
target-cache-mode: hot, a different implementation. The ./ action's
target-snapshot-mode (hot is the default) is the path validated by
test-action.yml.

Verification on this PR's CI:
  1) First run primes the new cache keys; expect Check ~current.
  2) Empty-commit second run is the decisive measurement.
  3) Target acceptance: macOS/Linux/Windows Check each <=2:00 warm.
  4) Fallback: revert to setup-soldr if Windows regresses.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* style(ci): apply rustfmt to cross-check-linux command in zccache-ci

The `Formatting` CI job on PR #173 caught that the cross-check-linux
build_cmd call in `crates/zccache-ci/src/main.rs:228` exceeded the 100-col
limit. rustfmt's verdict is the multi-line array form. This is a pure
whitespace fix — no behavior change.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* ci: empty commit to measure warm-cache PR run for #106

---------

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
@zackees
zackees deleted the ci/issue-106-trim-platform-check branch November 5, 2026 05:55
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