Skip to content

Commit

Permalink
Fix more CI steps for tokio-unstable feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Finomnis committed Nov 1, 2024
1 parent 8d62809 commit 4d6f79a
Showing 1 changed file with 23 additions and 11 deletions.
34 changes: 23 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ jobs:
- aarch64-unknown-linux-gnu
- x86_64-pc-windows-gnu
- x86_64-unknown-linux-gnu
features:
- flags: "--all-features"
env: 'RUSTFLAGS="--cfg tokio_unstable"'
- flags: ""
- flags: "--no-default-features"
steps:
- name: Checkout sources
uses: actions/checkout@v4
Expand All @@ -30,11 +35,18 @@ jobs:
uses: taiki-e/install-action@cross

- name: Build
run: cross build --all-features --all-targets --release --target=${{ matrix.target }}
run: ${{ matrix.features.env }} cross build ${{ matrix.features.flags }} --all-targets --release --target=${{ matrix.target }}

test:
name: Test Suite
runs-on: ubuntu-latest
strategy:
matrix:
features:
- flags: "--all-features"
env: 'RUSTFLAGS="--cfg tokio_unstable"'
- flags: ""
- flags: "--no-default-features"
needs: [lints, docs]
env:
RUSTFLAGS: "-D warnings"
Expand All @@ -45,10 +57,8 @@ jobs:
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable

#- uses: Swatinem/rust-cache@v1

- name: Run cargo test
run: cargo test -- --test-threads 1
run: ${{ matrix.features.env }} cargo test ${{ matrix.features.flags }} -- --test-threads 1

msrv:
name: Minimum Supported Rust Version
Expand All @@ -66,8 +76,6 @@ jobs:
- name: Install cargo-msrv
run: cargo binstall --version 0.16.0-beta.17 --no-confirm cargo-msrv

#- uses: Swatinem/rust-cache@v1

- name: Check MSRV
run: cargo msrv verify --log-target=stdout --output-format=json

Expand Down Expand Up @@ -140,6 +148,12 @@ jobs:
lints:
name: Lints
runs-on: ubuntu-latest
matrix:
features:
- flags: "--all-features"
env: 'RUSTFLAGS="--cfg tokio_unstable"'
- flags: ""
- flags: "--no-default-features"
steps:
- name: Checkout sources
uses: actions/checkout@v4
Expand All @@ -153,7 +167,7 @@ jobs:
run: cargo fmt --all -- --check

- name: Run cargo clippy
run: cargo clippy --all-features --all-targets -- -D warnings
run: ${{ matrix.features.env }} cargo clippy ${{ matrix.features.flags }} --all-targets -- -D warnings

docs:
name: Documentation
Expand Down Expand Up @@ -185,18 +199,16 @@ jobs:
- name: Install nightly toolchain
uses: dtolnay/rust-toolchain@nightly

#- uses: Swatinem/rust-cache@v1

- name: Build
env:
RUSTFLAGS: "-Z sanitizer=address"
run: cargo build --target x86_64-unknown-linux-gnu --tests
run: ${{ matrix.features.env }} cargo build ${{ matrix.features.flags }} --target x86_64-unknown-linux-gnu --tests

- name: Run tests with leak sanitizer
env:
RUSTFLAGS: "-Z sanitizer=address"
run:
cargo test
${{ matrix.features.env }} cargo test ${{ matrix.features.flags }}
--target x86_64-unknown-linux-gnu --tests
-- --test-threads 1

Expand Down

0 comments on commit 4d6f79a

Please sign in to comment.