11on :
2- push : # Run CI for all branches except GitHub merge queue tmp branches
3- branches-ignore :
4- - " gh-readonly-queue/**"
52 pull_request : # Run CI for PRs on any branch
63 merge_group : # Run CI for the GitHub merge queue
4+ workflow_dispatch : # Run CI when manually requested
75
86name : Continuous integration
97
108jobs :
11- ci-stable :
9+ check :
1210 runs-on : ubuntu-latest
11+ env : {"RUSTFLAGS": "-D warnings"}
1312 strategy :
1413 matrix :
1514 target :
1615 - thumbv6m-none-eabi
1716 - thumbv7m-none-eabi
17+ toolchain :
18+ - stable
19+ - nightly
1820
1921 steps :
20- - uses : actions/checkout@v2
21- - uses : actions-rs/ toolchain@v1
22+ - uses : actions/checkout@v4
23+ - uses : dtolnay/rust- toolchain@master
2224 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
3830
31+ clippy :
32+ name : Clippy
33+ runs-on : ubuntu-latest
3934 steps :
40- - uses : actions/checkout@v2
41- - uses : actions-rs/ toolchain@v1
35+ - uses : actions/checkout@v4
36+ - uses : dtolnay/rust- toolchain@nightly
4237 with :
43- profile : minimal
38+ components : clippy
4439 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
4849 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