Skip to content

Commit 63b4b63

Browse files
authored
Merge pull request #392 from rust-embedded/rm-actions-rs
CI: actions-rs -> dtolnay
2 parents 7d3282b + 1decffb commit 63b4b63

File tree

1 file changed

+18
-48
lines changed

1 file changed

+18
-48
lines changed

.github/workflows/build.yml

Lines changed: 18 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,10 @@ jobs:
4040
${{ runner.OS }}-build-
4141
4242
- name: Install Rust
43-
uses: actions-rs/toolchain@v1
43+
uses: dtolnay/rust-toolchain@master
4444
with:
4545
toolchain: nightly
46-
target: x86_64-unknown-linux-gnu
4746
components: miri
48-
override: true
4947

5048
- name: Run miri
5149
run: MIRIFLAGS=-Zmiri-ignore-leaks cargo miri test
@@ -59,18 +57,12 @@ jobs:
5957
uses: actions/checkout@v4
6058

6159
- name: Install Rust
62-
uses: actions-rs/toolchain@v1
60+
uses: dtolnay/rust-toolchain@stable
6361
with:
64-
profile: minimal
65-
toolchain: stable
66-
override: true
6762
components: rustfmt
6863

6964
- name: cargo fmt --check
70-
uses: actions-rs/cargo@v1
71-
with:
72-
command: fmt
73-
args: --all -- --check
65+
run: cargo fmt --all -- --check
7466

7567
# Compilation check
7668
check:
@@ -121,18 +113,13 @@ jobs:
121113
${{ runner.OS }}-build-
122114
123115
- name: Install Rust ${{ matrix.toolchain }} with target (${{ matrix.target }})
124-
uses: actions-rs/toolchain@v1
116+
uses: dtolnay/rust-toolchain@master
125117
with:
126118
toolchain: ${{ matrix.toolchain }}
127-
target: ${{ matrix.target }}
128-
override: true
119+
targets: ${{ matrix.target }}
129120

130121
- name: cargo check
131-
uses: actions-rs/cargo@v1
132-
with:
133-
use-cross: false
134-
command: check
135-
args: --target=${{ matrix.target }} --no-default-features --features=${{ matrix.features }}
122+
run: cargo check --target=${{ matrix.target }} --no-default-features --features=${{ matrix.features }}
136123

137124
doc:
138125
name: doc
@@ -173,18 +160,12 @@ jobs:
173160
${{ runner.OS }}-build-
174161
175162
- name: Install stable Rust with target (${{ matrix.target }})
176-
uses: actions-rs/toolchain@v1
163+
uses: dtolnay/rust-toolchain@stable
177164
with:
178-
toolchain: stable
179-
target: ${{ matrix.target }}
180-
override: true
165+
targets: ${{ matrix.target }}
181166

182167
- name: cargo doc
183-
uses: actions-rs/cargo@v1
184-
with:
185-
use-cross: false
186-
command: doc
187-
args: --target=${{ matrix.target }} --no-default-features --features=${{ matrix.features }}
168+
run: cargo doc --target=${{ matrix.target }} --no-default-features --features=${{ matrix.features }}
188169

189170
# Run cpass tests
190171
testcpass:
@@ -230,16 +211,13 @@ jobs:
230211
${{ runner.OS }}-build-
231212
232213
- name: Install Rust ${{ matrix.toolchain }} with target (${{ matrix.target }})
233-
uses: actions-rs/toolchain@v1
214+
uses: dtolnay/rust-toolchain@master
234215
with:
235216
toolchain: ${{ matrix.toolchain }}
236-
target: ${{ matrix.target }}
237-
override: true
238-
- uses: actions-rs/cargo@v1
239-
with:
240-
use-cross: false
241-
command: test
242-
args: --test cpass --target=${{ matrix.target }} --features=${{ matrix.features }} ${{ matrix.buildtype }}
217+
targets: ${{ matrix.target }}
218+
219+
- name: cargo test
220+
run: cargo test --test cpass --target=${{ matrix.target }} --features=${{ matrix.features }} ${{ matrix.buildtype }}
243221

244222
# Run test suite for UI
245223
testtsan:
@@ -279,24 +257,20 @@ jobs:
279257
${{ runner.OS }}-build-
280258
281259
- name: Install Rust ${{ matrix.toolchain }} with target (${{ matrix.target }})
282-
uses: actions-rs/toolchain@v1
260+
uses: dtolnay/rust-toolchain@master
283261
with:
284262
toolchain: ${{ matrix.toolchain }}
285263
target: ${{ matrix.target }}
286264
components: rust-src
287-
override: true
288265

289266
- name: Export variables
290267
run: |
291268
echo RUSTFLAGS="-Z sanitizer=thread" >> $GITHUB_ENV
292269
echo TSAN_OPTIONS="suppressions=$(pwd)/suppressions.txt" >> $GITHUB_ENV
293270
echo $GITHUB_ENV
294271
295-
- uses: actions-rs/cargo@v1
296-
with:
297-
use-cross: false
298-
command: test
299-
args: -Zbuild-std --test tsan --target=${{ matrix.target }} --features=${{ matrix.features }} ${{ matrix.buildtype }} -- --test-threads=1
272+
- name: cargo test
273+
run: cargo test -Zbuild-std --test tsan --target=${{ matrix.target }} --features=${{ matrix.features }} ${{ matrix.buildtype }} -- --test-threads=1
300274

301275
# Run cfail tests on MSRV
302276
testcfail:
@@ -331,11 +305,7 @@ jobs:
331305
${{ runner.OS }}-build-
332306
333307
- name: Install Rust
334-
uses: actions-rs/toolchain@v1
335-
with:
336-
toolchain: stable
337-
target: x86_64-unknown-linux-gnu
338-
override: true
308+
uses: dtolnay/rust-toolchain@stable
339309

340310
- name: Run cargo
341311
run: cargo run

0 commit comments

Comments
 (0)