Skip to content

chore(ci): replace actions-rs with run and use taiki-e/install-action or taiki-e/cache-cargo-install-action #3204

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 13 additions & 39 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ jobs:
components: rustfmt

- name: cargo fmt --check
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
run: cargo fmt --all --check

test:
name: Test ${{ matrix.rust }} on ${{ matrix.os }}
Expand Down Expand Up @@ -81,17 +78,11 @@ jobs:
toolchain: ${{ matrix.rust }}

- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: ${{ matrix.features }}
run: cargo test ${{ matrix.features }}

- name: Test all benches
if: matrix.benches
uses: actions-rs/cargo@v1
with:
command: test
args: --benches ${{ matrix.features }}
run: cargo test --benches ${{ matrix.features }}

msrv:
name: Check MSRV
Expand All @@ -113,10 +104,7 @@ jobs:
toolchain: ${{ steps.msrv.outputs.version }}

- name: Check
uses: actions-rs/cargo@v1
with:
command: check
args: --features full
run: cargo check --features full

miri:
name: Test with Miri
Expand Down Expand Up @@ -148,7 +136,7 @@ jobs:
uses: dtolnay/rust-toolchain@nightly

- name: Install cargo-hack
run: cargo install cargo-hack
uses: taiki-e/install-action@cargo-hack

- name: check --feature-powerset
run: cargo hack check --feature-powerset --depth 2 --skip ffi -Z avoid-dev-deps
Expand All @@ -165,23 +153,17 @@ jobs:
uses: dtolnay/rust-toolchain@stable

- name: Build FFI
uses: actions-rs/cargo@v1
env:
RUSTFLAGS: --cfg hyper_unstable_ffi
with:
command: rustc
args: --features client,http1,http2,ffi --crate-type cdylib
run: cargo rustc --features client,http1,http2,ffi --crate-type cdylib

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

- name: Run FFI unit tests
uses: actions-rs/cargo@v1
env:
RUSTFLAGS: --cfg hyper_unstable_ffi
with:
command: test
args: --features server,client,http1,http2,ffi --lib
run: cargo test --features server,client,http1,http2,ffi --lib

ffi-header:
name: Verify hyper.h is up to date
Expand All @@ -194,24 +176,19 @@ jobs:
uses: dtolnay/rust-toolchain@nightly

- name: Install cbindgen
uses: actions-rs/cargo@v1
uses: taiki-e/cache-cargo-install-action@v1
with:
command: install
args: cbindgen
tool: cbindgen

- name: Install cargo-expand
uses: actions-rs/cargo@v1
uses: taiki-e/cache-cargo-install-action@v1
with:
command: install
args: cargo-expand
tool: cargo-expand

- name: Build FFI
uses: actions-rs/cargo@v1
env:
RUSTFLAGS: --cfg hyper_unstable_ffi
with:
command: build
args: --features client,http1,http2,ffi
run: cargo build --features client,http1,http2,ffi

- name: Ensure that hyper.h is up to date
run: ./capi/gen_header.sh --verify
Expand All @@ -228,7 +205,4 @@ jobs:
uses: dtolnay/rust-toolchain@nightly

- name: cargo doc
uses: actions-rs/cargo@v1
with:
command: rustdoc
args: --features full,ffi -- --cfg docsrs --cfg hyper_unstable_ffi -D broken-intra-doc-links
run: cargo rustdoc --features full,ffi -- --cfg docsrs --cfg hyper_unstable_ffi -D broken-intra-doc-links