Skip to content

ci: use setup-soldr to speed up fbuild workers #183

@zackees

Description

@zackees

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:

  1. 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
  1. 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
  1. For native packaging workers, use explicit target-dir / lockfile inputs where needed so cross-target caches do not collide.

  2. 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
  3. 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

  • fbuild Rust check workers use zackees/setup-soldr@v0 instead of manual soldr install/build steps.
  • fbuild board/native build templates use setup-soldr where compatible.
  • target-cache and Soldr-owned zccache build-cache are enabled for workers where they reduce runtime without unsafe cross-target reuse.
  • Existing soldr cargo ... commands continue to work unchanged after setup.
  • Job logs or summaries expose setup/cache hit status so we can compare cold vs warm worker times.
  • Remove old duplicated soldr bootstrap steps once each workflow is migrated.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions