Skip to content

chore(ci): update ci config #27

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 2 commits into from
May 2, 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
86 changes: 22 additions & 64 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,13 @@ jobs:
name: Check Style
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
override: true
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 All @@ -61,20 +52,14 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@v1
- uses: actions/checkout@v3

- name: Install Rust (${{ matrix.rust }})
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true

- name: Test
uses: actions-rs/cargo@v1
with:
command: test
- run: cargo test

msrv:
name: Check MSRV (${{ matrix.rust }})
Expand All @@ -90,80 +75,53 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@v1
- uses: actions/checkout@v3

- name: Install Rust (${{ matrix.rust }})
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true

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

miri:
name: Test with Miri
needs: [style]
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v1
- uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@nightly
with:
profile: minimal
toolchain: nightly
components: miri
override: true

- name: Test
# Can't enable tcp feature since Miri does not support the tokio runtime
run: MIRIFLAGS="-Zmiri-disable-isolation" cargo miri test
env:
# Can't enable tcp feature since Miri does not support the tokio runtime
MIRIFLAGS: "-Zmiri-disable-isolation"
run: cargo miri test

features:
name: features
needs: [style]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- 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 -Z avoid-dev-deps
- run: cargo hack check --feature-powerset --depth 2 -Z avoid-dev-deps

doc:
name: Build docs
needs: [style, test]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- uses: dtolnay/rust-toolchain@nightly

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