9292 persist-credentials : false
9393
9494 - uses : dtolnay/rust-toolchain@stable
95- with :
96- components : clippy
9795
9896 - name : Restore cache
9997 uses : actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
@@ -112,9 +110,6 @@ jobs:
112110 - name : Install macOS dependencies
113111 uses : ./.github/actions/install-macos-deps
114112
115- - name : run clippy
116- run : cargo clippy --keep-going ${{ env.CARGO_ARGS }} --workspace --all-targets ${{ env.WORKSPACE_EXCLUDES }} -- -Dwarnings
117-
118113 - name : run rust tests
119114 run : cargo test --workspace ${{ env.WORKSPACE_EXCLUDES }} --verbose --features threading ${{ env.CARGO_ARGS }}
120115
@@ -432,6 +427,76 @@ jobs:
432427 shell : bash
433428 run : python -I scripts/whats_left.py ${{ env.CARGO_ARGS }} --features jit
434429
430+ clippy :
431+ name : clippy
432+ runs-on : ${{ matrix.os }}
433+ permissions :
434+ contents : read
435+ if : |
436+ needs.determine_changes.outputs.rust_code == 'true' ||
437+ github.ref == 'refs/heads/main'
438+ strategy :
439+ fail-fast : false
440+ matrix :
441+ os :
442+ - macos-latest
443+ - ubuntu-latest
444+ - windows-latest
445+ steps :
446+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
447+ with :
448+ persist-credentials : false
449+
450+ - uses : dtolnay/rust-toolchain@stable
451+ with :
452+ components : clippy
453+
454+ - name : Restore cache
455+ uses : actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
456+ with :
457+ path : |
458+ ~/.cargo/bin/
459+ ~/.cargo/registry/index/
460+ ~/.cargo/registry/cache/
461+ ~/.cargo/git/db/
462+ target/
463+ key : ${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}-
464+ restore-keys : |
465+ ${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}-
466+ ${{ runner.os }}-stable--
467+
468+ - name : Clippy
469+ run : |
470+ cargo clippy \
471+ ${{ env.CARGO_ARGS }} \
472+ --workspace \
473+ --all-targets \
474+ --keep-going \
475+ ${{ env.WORKSPACE_EXCLUDES }} \
476+ -- -Dwarnings
477+
478+ cargo_shear :
479+ name : cargo shear
480+ runs-on : ubuntu-latest
481+ permissions :
482+ contents : read
483+ if : |
484+ needs.determine_changes.outputs.rust_code == 'true' ||
485+ github.ref == 'refs/heads/main'
486+ steps :
487+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
488+ with :
489+ persist-credentials : false
490+
491+ - uses : dtolnay/rust-toolchain@stable
492+
493+ - uses : cargo-bins/cargo-binstall@dc19f1e48450eefe5a29b8da6c6b00a87d730b37 # v1.18.1
494+
495+ - name : cargo shear
496+ run : |
497+ cargo binstall --no-confirm cargo-shear
498+ cargo shear
499+
435500 lint :
436501 name : Lint
437502 runs-on : ubuntu-latest
@@ -450,13 +515,6 @@ jobs:
450515 with :
451516 components : rustfmt
452517
453- - uses : cargo-bins/cargo-binstall@dc19f1e48450eefe5a29b8da6c6b00a87d730b37 # v1.18.1
454-
455- - name : cargo shear
456- run : |
457- cargo binstall --no-confirm cargo-shear
458- cargo shear
459-
460518 - name : actionlint
461519 uses : reviewdog/action-actionlint@6fb7acc99f4a1008869fa8a0f09cfca740837d9d # v1.72.0
462520
0 commit comments