Skip to content

Commit f1d013e

Browse files
committed
Revise CI workflows
Remove the deprecated actions-rs actions, and use rustup like we're doing elsewhere in imxrt-rs. Update the checkout action to v4.
1 parent 27be753 commit f1d013e

File tree

2 files changed

+18
-38
lines changed

2 files changed

+18
-38
lines changed

.github/workflows/doc.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,13 @@ jobs:
99
runs-on: ubuntu-latest
1010

1111
steps:
12-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v4
1313

14-
- uses: actions-rs/toolchain@v1
15-
name: Install toolchain
16-
with:
17-
toolchain: nightly
18-
profile: minimal
19-
override: true
20-
target: thumbv7em-none-eabihf
14+
- name: Install toolchain
15+
run: rustup toolchain install nightly --no-self-update --profile minimal --target thumbv7em-none-eabihf
2116

2217
- name: Generate docs
23-
uses: actions-rs/cargo@v1
24-
with:
25-
command: rustdoc
26-
args: --features imxrt1060 --target thumbv7em-none-eabihf -- --cfg docsrs
18+
run: cargo +nightly rustdoc --features imxrt1060 --target thumbv7em-none-eabihf -- --cfg docsrs
2719

2820
- name: Write redirect
2921
run: echo "<meta http-equiv=\"refresh\" content=\"0;url=imxrt_boot_gen\">" > target/thumbv7em-none-eabihf/doc/index.html

.github/workflows/rust.yml

Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v4
15+
- run: rustup toolchain install stable --no-self-update --profile minimal
1516
- name: Build (${{ matrix.feature }})
16-
run: cargo build --package=imxrt-boot-gen --verbose --features=${{ matrix.feature }}
17+
run: cargo build --package=imxrt-boot-gen --features=${{ matrix.feature }}
1718
- name: Run tests (${{ matrix.feature }})
18-
run: cargo test --package=imxrt-boot-gen --verbose --features=${{ matrix.feature }}
19+
run: cargo test --package=imxrt-boot-gen --features=${{ matrix.feature }}
1920

2021
clippy:
2122
strategy:
@@ -25,42 +26,29 @@ jobs:
2526
runs-on: ubuntu-latest
2627

2728
steps:
28-
- uses: actions/checkout@v2
29-
- run: rustup component add clippy
30-
- uses: actions-rs/clippy-check@v1
31-
with:
32-
token: ${{ secrets.GITHUB_TOKEN }}
33-
args: --package=imxrt-boot-gen --features=${{ matrix.feature }} -- -D warnings
34-
name: Run clippy (${{ matrix.feature }})
29+
- uses: actions/checkout@v4
30+
- run: rustup toolchain install stable --no-self-update --profile minimal --component clippy
31+
- run: cargo clippy --package=imxrt-boot-gen --features=${{ matrix.feature }} -- -D warnings
3532

3633
format:
3734
runs-on: ubuntu-latest
3835
steps:
39-
- uses: actions/checkout@v2
40-
- run: rustup component add rustfmt
36+
- uses: actions/checkout@v4
37+
- run: rustup toolchain install stable --no-self-update --profile minimal --component rustfmt
4138
- name: Run cargo fmt
42-
uses: actions-rs/cargo@v1
43-
with:
44-
command: fmt
45-
args: --all -- --check
39+
run: cargo fmt --all -- --check
4640

4741
fcbs:
4842
strategy:
4943
matrix:
5044
fcb: ["imxrt1010evk-fcb", "imxrt1060evk-fcb", "imxrt1170evk-fcb", "imxrt1180evk-fcb"]
5145
runs-on: ubuntu-latest
5246
steps:
53-
- uses: actions/checkout@v2
54-
- uses: actions-rs/toolchain@v1
55-
with:
56-
toolchain: stable
57-
target: thumbv7em-none-eabihf
47+
- uses: actions/checkout@v4
48+
- run: rustup toolchain install stable --no-self-update --profile minimal --target thumbv7em-none-eabihf --component clippy
5849
- name: Build for an embedded target
5950
run: cargo build --package=${{ matrix.fcb }} --verbose --target=thumbv7em-none-eabihf
6051
- name: Build and run tests on the host
6152
run: cargo test --package=${{ matrix.fcb }} --verbose
62-
- uses: actions-rs/clippy-check@v1
63-
with:
64-
token: ${{ secrets.GITHUB_TOKEN }}
65-
args: --package=${{ matrix.fcb }} -- -D warnings
66-
name: Lint the package
53+
- name: Lint the package
54+
run: cargo clippy --package=${{ matrix.fcb }} --target=thumbv7em-none-eabihf -- -D warnings

0 commit comments

Comments
 (0)