File tree Expand file tree Collapse file tree 3 files changed +12
-10
lines changed Expand file tree Collapse file tree 3 files changed +12
-10
lines changed Original file line number Diff line number Diff line change 30
30
- name : Check style
31
31
run : ./ci/style.sh
32
32
33
+ clippy :
34
+ name : Clippy check
35
+ runs-on : ubuntu-24.04
36
+ timeout-minutes : 10
37
+ steps :
38
+ - uses : actions/checkout@v4
39
+ - uses : Swatinem/rust-cache@v2
40
+ # Here we use the latest stable Rust toolchain already installed by GitHub
41
+ # Ideally we should run it for every target, but we cannot rely on unstable toolchains
42
+ # due to Clippy not being consistent between them.
43
+ - run : cargo clippy --workspace --exclude libc-test --exclude ctest-test --all-targets -- -D warnings
44
+
33
45
# This runs `cargo build --target ...` for all T1 and T2 targets`
34
46
verify_build :
35
47
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 libc@1.0.0-alpha.1 -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 const-extern-fn
You can’t perform that action at this time.
0 commit comments