-
Notifications
You must be signed in to change notification settings - Fork 3
38 lines (35 loc) · 1.02 KB
/
lib_build.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
on: [push, pull_request]
name: Lib build
env:
CARGO_TERM_COLOR: always
jobs:
check_format_build:
name: Lib - Check, Format, Build
runs-on: ubuntu-latest
steps:
#Checkout source
- name: Checkout sources
uses: actions/checkout@v4
#toolchain and tools
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
#build and lint
- name: Run cargo check
run: cargo check
- name: Run cargo fmt
run: cargo fmt --all -- --check
- name: Run cargo clippy
run: cargo clippy -- -D warnings
- name: Run cargo clippy with defmt
run: cargo clippy --features defmt -- -D warnings
- name: Run cargo clippy on tests
run: cargo clippy --tests -- -D warnings
- name: Run cargo test
run: cargo test
- name: Run cargo build
run: cargo build
- name: Run cargo build with defmt
run: cargo build --features defmt