File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Check
2+
3+ on :
4+ push : {}
5+ pull_request : {}
6+
7+ jobs :
8+ clippy :
9+ name : Clippy
10+ runs-on : ubuntu-latest
11+ permissions :
12+ contents : read
13+
14+ strategy :
15+ matrix :
16+ include :
17+ - target : aarch64-linux-android
18+ - target : aarch64-apple-ios
19+ - target : aarch64-apple-darwin
20+ - target : x86_64-pc-windows-gnu
21+ - target : x86_64-unknown-linux-gnu
22+ default : true
23+
24+ steps :
25+ - uses : actions/checkout@v4
26+
27+ - name : Setup Rust toolchain
28+ uses : dtolnay/rust-toolchain@stable
29+
30+ - name : Add target
31+ if : matrix.target != 'x86_64-unknown-linux-gnu'
32+ run : rustup target add ${{ matrix.target }}
33+
34+ - name : Cache
35+ uses : Swatinem/rust-cache@v2
36+ with :
37+ cache-on-failure : " true"
38+ cache-all-crates : " true"
39+
40+ - name : Clippy
41+ run : |
42+ if [ "${{ matrix.target }}" = "x86_64-unknown-linux-gnu" ]; then
43+ cargo clippy --all-targets --all-features -- -D warnings
44+ else
45+ cargo clippy --all-targets --all-features --target ${{ matrix.target }} -- -D warnings
46+ fi
47+
48+ fmt :
49+ name : Format
50+ runs-on : ubuntu-latest
51+ permissions :
52+ contents : read
53+
54+ steps :
55+ - uses : actions/checkout@v4
56+
57+ - name : Setup Rust toolchain
58+ uses : dtolnay/rust-toolchain@stable
59+
60+ - name : Cache
61+ uses : Swatinem/rust-cache@v2
62+ with :
63+ cache-on-failure : " true"
64+ cache-all-crates : " true"
65+
66+ - name : Format
67+ run : cargo fmt --all --check
You can’t perform that action at this time.
0 commit comments