Skip to content

Commit 9cc5b88

Browse files
committed
ci: simplify clippy
1 parent b3567ab commit 9cc5b88

File tree

2 files changed

+8
-52
lines changed

2 files changed

+8
-52
lines changed

.github/workflows/ci.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,9 @@ jobs:
222222
run: |
223223
RUSTDOCFLAGS=-Dwarnings cargo +stable doc --no-deps -p spirv-std
224224
RUSTDOCFLAGS=-Dwarnings cargo +stable doc --no-deps -p spirv-builder --no-default-features
225-
- name: Clippy & custom lints
225+
- name: cargo clippy
226+
run: cargo clippy --all-targets -- -D warnings
227+
- name: custom lints
226228
run: .github/workflows/lint.sh
227229

228230
cargo-deny:

.github/workflows/lint.sh

Lines changed: 5 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,6 @@
11
#!/usr/bin/env bash
22
set -e
33

4-
if [[ -z "${CI}" ]]; then
5-
FEAT="use-compiled-tools"
6-
else
7-
FEAT="use-installed-tools"
8-
fi
9-
10-
function clippy() {
11-
echo ::group::"$1"
12-
cargo clippy \
13-
--manifest-path "$1/Cargo.toml" \
14-
--no-default-features \
15-
--features "$FEAT" \
16-
--all-targets \
17-
-- -D warnings
18-
echo ::endgroup::
19-
}
20-
21-
function clippy_no_features() {
22-
echo ::group::"$1"
23-
cargo clippy \
24-
--manifest-path "$1/Cargo.toml" \
25-
--all-targets \
26-
-- -D warnings
27-
echo ::endgroup::
28-
}
29-
30-
# Core crates
31-
clippy_no_features crates/rustc_codegen_spirv-target-specs
32-
clippy_no_features crates/rustc_codegen_spirv-types
33-
clippy crates/rustc_codegen_spirv
34-
clippy crates/spirv-builder
35-
clippy_no_features crates/spirv-std
36-
37-
# Examples
38-
clippy examples/multibuilder
39-
clippy examples/runners/ash
40-
clippy_no_features examples/runners/cpu
41-
clippy examples/runners/wgpu
42-
43-
# shaders
44-
clippy_no_features examples/shaders/sky-shader
45-
clippy_no_features examples/shaders/simplest-shader
46-
clippy_no_features examples/shaders/compute-shader
47-
clippy_no_features examples/shaders/mouse-shader
48-
clippy_no_features examples/shaders/reduce
49-
50-
# tests
51-
clippy tests/compiletests
52-
clippy tests/difftests/bin
53-
clippy tests/difftests/lib
54-
554
# Custom lints
565

576
# 1. Disallow `std::env` (mis)use from `rustc_codegen_spirv`
@@ -111,6 +60,11 @@ version_test crates/spirv-std
11160
# HACK(eddyb) see `crates/rustc_codegen_spirv/build.rs` for more on `pqp_cg_ssa`
11261
# (a patched copy of `rustc_codegen_ssa`).
11362
echo ::group::rustc_codegen_spirv_disable_pqp_cg_ssa
63+
if [[ -z "${CI}" ]]; then
64+
FEAT="use-compiled-tools"
65+
else
66+
FEAT="use-installed-tools"
67+
fi
11468
cargo clippy \
11569
--manifest-path "crates/rustc_codegen_spirv/Cargo.toml" \
11670
--no-default-features \

0 commit comments

Comments
 (0)