Skip to content

Commit 8ea3d00

Browse files
authored
ci: swap actions-rs for dtolnay/rust-toolchain
1 parent 1a0f28f commit 8ea3d00

File tree

1 file changed

+17
-28
lines changed

1 file changed

+17
-28
lines changed

.github/workflows/ci.yml

+17-28
Original file line numberDiff line numberDiff line change
@@ -14,89 +14,80 @@ jobs:
1414
build:
1515
name: Cargo Build
1616
runs-on: ubuntu-latest
17+
env: {"RUSTFLAGS": "-D warnings"}
1718
steps:
1819
- uses: actions/checkout@v3
19-
- uses: actions-rs/toolchain@v1
20-
with:
21-
toolchain: stable
22-
- run: RUSTFLAGS="-D warnings" cargo build
20+
- uses: dtolnay/rust-toolchain@stable
21+
- run: cargo build
2322

2423
examples:
2524
name: Cargo Examples
2625
runs-on: ubuntu-latest
26+
env: {"RUSTFLAGS": "-D warnings"}
2727
strategy:
2828
matrix:
2929
features:
3030
- libftd2xx
3131
- ftdi
3232
steps:
3333
- uses: actions/checkout@v3
34-
- uses: actions-rs/toolchain@v1
35-
with:
36-
toolchain: stable
34+
- uses: dtolnay/rust-toolchain@stable
3735
- run: |
3836
if ${{ matrix.features == 'ftdi' }}
3937
then
4038
sudo apt-get update
4139
sudo apt-get install -y libftdi1 libftdi1-dev pkg-config
4240
fi
43-
RUSTFLAGS="-D warnings" cargo build --features ${{ matrix.features }} --examples
41+
cargo build --features ${{ matrix.features }} --examples
4442
4543
test:
4644
name: Cargo Test
4745
runs-on: ubuntu-latest
46+
env: {"RUSTFLAGS": "-D warnings"}
4847
strategy:
4948
matrix:
5049
features:
5150
- libftd2xx
5251
- ftdi
5352
steps:
5453
- uses: actions/checkout@v3
55-
- uses: actions-rs/toolchain@v1
56-
with:
57-
toolchain: stable
54+
- uses: dtolnay/rust-toolchain@stable
5855
- run: |
5956
if ${{ matrix.features == 'ftdi' }}
6057
then
6158
sudo apt-get update
6259
sudo apt-get install -y libftdi1 libftdi1-dev pkg-config
6360
fi
64-
RUSTFLAGS="-D warnings" cargo test --features ${{ matrix.features }}
61+
cargo test --features ${{ matrix.features }}
6562
6663
doc:
6764
name: Cargo Doc
6865
runs-on: ubuntu-latest
66+
env: {"RUSTDOCFLAGS": "-D warnings"}
6967
steps:
7068
- uses: actions/checkout@v3
71-
- uses: actions-rs/toolchain@v1
72-
with:
73-
toolchain: stable
74-
- run: RUSTDOCFLAGS="-D warnings" cargo doc --all-features
69+
- uses: dtolnay/rust-toolchain@stable
70+
- run: cargo doc --all-features
7571

7672
clippy:
7773
name: Clippy
7874
runs-on: ubuntu-latest
7975
steps:
8076
- uses: actions/checkout@v3
81-
- uses: actions-rs/toolchain@v1
77+
- uses: dtolnay/rust-toolchain@stable
8278
with:
83-
toolchain: stable
8479
components: clippy
85-
- uses: actions-rs/[email protected]
86-
with:
87-
token: ${{ secrets.GITHUB_TOKEN }}
88-
args: --all-features
80+
- run: cargo clippy --all-features -- --deny warnings
8981

9082
format:
9183
name: Cargo Fmt
9284
runs-on: ubuntu-latest
9385
steps:
9486
- uses: actions/checkout@v3
95-
- uses: actions-rs/toolchain@v1
87+
- uses: dtolnay/rust-toolchain@nightly
9688
with:
97-
toolchain: nightly
9889
components: rustfmt
99-
- run: cargo fmt -- --check
90+
- run: cargo +nightly fmt -- --check
10091

10192
release:
10293
name: crates.io release
@@ -105,9 +96,7 @@ jobs:
10596
runs-on: ubuntu-latest
10697
steps:
10798
- uses: actions/checkout@v3
108-
- uses: actions-rs/toolchain@v1
109-
with:
110-
toolchain: stable
99+
- uses: dtolnay/rust-toolchain@stable
111100
- run: cargo publish --token ${CRATES_IO_TOKEN}
112101
env:
113102
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}

0 commit comments

Comments
 (0)