Skip to content

Commit 4dcbb3b

Browse files
committed
chore(ci): replace actions-rs with run and use taiki-e/install-action or taiki-e/cache-cargo-install-action
1 parent 82fca9f commit 4dcbb3b

File tree

1 file changed

+13
-39
lines changed

1 file changed

+13
-39
lines changed

.github/workflows/CI.yml

Lines changed: 13 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -80,17 +80,11 @@ jobs:
8080
toolchain: ${{ matrix.rust }}
8181

8282
- name: Test
83-
uses: actions-rs/cargo@v1
84-
with:
85-
command: test
86-
args: ${{ matrix.features }}
83+
run: cargo test ${{ matrix.features }}
8784

8885
- name: Test all benches
8986
if: matrix.benches
90-
uses: actions-rs/cargo@v1
91-
with:
92-
command: test
93-
args: --benches ${{ matrix.features }}
87+
run: cargo test --benches ${{ matrix.features }}
9488

9589
msrv:
9690
name: Check MSRV (${{ matrix.rust }})
@@ -115,10 +109,7 @@ jobs:
115109
toolchain: ${{ matrix.rust }}
116110

117111
- name: Check
118-
uses: actions-rs/cargo@v1
119-
with:
120-
command: check
121-
args: --features full
112+
run: cargo check --features full
122113

123114
miri:
124115
name: Test with Miri
@@ -150,7 +141,7 @@ jobs:
150141
uses: dtolnay/rust-toolchain@stable
151142

152143
- name: Install cargo-hack
153-
run: cargo install cargo-hack
144+
uses: taiki-e/install-action@cargo-hack
154145

155146
- name: check --feature-powerset
156147
run: cargo hack --no-dev-deps check --feature-powerset --depth 2 --skip ffi
@@ -176,10 +167,7 @@ jobs:
176167
toolchain: ${{ matrix.rust }}
177168

178169
- name: Check
179-
uses: actions-rs/cargo@v1
180-
with:
181-
command: check
182-
args: --features full,backports,deprecated
170+
run: cargo check --features full,backports,deprecated
183171

184172
ffi:
185173
name: Test C API (FFI)
@@ -193,29 +181,22 @@ jobs:
193181
uses: dtolnay/rust-toolchain@stable
194182

195183
- name: Install cbindgen
196-
uses: actions-rs/cargo@v1
184+
uses: taiki-e/cache-cargo-install-action@v1
197185
with:
198-
command: install
199-
args: cbindgen
186+
tool: cbindgen
200187

201188
- name: Build FFI
202-
uses: actions-rs/cargo@v1
189+
run: cargo rustc --features client,http1,http2,ffi --crate-type cdylib
203190
env:
204191
RUSTFLAGS: --cfg hyper_unstable_ffi
205-
with:
206-
command: rustc
207-
args: --features client,http1,http2,ffi --crate-type cdylib
208192

209193
- name: Make Examples
210194
run: cd capi/examples && make client
211195

212196
- name: Run FFI unit tests
213-
uses: actions-rs/cargo@v1
197+
run: cargo test --features full,ffi --lib
214198
env:
215199
RUSTFLAGS: --cfg hyper_unstable_ffi
216-
with:
217-
command: test
218-
args: --features full,ffi --lib
219200

220201
ffi-header:
221202
name: Verify hyper.h is up to date
@@ -228,18 +209,14 @@ jobs:
228209
uses: dtolnay/rust-toolchain@stable
229210

230211
- name: Install cbindgen
231-
uses: actions-rs/cargo@v1
212+
uses: taiki-e/cache-cargo-install-action@v1
232213
with:
233-
command: install
234-
args: cbindgen
214+
tool: cbindgen
235215

236216
- name: Build FFI
237-
uses: actions-rs/cargo@v1
217+
run: cargo build --features client,http1,http2,ffi
238218
env:
239219
RUSTFLAGS: --cfg hyper_unstable_ffi
240-
with:
241-
command: build
242-
args: --features client,http1,http2,ffi
243220

244221
- name: Ensure that hyper.h is up to date
245222
run: ./capi/gen_header.sh --verify
@@ -256,7 +233,4 @@ jobs:
256233
uses: dtolnay/rust-toolchain@nightly
257234

258235
- name: cargo doc
259-
uses: actions-rs/cargo@v1
260-
with:
261-
command: rustdoc
262-
args: --features full,ffi -- --cfg docsrs --cfg hyper_unstable_ffi -D broken-intra-doc-links
236+
run: cargo rustdoc --features full,ffi -- --cfg docsrs --cfg hyper_unstable_ffi -D broken-intra-doc-links

0 commit comments

Comments
 (0)