-
Notifications
You must be signed in to change notification settings - Fork 25
34 lines (33 loc) · 1.22 KB
/
clippy-check.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
name: Formatting, lints, and code checks
on: [push, pull_request]
jobs:
clippy_check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install components
uses: dtolnay/rust-toolchain@master
with:
components: clippy, rustfmt
toolchain: nightly
- name: Toolchain thumbv8m.main-none-eabi
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
targets: thumbv8m.main-none-eabi
- name: Check formatting
run: cargo +nightly fmt --all -- --check
- name: Install linter
run: cargo install cargo-lints
- name: Run linter
run: cargo +nightly lints clippy --all-targets --all-features
- name: Check code
run: cargo +stable check --release --all-targets
- name: Check code (no default features)
run: cargo +stable check --release --no-default-features
# This check here is to ensure that it builds for no-std rust targets
- name: Check code (no-std)
run: cargo +nightly check --no-default-features --target=thumbv8m.main-none-eabi -Zavoid-dev-deps
- name: Check benchmarks
run: cargo +nightly check --benches