-
Notifications
You must be signed in to change notification settings - Fork 3
85 lines (85 loc) · 2.77 KB
/
ci.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
75
76
77
78
79
80
81
82
83
84
85
on: [push, pull_request]
name: CI
jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install audit
run: cargo install cargo-audit
- name: Audit
run: cargo audit
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- name: Format
run: cargo fmt --all -- --check
lints:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Install linter
run: cargo install cargo-lints
- name: Lints
run: cargo lints clippy --all-targets --all-features
check-stable:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Check (no features)
run: cargo check --all-targets --no-default-features
- name: Check (all features)
run: cargo check --all-targets --all-features
check-nightly:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- name: Check (no features)
run: cargo check --all-targets --no-default-features
- name: Check (all features)
run: cargo check --all-targets --all-features
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Docs
run: RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown, thumbv8m.main-none-eabi
- name: Release build (no features)
run: cargo build --release --all-targets --no-default-features
- name: Release build (all features)
run: cargo build --release --all-targets --all-features
- name: Release build (WASM)
run: cargo build --release --target wasm32-unknown-unknown --no-default-features
- name: Release build (metal)
run: cargo build --release --target thumbv8m.main-none-eabi --no-default-features
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Test (debug, no features)
run: cargo test --no-default-features
- name: Test (debug, all features)
run: cargo test --all-features
- name: Test (release, no features)
run: cargo test --release --no-default-features
- name: Test (release, all features)
run: cargo test --release --all-features