Skip to content

Commit 54e91e8

Browse files
committed
Update github actions script to latest versions
**Description** Also modify the steps so that they use `cargo` and `rustup` directly instead of through the `actions-rs/*` providers. **Motivation** There were a bunch of warnings in the CI output **Testing Done** Going to test by repeatedly pushing to a PR and hoping CI passes
1 parent aa899e6 commit 54e91e8

File tree

1 file changed

+19
-51
lines changed

1 file changed

+19
-51
lines changed

.github/workflows/rust.yml

Lines changed: 19 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,13 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout sources
16-
uses: actions/checkout@v2
16+
uses: actions/checkout@v4
1717

1818
- name: Install stable toolchain
19-
uses: actions-rs/toolchain@v1
20-
with:
21-
profile: minimal
22-
toolchain: stable
23-
override: true
19+
run: rustup toolchain install stable
2420

25-
- name: Run cargo check
26-
uses: actions-rs/cargo@v1
27-
with:
28-
command: check
21+
- name: Run cargo test
22+
run: cargo +stable check
2923

3024
test:
3125
name: Test Suite
@@ -38,75 +32,49 @@ jobs:
3832
- beta
3933
- nightly
4034
- "1.85" # MSRV
41-
4235
steps:
4336
- name: Checkout sources
44-
uses: actions/checkout@v2
37+
uses: actions/checkout@v4
4538

4639
- name: Install ${{ matrix.rust }} toolchain
47-
uses: actions-rs/toolchain@v1
48-
with:
49-
profile: minimal
50-
toolchain: ${{ matrix.rust }}
51-
override: true
40+
run: rustup toolchain install ${{ matrix.rust }}
5241

5342
- name: Run cargo test
54-
uses: actions-rs/cargo@v1
55-
with:
56-
command: test
43+
run: cargo +${{ matrix.rust }} test
5744

5845
test_miri:
5946
name: Test Suite (Miri)
6047
needs: test
6148
runs-on: ubuntu-latest
6249
steps:
6350
- name: Checkout sources
64-
uses: actions/checkout@v2
51+
uses: actions/checkout@v4
6552

6653
- name: Install nightly toolchain
67-
uses: actions-rs/toolchain@v1
68-
with:
69-
profile: minimal
70-
toolchain: nightly
71-
override: true
72-
components: miri
54+
run: rustup toolchain install --component miri nightly
7355

7456
- name: Run cargo miri setup
75-
uses: actions-rs/cargo@v1
76-
with:
77-
command: miri
78-
args: setup
57+
run: cargo +nightly miri setup
7958

8059
- name: Run cargo miri test
81-
uses: actions-rs/cargo@v1
82-
with:
83-
command: miri
84-
args: test
60+
uses: cargo +nightly miri test
8561

8662
lints:
8763
name: Lints
8864
needs: test
8965
runs-on: ubuntu-latest
9066
steps:
9167
- name: Checkout sources
92-
uses: actions/checkout@v2
68+
uses: actions/checkout@v4
9369

94-
- name: Install stable toolchain
95-
uses: actions-rs/toolchain@v1
96-
with:
97-
profile: minimal
98-
toolchain: nightly
99-
override: true
100-
components: rustfmt, clippy
70+
- name: Install nightly toolchain
71+
run: rustup toolchain install --component rustfmt nightly
10172

10273
- name: Run cargo fmt
103-
uses: actions-rs/cargo@v1
104-
with:
105-
command: fmt
106-
args: --all -- --check
74+
run: cargo +nightly fmt --all -- --check
75+
76+
- name: Install stable toolchain
77+
run: rustup toolchain install --component clippy stable
10778

10879
- name: Run cargo clippy
109-
uses: actions-rs/cargo@v1
110-
with:
111-
command: clippy
112-
args: -- -D warnings
80+
run: cargo +stable clippy -- -D warnings

0 commit comments

Comments
 (0)