@@ -25,43 +25,15 @@ jobs:
2525 with :
2626 llvm-version : 22
2727
28- - name : Setup Rust
29- uses : dtolnay/rust-toolchain@master
30- with :
31- toolchain : 1.95.0
32- components : rustfmt, clippy
33-
34- - name : Setup nightly Rust for rule-preprocessor clippy
35- uses : dtolnay/rust-toolchain@master
36- with :
37- toolchain : nightly
38- components : rustfmt, clippy, rustc-dev
28+ - name : Setup Python
29+ run : pip install ruff
3930
40- - name : Check C++ formatting
41- run : find cpp2rust tests -name '*.cpp' -o -name '*.h' -o -name '*.c' | xargs clang-format --dry-run --Werror
31+ - name : Configure
32+ run : cmake -GNinja -B build -S .
4233
43- - name : Check Rust formatting
44- run : |
45- cargo fmt --manifest-path rules/Cargo.toml -- --check
46- cargo fmt --manifest-path rule-preprocessor/Cargo.toml -- --check
47- cargo fmt --manifest-path libcc2rs/Cargo.toml -- --check
48- cargo fmt --manifest-path libcc2rs-macros/Cargo.toml -- --check
49- find tests -name '*.rs' -print0 | xargs -0 rustfmt --check
34+ - name : Format files
35+ run : ninja format
36+ working-directory : build
5037
51- - name : Check Rust lints
52- run : |
53- cargo clippy --manifest-path rules/Cargo.toml --all-targets --all-features -- -Dwarnings
54- cargo +nightly clippy --manifest-path rule-preprocessor/Cargo.toml --all-targets --all-features -- -Dwarnings
55- cargo clippy --manifest-path libcc2rs/Cargo.toml --all-targets --all-features -- -Dwarnings
56- cargo clippy --manifest-path libcc2rs-macros/Cargo.toml --all-targets --all-features -- -Dwarnings
57-
58- - name : Check Python (ruff)
59- uses : astral-sh/ruff-action@v3
60- with :
61- args : ' check'
62- src : tests/lit/lit/formats/Cpp2RustTest.py
63- - name : Check Python formatting (ruff)
64- uses : astral-sh/ruff-action@v3
65- with :
66- args : ' format --check'
67- src : tests/lit/lit/formats/Cpp2RustTest.py
38+ - name : Check format
39+ run : git diff --exit-code
0 commit comments