Skip to content

Commit 3103e63

Browse files
committed
Update CI
1 parent 0b8c442 commit 3103e63

File tree

6 files changed

+52
-75
lines changed

6 files changed

+52
-75
lines changed

.github/workflows/ci.yml

+44-10
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,61 @@ on:
44
- "gh-readonly-queue/**"
55
pull_request: # Run CI for PRs on any branch
66
merge_group: # Run CI for the GitHub merge queue
7+
workflow_dispatch: # Run CI when manually requested
78

89
name: Continuous integration
910

1011
jobs:
11-
ci:
12+
check:
1213
runs-on: ubuntu-latest
14+
env: {"RUSTFLAGS": "-D warnings"}
1315
strategy:
1416
matrix:
1517
target:
1618
- thumbv6m-none-eabi
1719
- thumbv7m-none-eabi
20+
toolchain:
21+
- stable
22+
- nightly
1823

1924
steps:
20-
- uses: actions/checkout@v2
21-
- uses: actions-rs/toolchain@v1
25+
- uses: actions/checkout@v4
26+
- uses: dtolnay/rust-toolchain@master
2227
with:
23-
profile: minimal
24-
toolchain: stable
25-
target: ${{ matrix.target }}
26-
override: true
27-
- uses: actions-rs/cargo@v1
28+
targets: ${{ matrix.target }}
29+
toolchain: ${{ matrix.toolchain }}
30+
- run: cargo check --target=${{ matrix.target }} --examples
31+
- if: ${{ matrix.toolchain == 'nightly' }}
32+
run: cargo check --target=${{ matrix.target }} --examples --all-features
33+
34+
clippy:
35+
name: Clippy
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/checkout@v4
39+
- uses: dtolnay/rust-toolchain@nightly
40+
with:
41+
components: clippy
42+
toolchain: nightly
43+
targets: thumbv6m-none-eabi
44+
- run: cargo clippy --all-features --examples --target=thumbv6m-none-eabi -- --deny warnings
45+
46+
format:
47+
name: Format
48+
runs-on: ubuntu-latest
49+
steps:
50+
- uses: actions/checkout@v4
51+
- uses: dtolnay/rust-toolchain@nightly
2852
with:
29-
command: check
30-
args: --target=${{ matrix.target }} --examples
53+
components: rustfmt
54+
- run: cargo fmt -- --check
55+
56+
rustdoc:
57+
name: rustdoc
58+
runs-on: ubuntu-latest
59+
env: {"RUSTDOCFLAGS": "-D warnings"}
60+
steps:
61+
- uses: actions/checkout@v4
62+
- uses: dtolnay/rust-toolchain@nightly
63+
- name: rustdoc
64+
run: cargo rustdoc --all-features

.github/workflows/clippy.yml

-28
This file was deleted.

.github/workflows/cron.yml

+5-11
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,12 @@ jobs:
99
ci-cron:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
13-
- uses: actions-rs/toolchain@v1
12+
- uses: actions/checkout@v4
13+
- uses: dtolnay/rust-toolchain@stable
1414
with:
15-
profile: minimal
16-
toolchain: stable
17-
target: thumbv6m-none-eabi
18-
override: true
19-
- uses: actions-rs/cargo@v1
20-
with:
21-
command: check
22-
args: --examples --target thumbv6m-none-eabi
23-
- uses: imjohnbo/issue-bot@v2
15+
targets: thumbv6m-none-eabi
16+
- run: cargo check --examples --target thumbv6m-none-eabi
17+
- uses: imjohnbo/issue-bot@v3
2418
if: failure()
2519
with:
2620
title: CI Failure

.github/workflows/rustfmt.yml

-24
This file was deleted.

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ Please refer to the documentation of [`critical-section`](https://docs.rs/critic
5757
Licensed under either of
5858

5959
- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or
60-
http://www.apache.org/licenses/LICENSE-2.0)
61-
- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
60+
<http://www.apache.org/licenses/LICENSE-2.0>)
61+
- MIT license ([LICENSE-MIT](LICENSE-MIT) or <http://opensource.org/licenses/MIT>)
6262

6363
at your option.
6464

examples/global_alloc.rs

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ fn main() -> ! {
2424
let mut xs = Vec::new();
2525
xs.push(1);
2626

27+
#[allow(clippy::empty_loop)]
2728
loop { /* .. */ }
2829
}
2930

0 commit comments

Comments
 (0)