Skip to content

Commit bfe2978

Browse files
committed
Update CI
1 parent 0b8c442 commit bfe2978

File tree

6 files changed

+52
-78
lines changed

6 files changed

+52
-78
lines changed

.github/workflows/ci.yml

+44-13
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,61 @@
11
on:
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

86
name: Continuous integration
97

108
jobs:
11-
ci:
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
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
30+
31+
clippy:
32+
name: Clippy
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@v4
36+
- uses: dtolnay/rust-toolchain@nightly
37+
with:
38+
components: clippy
39+
toolchain: nightly
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
2849
with:
29-
command: check
30-
args: --target=${{ matrix.target }} --examples
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

.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)