-
Notifications
You must be signed in to change notification settings - Fork 542
74 lines (66 loc) · 2.15 KB
/
lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: lint
env:
# It's really `--all-features`, but not adding the mutually exclusive features from rkyv
ALL_NON_EXCLUSIVE_FEATURES: --features "default unstable-locales rkyv-64 rkyv-validation serde arbitrary"
on:
push:
branches: [main, 0.5.x]
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-unknown-linux-gnu, x86_64-pc-windows-msvc
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --check -- --color=always
- run: cargo fmt --check --manifest-path fuzz/Cargo.toml
- run: cargo fmt --check --manifest-path bench/Cargo.toml
- run: |
cargo clippy ${{ env.ALL_NON_EXCLUSIVE_FEATURES }} --all-targets --color=always \
-- -D warnings
- run: |
cargo clippy --target=x86_64-pc-windows-msvc --all-targets --color=always \
-- -D warnings
- run: |
cargo clippy --manifest-path fuzz/Cargo.toml --all-targets --color=always \
-- -D warnings
- run: |
cargo clippy --manifest-path bench/Cargo.toml --all-targets --color=always \
-- -D warnings
env:
RUSTFLAGS: "-Dwarnings"
toml:
runs-on: ubuntu-latest
container:
image: tamasfe/taplo:0.8.0
steps:
- uses: actions/checkout@v4
- run: taplo lint
- run: taplo fmt --check --diff
cargo-deny:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v2
check-doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo install cargo-deadlinks
- run: cargo deadlinks -- ${{ env.ALL_NON_EXCLUSIVE_FEATURES }}
- run: cargo doc ${{ env.ALL_NON_EXCLUSIVE_FEATURES }} --no-deps
env:
RUSTDOCFLAGS: -Dwarnings
cffconvert:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: citation-file-format/cffconvert-github-action@2.0.0
with:
args: --validate