windows ci: Run `cargo clippy` in the dev drive workspace to reuse the cache (#9411)

## Summary

In the Windows Clippy job, the workspace is transferred to
`UV_WORKSPACE`. However, `cargo clippy` continues to execute in the
`github.workspace`, and `Swatinem/rust-cache` only caches the
`UV_WORKSPACE/target`, resulting in `cargo clippy` having no cache.

This adjustment will take effect when any changes are made to
`Cargo.toml` or `Cargo.lock`, prompting `Swatinem/rust-cache` to updat
the cache.
This commit is contained in:
Jo 2024-11-26 05:12:43 +08:00 committed by GitHub
parent a17c04730f
commit 77116bef26
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -138,6 +138,7 @@ jobs:
run: rustup component add clippy run: rustup component add clippy
- name: "Clippy" - name: "Clippy"
working-directory: ${{ env.UV_WORKSPACE }}
run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
cargo-dev-generate-all: cargo-dev-generate-all: