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 2929 - name : Check style
3030 run : ./ci/style.sh
3131
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+
3244 # This runs `cargo build --target ...` for all T1 and T2 targets`
3345 verify_build :
3446 name : Verify build
Original file line number Diff line number Diff line change 44
55[ -n " ${CI:- } " ] && check=" --check"
66
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-
107cargo test --manifest-path libc-test/Cargo.toml --test style -- --nocapture
118
129command -v rustfmt
Original file line number Diff line number Diff line change @@ -44,13 +44,9 @@ test_target() {
4444 # The basic command that is run each time
4545 cmd=" cargo +$rust build --target $target "
4646
47- # The basic clippy command
48- clippy_cmd=" cargo +$rust clippy --all-targets --target $target "
49-
5047 if [ " ${no_dist} " != " 0" ]; then
5148 # If we can't download a `core`, we need to build it
5249 cmd=" $cmd -Zbuild-std=core,alloc"
53- clippy_cmd=" $clippy_cmd -Zbuild-std=core,alloc"
5450
5551 # FIXME: With `build-std` feature, `compiler_builtins` emits a lof of lint warnings.
5652 RUSTFLAGS=" ${RUSTFLAGS:- } -Aimproper_ctypes_definitions"
@@ -71,9 +67,6 @@ test_target() {
7167 done
7268 fi
7369
74- # Run cargo clippy first
75- $clippy_cmd
76-
7770 # Test with expected combinations of features
7871 $cmd
7972 $cmd --features extra_traits
You can’t perform that action at this time.
0 commit comments