File tree 3 files changed +12
-10
lines changed
3 files changed +12
-10
lines changed Original file line number Diff line number Diff line change 29
29
- name : Check style
30
30
run : ./ci/style.sh
31
31
32
+ clippy :
33
+ name : Clippy check
34
+ runs-on : ubuntu-24.04
35
+ timeout-minutes : 10
36
+ steps :
37
+ - uses : actions/checkout@v4
38
+ - uses : Swatinem/rust-cache@v2
39
+ # Here we use the latest stable Rust toolchain already installed by GitHub
40
+ # Ideally we should run it for every target, but we cannot rely on unstable toolchains
41
+ # due to Clippy not being consistent between them.
42
+ - run : cargo clippy --workspace --exclude libc-test --exclude ctest-test --all-targets -- -D warnings
43
+
32
44
# This runs `cargo build --target ...` for all T1 and T2 targets`
33
45
verify_build :
34
46
name : Verify build
Original file line number Diff line number Diff line change 4
4
5
5
[ -n " ${CI:- } " ] && check=" --check"
6
6
7
- # TODO: for some reason using `--workspace` validates a lot of generated code in ./target/** dir
8
- cargo clippy -p
[email protected] -p ctest --all-targets -- -D warnings
9
-
10
7
cargo test --manifest-path libc-test/Cargo.toml --test style -- --nocapture
11
8
12
9
command -v rustfmt
Original file line number Diff line number Diff line change @@ -44,13 +44,9 @@ test_target() {
44
44
# The basic command that is run each time
45
45
cmd=" cargo +$rust build --target $target "
46
46
47
- # The basic clippy command
48
- clippy_cmd=" cargo +$rust clippy --all-targets --target $target "
49
-
50
47
if [ " ${no_dist} " != " 0" ]; then
51
48
# If we can't download a `core`, we need to build it
52
49
cmd=" $cmd -Zbuild-std=core,alloc"
53
- clippy_cmd=" $clippy_cmd -Zbuild-std=core,alloc"
54
50
55
51
# FIXME: With `build-std` feature, `compiler_builtins` emits a lof of lint warnings.
56
52
RUSTFLAGS=" ${RUSTFLAGS:- } -Aimproper_ctypes_definitions"
@@ -71,9 +67,6 @@ test_target() {
71
67
done
72
68
fi
73
69
74
- # Run cargo clippy first
75
- $clippy_cmd
76
-
77
70
# Test with expected combinations of features
78
71
$cmd
79
72
$cmd --features extra_traits
You can’t perform that action at this time.
0 commit comments