Skip to content

Commit daf1d32

Browse files
committed
ci: swap actions-rs for dtolnay/rust-toolchain
1 parent a135cd4 commit daf1d32

File tree

4 files changed

+18
-46
lines changed

4 files changed

+18
-46
lines changed

.github/workflows/ci.yml

+18-41
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,20 @@ jobs:
2626
- "x86_64-unknown-linux-musl"
2727
steps:
2828
- uses: actions/checkout@v3
29-
- uses: actions-rs/toolchain@v1
29+
- uses: dtolnay/rust-toolchain@stable
3030
with:
31-
toolchain: stable
32-
target: ${{ matrix.target }}
31+
targets: ${{ matrix.target }}
3332
- run: cargo build --target ${{ matrix.target }}
3433

3534
macos_build:
3635
name: Mac Build
37-
runs-on: macos-10.15
36+
runs-on: macos-12
3837
env:
3938
RUSTFLAGS: "-D warnings"
4039
steps:
4140
- uses: actions/checkout@v3
42-
- uses: actions-rs/toolchain@v1
43-
with:
44-
toolchain: stable
45-
target: x86_64-apple-darwin
46-
- run: cargo build --target x86_64-apple-darwin
41+
- uses: dtolnay/rust-toolchain@stable
42+
- run: cargo build
4743

4844
windows_build:
4945
name: Windows Build
@@ -52,10 +48,7 @@ jobs:
5248
RUSTFLAGS: "-D warnings"
5349
steps:
5450
- uses: actions/checkout@v3
55-
- uses: actions-rs/toolchain@v1
56-
with:
57-
toolchain: stable
58-
target: x86_64-pc-windows-msvc
51+
- uses: dtolnay/rust-toolchain@stable
5952
- run: cargo build
6053

6154
linux_test:
@@ -68,24 +61,20 @@ jobs:
6861
target: ["x86_64-unknown-linux-musl", "x86_64-unknown-linux-gnu"]
6962
steps:
7063
- uses: actions/checkout@v3
71-
- uses: actions-rs/toolchain@v1
64+
- uses: dtolnay/rust-toolchain@stable
7265
with:
73-
toolchain: stable
74-
target: ${{ matrix.target }}
66+
targets: ${{ matrix.target }}
7567
- run: cargo test --all-features --target ${{ matrix.target }}
7668

7769
macos_test:
7870
name: Mac Test
79-
runs-on: macos-10.15
71+
runs-on: macos-12
8072
env:
8173
RUSTFLAGS: "-D warnings"
8274
steps:
8375
- uses: actions/checkout@v3
84-
- uses: actions-rs/toolchain@v1
85-
with:
86-
toolchain: stable
87-
target: x86_64-apple-darwin
88-
- run: cargo test --target x86_64-apple-darwin
76+
- uses: dtolnay/rust-toolchain@stable
77+
- run: cargo test
8978

9079
windows_test:
9180
name: Windows Unit Tests
@@ -94,25 +83,18 @@ jobs:
9483
RUSTFLAGS: "-D warnings"
9584
steps:
9685
- uses: actions/checkout@v3
97-
- uses: actions-rs/toolchain@v1
98-
with:
99-
toolchain: stable
100-
target: x86_64-pc-windows-msvc
86+
- uses: dtolnay/rust-toolchain@stable
10187
- run: cargo test
10288

10389
clippy_check:
10490
name: Clippy
10591
runs-on: ubuntu-latest
10692
steps:
10793
- uses: actions/checkout@v3
108-
- uses: actions-rs/toolchain@v1
94+
- uses: dtolnay/rust-toolchain@stable
10995
with:
110-
toolchain: stable
11196
components: clippy
112-
- uses: actions-rs/clippy-check@v1
113-
with:
114-
token: ${{ secrets.GITHUB_TOKEN }}
115-
args: --all-features
97+
- run: cargo clippy --all-features -- --deny warnings
11698

11799
docs:
118100
name: docs
@@ -121,21 +103,18 @@ jobs:
121103
RUSTDOCFLAGS: "-D warnings"
122104
steps:
123105
- uses: actions/checkout@v3
124-
- uses: actions-rs/toolchain@v1
125-
with:
126-
toolchain: stable
106+
- uses: dtolnay/rust-toolchain@stable
127107
- run: cargo doc
128108

129109
format_check:
130110
name: Rust Format
131111
runs-on: ubuntu-latest
132112
steps:
133113
- uses: actions/checkout@v3
134-
- uses: actions-rs/toolchain@v1
114+
- uses: dtolnay/rust-toolchain@nightly
135115
with:
136-
toolchain: stable
137116
components: rustfmt
138-
- run: cargo fmt -- --check
117+
- run: cargo +nightly fmt -- --check
139118

140119
release:
141120
name: crates.io release
@@ -153,9 +132,7 @@ jobs:
153132
runs-on: ubuntu-latest
154133
steps:
155134
- uses: actions/checkout@v3
156-
- uses: actions-rs/toolchain@v1
157-
with:
158-
toolchain: stable
135+
- uses: dtolnay/rust-toolchain@stable
159136
- run: cargo publish --token ${CRATES_IO_TOKEN}
160137
env:
161138
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}

Cargo.toml

-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ repository = "https://github.com/ftdi-rs/libftd2xx/"
1111
documentation = "https://docs.rs/libftd2xx"
1212
license = "MIT"
1313

14-
[badges]
15-
maintenance = { status = "experimental" }
16-
1714
[features]
1815
static = ["libftd2xx-ffi/static"]
1916

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
![Maintenance](https://img.shields.io/badge/maintenance-experimental-blue.svg)
21
[![crates.io](https://img.shields.io/crates/v/libftd2xx.svg)](https://crates.io/crates/libftd2xx)
32
[![docs.rs](https://docs.rs/libftd2xx/badge.svg)](https://docs.rs/libftd2xx/)
43
[![CI](https://github.com/ftdi-rs/libftd2xx/workflows/CI/badge.svg)](https://github.com/ftdi-rs/libftd2xx/actions)

README.tpl

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{{badges}}
21
[![crates.io](https://img.shields.io/crates/v/libftd2xx.svg)](https://crates.io/crates/libftd2xx)
32
[![docs.rs](https://docs.rs/libftd2xx/badge.svg)](https://docs.rs/libftd2xx/)
43
[![CI](https://github.com/ftdi-rs/libftd2xx/workflows/CI/badge.svg)](https://github.com/ftdi-rs/libftd2xx/actions)

0 commit comments

Comments
 (0)