-
Notifications
You must be signed in to change notification settings - Fork 57
61 lines (55 loc) · 1.61 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
on:
pull_request: # Run CI for PRs on any branch
merge_group: # Run CI for the GitHub merge queue
workflow_dispatch: # Run CI when manually requested
name: Continuous integration
jobs:
check:
runs-on: ubuntu-latest
env: {"RUSTFLAGS": "-D warnings"}
strategy:
matrix:
target:
- thumbv6m-none-eabi
- thumbv7m-none-eabi
toolchain:
- stable
- nightly
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
targets: ${{ matrix.target }}
toolchain: ${{ matrix.toolchain }}
- run: cargo check --target=${{ matrix.target }} --examples
- if: ${{ matrix.toolchain == 'nightly' }}
run: cargo check --target=${{ matrix.target }} --examples --all-features
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: clippy
toolchain: nightly
targets: thumbv6m-none-eabi
- run: cargo clippy --all-features --examples --target=thumbv6m-none-eabi -- --deny warnings
format:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- run: cargo fmt -- --check
rustdoc:
name: rustdoc
runs-on: ubuntu-latest
env: {"RUSTDOCFLAGS": "-D warnings"}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- name: rustdoc
run: cargo rustdoc --all-features