Skip to content

Commit c38c430

Browse files
committed
Revise CI workflows
Similar to other updates throughout the imxrt-rs org.
1 parent f96a6e2 commit c38c430

1 file changed

Lines changed: 29 additions & 31 deletions

File tree

.github/workflows/ci.yml

Lines changed: 29 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -12,52 +12,50 @@ jobs:
1212
format:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v2
16-
- run: rustup component add rustfmt
15+
- uses: actions/checkout@v6
16+
- run: rustup toolchain install stable --no-self-update --profile minimal
1717
- name: Check library formatting
18-
uses: actions-rs/cargo@v1
19-
with:
20-
command: fmt
21-
args: --verbose --all -- --check
22-
23-
# For each chip, build and lint the main library
18+
run: cargo fmt --all --check
19+
20+
# Build the library for each supported chip
21+
check:
22+
runs-on: ubuntu-latest
23+
strategy:
24+
matrix:
25+
chip: [imxrt1011, imxrt1021, imxrt1052, imxrt1062, imxrt1176_cm7]
26+
steps:
27+
- uses: actions/checkout@v6
28+
- run: rustup toolchain install stable --no-self-update --profile minimal --target thumbv7em-none-eabihf
29+
- name: Check the package with ${{ matrix.chip }}
30+
run: cargo check --target thumbv7em-none-eabihf --features=imxrt-ral/${{ matrix.chip }}
31+
32+
# Lint the library
2433
clippy:
2534
runs-on: ubuntu-latest
2635
steps:
27-
- uses: actions/checkout@v2
28-
- uses: actions-rs/toolchain@v1
29-
with:
30-
toolchain: stable
31-
components: clippy
32-
target: thumbv7em-none-eabihf
33-
override: true
34-
profile: minimal
35-
- uses: actions-rs/clippy-check@v1
36-
with:
37-
token: ${{ secrets.GITHUB_TOKEN }}
38-
args: --verbose --all-features --target thumbv7em-none-eabihf --features=imxrt-ral/imxrt1011 -- -D warnings
39-
name: Lint the library
36+
- uses: actions/checkout@v6
37+
- run: rustup toolchain install stable --no-self-update --profile minimal --component clippy --target thumbv7em-none-eabihf
38+
- name: Lint the library (all features)
39+
run: cargo clippy --verbose --all-features --target thumbv7em-none-eabihf --features=imxrt-ral/imxrt1011 -- -D warnings
40+
- name: Lint the library (no default features)
41+
run: cargo clippy --verbose --target thumbv7em-none-eabihf --features=imxrt-ral/imxrt1011 -- -D warnings
4042

4143
# Run unit and documentation tests for a chip
4244
test:
4345
runs-on: ubuntu-latest
4446
steps:
45-
- uses: actions/checkout@v2
47+
- uses: actions/checkout@v6
48+
- run: rustup toolchain install stable --no-self-update --profile minimal
4649
- name: Run unit and documentation tests
47-
uses: actions-rs/cargo@v1
48-
with:
49-
command: test
50-
args: --all-features --verbose
50+
run: cargo test --all-features --verbose
5151

5252
# Make sure documentation builds, and doclinks are valid
5353
doc:
5454
env:
5555
RUSTDOCFLAGS: -D warnings
5656
runs-on: ubuntu-latest
5757
steps:
58-
- uses: actions/checkout@v2
58+
- uses: actions/checkout@v6
59+
- run: rustup toolchain install stable --no-self-update --profile minimal
5960
- name: Check documentation and doclinks
60-
uses: actions-rs/cargo@v1
61-
with:
62-
command: rustdoc
63-
args: --all-features --features=imxrt-ral/imxrt1011
61+
run: cargo rustdoc --all-features --features=imxrt-ral/imxrt1011

0 commit comments

Comments
 (0)