Skip to content

build: align rustc wrapper on zccache; drop redundant sccache from CI (closes #75) - #79

Merged
zackees merged 1 commit into
mainfrom
fix-zccache-config
May 13, 2026
Merged

zackees merged 1 commit into
mainfrom
fix-zccache-config

Conversation

@zackees

@zackees zackees commented May 13, 2026

Copy link
Copy Markdown
Member

Summary

Closes #75. Companion to #76 (PR #78, already merged).

Two remaining items from #75 after PR #78 retired the _cargo trampolines:

  1. ci/env.py::_apply_sccache set RUSTC_WRAPPER=sccache when sccache was on PATH, but this project uses zccache (via soldr). Renamed to _apply_rustc_wrapper; prefer zccache, fall back to sccache. The helper currently has no in-tree callers but is defensive for any future direct caller that builds cargo env from build_env().

  2. CI workflows installed BOTH mozilla-actions/sccache-action@v0.0.9 AND zackees/setup-soldr@v0, then set RUSTC_WRAPPER: sccache via env. With every script caller now routing through soldr cargo (which manages the zccache wrapper automatically), the sccache half is redundant. Dropped SCCACHE_GHA_ENABLED, RUSTC_WRAPPER: sccache, and the sccache-action step from _build.yml, _lint.yml, _unit-test.yml, _integration-test.yml. setup-soldr remains and provides zccache + GitHub Actions cache for its state.

Files

  • Updated: ci/env.py, .github/workflows/_build.yml, .github/workflows/_lint.yml, .github/workflows/_unit-test.yml, .github/workflows/_integration-test.yml

Test plan

  • bash lint — green; goes through soldr cargo fmt + soldr cargo clippy
  • grep -rn 'sccache\|SCCACHE' .github/workflows/ ci/env.py shows only the docstring/code fallback in _apply_rustc_wrapper — no more workflow references
  • CI must re-validate _lint, _unit-test, _build, _integration-test workflows hit zccache cache hits (visible in soldr session log)

Related

🤖 Generated with Claude Code

Closes #75.

ci/env.py::_apply_sccache previously set RUSTC_WRAPPER=sccache when
sccache was on PATH, but the project uses zccache (via soldr) for
compile caching. Renamed to _apply_rustc_wrapper and made it prefer
zccache, falling back to sccache. The function is currently
unimported elsewhere in the repo, so this is defensive for any
future direct caller (e.g. ad-hoc cargo invocations that consume
build_env()).

CI workflows installed BOTH mozilla-actions/sccache-action and
zackees/setup-soldr, then set RUSTC_WRAPPER=sccache. With every
script caller now routing through soldr cargo (the soldr-managed
zccache is wired automatically), the sccache half is redundant.
Drop SCCACHE_GHA_ENABLED, RUSTC_WRAPPER: sccache, and the
sccache-action step from _build.yml / _lint.yml / _unit-test.yml /
_integration-test.yml. setup-soldr remains, providing zccache
plus GitHub Actions cache for its state.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@zackees
zackees merged commit ba2bb1b into main May 13, 2026
16 of 25 checks passed
zackees added a commit that referenced this pull request May 13, 2026
Soldr (via zccache) is the project's compile cache. The sccache
fallback in ci/env.py::_apply_rustc_wrapper was carried forward
from the pre-soldr era; with PR #79 (closing #75) it no longer
serves a purpose. Remove the fallback so RUSTC_WRAPPER points
only at zccache when set.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
zackees added a commit that referenced this pull request May 13, 2026
#81)

* build: drop sccache fallback; zccache is the only compile cache

Soldr (via zccache) is the project's compile cache. The sccache
fallback in ci/env.py::_apply_rustc_wrapper was carried forward
from the pre-soldr era; with PR #79 (closing #75) it no longer
serves a purpose. Remove the fallback so RUSTC_WRAPPER points
only at zccache when set.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* ci(lint): install rustfmt/clippy via rustup; relax test_version assert

Closes the two CI regressions that PR #80 surfaced on main:

1. **Lint job missing rustfmt and clippy.**
   zackees/setup-soldr@v0 reads only the channel from rust-toolchain.toml;
   the components array (["clippy", "rustfmt"]) is ignored. With the
   minimal profile, cargo fmt fails:
       error: 'cargo-fmt' is not installed for the toolchain
   Provision them explicitly via rustup component add after setup-soldr.
   Soldr itself does not yet expose component management — its CLI runs
   tools from the active toolchain but doesn't install missing components.

2. **test_version.py expects bare version string.**
   The Rust CLI (clap) emits 'fastled 2.0.7' for --version, matching the
   standard '<bin> <version>' format. The Python-era argparse emitted just
   '2.0.7'. Switch from assertEqual to assertIn so the package version is
   verified to be present without prescribing the exact format.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@zackees
zackees deleted the fix-zccache-config branch November 5, 2026 05:51
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.

Local dev cargo builds bypass soldr/zccache — slow rebuilds

1 participant