Goal
Use zackees/setup-soldr to speed up fbuild's GitHub Actions workers by replacing the repo's repeated manual soldr/rustup/cache setup with one action-managed setup step.
The action installs one released soldr binary, provisions the rust-toolchain.toml toolchain with rustup, and restores cacheable Soldr/Cargo/rustup state. It also has first-class caches for Soldr-owned zccache artifacts and Cargo target/ outputs.
Why this should help
Current fbuild workflows still pay repeated setup costs:
check-ubuntu.yml, fmt.yml, docs.yml, msrv.yml, and template_build.yml install soldr manually with curl or pip.
check-macos.yml, check-windows.yml, and template_native_build.yml checkout/build zackees/soldr from source before running fbuild checks/builds.
template_build.yml manually wires actions/cache for package/build state.
- Native/build workers do not consistently get action-managed
target/ and zccache artifact cache reuse.
setup-soldr can centralize this and remove duplicated bootstrapping logic while making worker cold/warm timings visible through cache outputs.
Proposed migration
Start with the Rust worker workflows, then fan out to board/native templates:
- Replace manual soldr setup in these workflows with:
- uses: zackees/setup-soldr@v0
with:
cache: true
build-cache: true
target-cache: true
toolchain-file: rust-toolchain.toml
- Keep Rust commands as direct soldr commands, for example:
- run: soldr cargo check --workspace --all-targets
- run: soldr cargo clippy --workspace --all-targets -- -D warnings
- run: soldr cargo test --workspace
-
For native packaging workers, use explicit target-dir / lockfile inputs where needed so cross-target caches do not collide.
-
Remove duplicated manual install/build steps for soldr from:
.github/workflows/check-ubuntu.yml
.github/workflows/check-macos.yml
.github/workflows/check-windows.yml
.github/workflows/fmt.yml
.github/workflows/docs.yml
.github/workflows/msrv.yml
.github/workflows/template_build.yml
.github/workflows/template_native_build.yml
-
Add cache diagnostics to job summaries using action outputs where useful:
cache-hit
build-cache-hit
target-cache-hit
cache-restore-status
build-cache-restore-status
target-cache-restore-status
Acceptance criteria
Suggested validation
For each migrated worker type, compare before/after on one cold run and one warm rerun:
| Workflow |
Cold before |
Cold after |
Warm before |
Warm after |
Notes |
| check-ubuntu |
TBD |
TBD |
TBD |
TBD |
Rust check/clippy/test |
| check-macos |
TBD |
TBD |
TBD |
TBD |
currently builds soldr from source |
| check-windows |
TBD |
TBD |
TBD |
TBD |
currently builds soldr from source |
| template_build board worker |
TBD |
TBD |
TBD |
TBD |
package/build cache interaction |
| template_native_build |
TBD |
TBD |
TBD |
TBD |
target-specific cache keys matter |
Related
Goal
Use
zackees/setup-soldrto speed up fbuild's GitHub Actions workers by replacing the repo's repeated manual soldr/rustup/cache setup with one action-managed setup step.The action installs one released
soldrbinary, provisions therust-toolchain.tomltoolchain with rustup, and restores cacheable Soldr/Cargo/rustup state. It also has first-class caches for Soldr-owned zccache artifacts and Cargotarget/outputs.Why this should help
Current fbuild workflows still pay repeated setup costs:
check-ubuntu.yml,fmt.yml,docs.yml,msrv.yml, andtemplate_build.ymlinstall soldr manually with curl or pip.check-macos.yml,check-windows.yml, andtemplate_native_build.ymlcheckout/buildzackees/soldrfrom source before running fbuild checks/builds.template_build.ymlmanually wiresactions/cachefor package/build state.target/and zccache artifact cache reuse.setup-soldrcan centralize this and remove duplicated bootstrapping logic while making worker cold/warm timings visible through cache outputs.Proposed migration
Start with the Rust worker workflows, then fan out to board/native templates:
For native packaging workers, use explicit
target-dir/lockfileinputs where needed so cross-target caches do not collide.Remove duplicated manual install/build steps for soldr from:
.github/workflows/check-ubuntu.yml.github/workflows/check-macos.yml.github/workflows/check-windows.yml.github/workflows/fmt.yml.github/workflows/docs.yml.github/workflows/msrv.yml.github/workflows/template_build.yml.github/workflows/template_native_build.ymlAdd cache diagnostics to job summaries using action outputs where useful:
cache-hitbuild-cache-hittarget-cache-hitcache-restore-statusbuild-cache-restore-statustarget-cache-restore-statusAcceptance criteria
zackees/setup-soldr@v0instead of manual soldr install/build steps.setup-soldrwhere compatible.target-cacheand Soldr-owned zccachebuild-cacheare enabled for workers where they reduce runtime without unsafe cross-target reuse.soldr cargo ...commands continue to work unchanged after setup.Suggested validation
For each migrated worker type, compare before/after on one cold run and one warm rerun:
Related
_cargo/_rustc/_rustfmtwrappers.