1
1
on :
2
- push : # Run CI for all branches except GitHub merge queue tmp branches
3
- branches-ignore :
4
- - " gh-readonly-queue/**"
5
2
pull_request : # Run CI for PRs on any branch
6
3
merge_group : # Run CI for the GitHub merge queue
4
+ workflow_dispatch : # Run CI when manually requested
7
5
8
6
name : Continuous integration
9
7
10
8
jobs :
11
- ci-stable :
9
+ check :
12
10
runs-on : ubuntu-latest
11
+ env : {"RUSTFLAGS": "-D warnings"}
13
12
strategy :
14
13
matrix :
15
14
target :
16
15
- thumbv6m-none-eabi
17
16
- thumbv7m-none-eabi
17
+ toolchain :
18
+ - stable
19
+ - nightly
18
20
19
21
steps :
20
- - uses : actions/checkout@v2
21
- - uses : actions-rs/ toolchain@v1
22
+ - uses : actions/checkout@v4
23
+ - uses : dtolnay/rust- toolchain@master
22
24
with :
23
- profile : minimal
24
- toolchain : stable
25
- target : ${{ matrix.target }}
26
- override : true
27
- - uses : actions-rs/cargo@v1
28
- with :
29
- command : check
30
- args : --target=${{ matrix.target }} --examples
31
- ci-nightly :
32
- runs-on : ubuntu-latest
33
- strategy :
34
- matrix :
35
- target :
36
- - thumbv6m-none-eabi
37
- - thumbv7m-none-eabi
25
+ targets : ${{ matrix.target }}
26
+ toolchain : ${{ matrix.toolchain }}
27
+ - run : cargo check --target=${{ matrix.target }} --examples
28
+ - if : ${{ matrix.toolchain == 'nightly' }}
29
+ run : cargo check --target=${{ matrix.target }} --examples --all-features
38
30
31
+ clippy :
32
+ name : Clippy
33
+ runs-on : ubuntu-latest
39
34
steps :
40
- - uses : actions/checkout@v2
41
- - uses : actions-rs/ toolchain@v1
35
+ - uses : actions/checkout@v4
36
+ - uses : dtolnay/rust- toolchain@nightly
42
37
with :
43
- profile : minimal
38
+ components : clippy
44
39
toolchain : nightly
45
- target : ${{ matrix.target }}
46
- override : true
47
- - uses : actions-rs/cargo@v1
40
+ targets : thumbv6m-none-eabi
41
+ - run : cargo clippy --all-features --examples --target=thumbv6m-none-eabi -- --deny warnings
42
+
43
+ format :
44
+ name : Format
45
+ runs-on : ubuntu-latest
46
+ steps :
47
+ - uses : actions/checkout@v4
48
+ - uses : dtolnay/rust-toolchain@nightly
48
49
with :
49
- command : check
50
- args : --target=${{ matrix.target }} --examples --features allocator_api
50
+ components : rustfmt
51
+ - run : cargo fmt -- --check
52
+
53
+ rustdoc :
54
+ name : rustdoc
55
+ runs-on : ubuntu-latest
56
+ env : {"RUSTDOCFLAGS": "-D warnings"}
57
+ steps :
58
+ - uses : actions/checkout@v4
59
+ - uses : dtolnay/rust-toolchain@nightly
60
+ - name : rustdoc
61
+ run : cargo rustdoc --all-features
0 commit comments