3939 code:
4040 - '!**/*.md'
4141
42+ clippy :
43+ needs : detect-changes
44+ if : needs.detect-changes.outputs.code-changed == 'true'
45+ name : Clippy
46+ runs-on : ubuntu-latest
47+ steps :
48+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
49+ with :
50+ persist-credentials : false
51+ submodules : true
52+
53+ - uses : oxc-project/setup-rust@d286d43bc1f606abbd98096666ff8be68c8d5f57 # v1.0.0
54+ with :
55+ save-cache : ${{ github.ref_name == 'main' }}
56+ cache-key : clippy
57+ components : clippy
58+
59+ - run : rustup target add x86_64-unknown-linux-musl
60+ - run : pip install cargo-zigbuild
61+
62+ # --locked: verify Cargo.lock is up to date (replaces the removed `cargo check --locked`)
63+ - run : cargo clippy --locked --all-targets --all-features -- -D warnings
64+
4265 test :
4366 needs : detect-changes
4467 if : needs.detect-changes.outputs.code-changed == 'true'
@@ -62,17 +85,19 @@ jobs:
6285 persist-credentials : false
6386 submodules : true
6487
65- # Disable Windows Defender real-time scanning to speed up I/O-heavy builds (~30-50% faster)
66- - name : Disable Windows Defender
88+ - name : Setup Dev Drive
89+ uses : samypr100/setup-dev-drive@30f0f98ae5636b2b6501e181dfb3631b9974818d # v4.0.0
6790 if : runner.os == 'Windows'
68- shell : powershell
69- run : Set-MpPreference -DisableRealtimeMonitoring $true
91+ with :
92+ drive-size : 10GB
93+ env-mapping : |
94+ CARGO_HOME,{{ DEV_DRIVE }}/.cargo
95+ RUSTUP_HOME,{{ DEV_DRIVE }}/.rustup
7096
7197 - uses : oxc-project/setup-rust@d286d43bc1f606abbd98096666ff8be68c8d5f57 # v1.0.0
7298 with :
7399 save-cache : ${{ github.ref_name == 'main' }}
74100 cache-key : test
75- components : clippy
76101
77102 - run : rustup target add ${{ matrix.target }}
78103
@@ -82,15 +107,6 @@ jobs:
82107 - run : pip install cargo-zigbuild
83108 if : ${{ matrix.os == 'ubuntu-latest' }}
84109
85- - run : cargo check --locked --all-targets --all-features --target ${{ matrix.target }}
86- env :
87- RUSTFLAGS : ' -D warnings --cfg tokio_unstable' # also update .cargo/config.toml
88-
89- - name : Clippy
90- id : clippy
91- continue-on-error : true
92- run : cargo clippy --all-targets --all-features -- -D warnings
93-
94110 # For x86_64-apple-darwin on arm64 runner, install x64 node so fspy preload dylib
95111 # (compiled for x86_64) can be injected into node processes running under Rosetta.
96112 # oxc-project/setup-node doesn't support the architecture input, so use
@@ -117,10 +133,6 @@ jobs:
117133 - run : cargo-zigbuild test --target x86_64-unknown-linux-gnu.2.17
118134 if : ${{ matrix.os == 'ubuntu-latest' }}
119135
120- - name : Check clippy result
121- if : ${{ steps.clippy.outcome == 'failure' }}
122- run : exit 1
123-
124136 fmt :
125137 name : Format and Check Deps
126138 runs-on : ubuntu-latest
@@ -154,6 +166,7 @@ jobs:
154166 runs-on : ubuntu-latest
155167 if : always()
156168 needs :
169+ - clippy
157170 - test
158171 - fmt
159172 steps :
0 commit comments