@@ -113,33 +113,30 @@ jobs:
113113 - name : cargo clippy --workspace --all-targets -- -D warnings
114114 run : cargo clippy --workspace --all-targets -- -D warnings
115115
116- cargo-clippy-all-features :
117- name : cargo clippy --all-features
116+ cargo-check-lints :
117+ name : check custom lints
118118 runs-on : SubtensorCI
119119 strategy :
120120 matrix :
121121 rust-branch :
122122 - stable
123123 rust-target :
124124 - x86_64-unknown-linux-gnu
125- # - x86_64-apple-darwin
125+ # - x86_64-apple-darwin
126126 os :
127127 - ubuntu-latest
128128 # - macos-latest
129- include :
130- - os : ubuntu-latest
131- # - os: macos-latest
132129 env :
133130 RELEASE_NAME : development
134- # RUSTFLAGS: -A warnings
135131 RUSTV : ${{ matrix.rust-branch }}
132+ RUSTFLAGS : -D warnings
136133 RUST_BACKTRACE : full
137134 RUST_BIN_DIR : target/${{ matrix.rust-target }}
138135 SKIP_WASM_BUILD : 1
139136 TARGET : ${{ matrix.rust-target }}
140137 steps :
141138 - name : Check-out repository under $GITHUB_WORKSPACE
142- uses : actions/checkout@v2
139+ uses : actions/checkout@v4
143140
144141 - name : Install dependencies
145142 run : |
@@ -158,12 +155,14 @@ jobs:
158155 with :
159156 key : ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}
160157
161- - name : cargo clippy --workspace --all-targets --all-features -- -D warnings
162- run : cargo clippy --workspace --all-targets --all-features -- -D warnings
158+ - name : check lints
159+ run : |
160+ set -o pipefail
161+ cargo check 2>&1 | sed -r "s/\x1B\[[0-9;]*[mK]//g" | grep "warning:" && exit 1
162+ echo "No warnings found."
163163
164- # runs cargo test --workspace
165- cargo-test :
166- name : cargo test
164+ cargo-clippy-all-features :
165+ name : cargo clippy --all-features
167166 runs-on : SubtensorCI
168167 strategy :
169168 matrix :
@@ -188,7 +187,7 @@ jobs:
188187 TARGET : ${{ matrix.rust-target }}
189188 steps :
190189 - name : Check-out repository under $GITHUB_WORKSPACE
191- uses : actions/checkout@v4
190+ uses : actions/checkout@v2
192191
193192 - name : Install dependencies
194193 run : |
@@ -202,17 +201,17 @@ jobs:
202201 components : rustfmt, clippy
203202 profile : minimal
204203
205- - name : Utilize Rust shared cached
204+ - name : Utilize Shared Rust Cache
206205207206 with :
208207 key : ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}
209208
210- - name : cargo test --workspace
211- run : cargo test --workspace
209+ - name : cargo clippy --workspace --all-targets --all-features -- -D warnings
210+ run : cargo clippy --workspace --all-targets --all-features -- -D warnings
212211
213- # runs cargo test --workspace --features=runtime-benchmarks
214- cargo-test-benchmarks :
215- name : cargo test w/benchmarks
212+ # runs cargo test --workspace
213+ cargo-test :
214+ name : cargo test
216215 runs-on : SubtensorCI
217216 strategy :
218217 matrix :
@@ -256,8 +255,8 @@ jobs:
256255 with :
257256 key : ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}
258257
259- - name : cargo test --workspace --features=runtime-benchmarks
260- run : cargo test --workspace --features=runtime-benchmarks
258+ - name : cargo test --workspace --all-features
259+ run : cargo test --workspace --all-features
261260
262261 # ensures cargo fix has no trivial changes that can be applied
263262 cargo-fix :
@@ -339,4 +338,3 @@ jobs:
339338
340339 - name : Check features
341340 run : zepter run check
342-
0 commit comments