shared-actions/rust-build
2026-04-24 15:57:40 +02:00
..
action.yml refactor: move action to repo root 2026-04-24 15:57:40 +02:00
README.md refactor: move action to repo root 2026-04-24 15:57:40 +02:00

rust-build

Run Rust CI -- fmt, clippy, tests, optional cross-compilation.

Inputs

Input Required Default Description
toolchain No stable Rust toolchain
features No "" Cargo features to enable
cross-target No "" Cross-compilation target (installs cross when set)
run-fmt No true Run cargo fmt --check
run-clippy No true Run clippy with -D warnings
run-tests No true Run cargo test
run-deny No false Run cargo deny check
run-semver-checks No false Run cargo semver-checks
sccache-enabled No true Enable sccache (requires sccache_ci_setup.sh in working directory)
working-directory No . Working directory

Usage

- uses: schmalz/shared-actions/.github/actions/rust-build@v1
  with:
    features: serde,tokio
    run-deny: "true"

Cross-compilation

- uses: schmalz/shared-actions/.github/actions/rust-build@v1
  with:
    cross-target: aarch64-unknown-linux-gnu
    run-fmt: "false"

Notes

  • Cargo registry and target/ directory are cached based on Cargo.lock hash.
  • When cross-target is set, cross is installed and used instead of cargo for clippy, test, and build steps. cargo fmt always uses cargo directly.
  • sccache integration requires a sccache_ci_setup.sh script in the working directory.