diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 48bcf30..f2b9526 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -24,14 +24,19 @@ concurrency: env: CARGO_INCREMENTAL: "0" CARGO_TERM_COLOR: always - # rust-toolchain pins 1.93.0; rustup on the runner installs it on first use. - RUSTUP_TOOLCHAIN: 1.93.0 + +# rust-toolchain pins 1.93.0. rustup on the runner auto-installs the toolchain +# on first use but NOT the components the file lists (observed: "cargo-fmt is +# not installed for the toolchain"), so each job that needs one adds it +# explicitly; the call is a no-op once present. jobs: fmt: runs-on: rust steps: - uses: actions/checkout@v4 + - name: toolchain + run: rustup component add rustfmt - name: rustfmt run: cargo fmt --all -- --check @@ -40,6 +45,8 @@ jobs: needs: fmt steps: - uses: actions/checkout@v4 + - name: toolchain + run: rustup component add clippy - name: clippy (all targets, all features, warnings denied) # Same invocation as clippy.sh so local and CI agree. run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings