mirror of
https://github.com/tokio-rs/tracing.git
synced 2026-04-14 05:00:01 +00:00
ci: try cargo-hack (#502)
## Motivation I've found multiple compilation error involving non-default features. ## Solution cargo-hack was a suggested solution (by @davidbarsky and @hawkw) to run compilation checks on all features. * ci: try cargo-hack * ci: split cargo-hack execution in multiple jobs * ci: try splitting checks of tracing-subscriber in dedicated job Fixes #501
This commit is contained in:
committed by
Eliza Weisman
parent
ed26b22156
commit
f1df31b196
75
.github/workflows/CI.yml
vendored
75
.github/workflows/CI.yml
vendored
@@ -17,6 +17,81 @@ jobs:
|
||||
- name: Check
|
||||
run: cargo check --all --bins --examples --tests --benches
|
||||
|
||||
cargo-hack:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
# cargo hack --feature-powerset will have a significant permutation
|
||||
# number, we can't just use --all as it increases the runtime
|
||||
# further than what we would like to
|
||||
subcrate:
|
||||
- tracing-attributes
|
||||
- tracing-core
|
||||
- tracing-futures
|
||||
- tracing-log
|
||||
- tracing-macros
|
||||
- tracing-serde
|
||||
- tracing-tower
|
||||
# tracing and tracing-subscriber have too many features to be checked by
|
||||
# cargo-hack --feature-powerset, combinatorics there is exploding.
|
||||
#- tracing
|
||||
#- tracing-subscriber
|
||||
steps:
|
||||
- uses: hecrj/setup-rust-action@v1
|
||||
with:
|
||||
rust-version: stable
|
||||
- uses: actions/checkout@master
|
||||
- name: install cargo-hack
|
||||
run: cargo install cargo-hack
|
||||
- name: cargo hack check
|
||||
working-directory: ${{ matrix.subcrate }}
|
||||
run: cargo hack check --feature-powerset --no-dev-deps
|
||||
|
||||
cargo-check-tracing:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
featureset:
|
||||
- ""
|
||||
- async-await
|
||||
- async-await std
|
||||
- async-await log-always
|
||||
- async-await std log-always
|
||||
- log-always
|
||||
- std log-always
|
||||
- std
|
||||
steps:
|
||||
- uses: hecrj/setup-rust-action@v1
|
||||
with:
|
||||
rust-version: stable
|
||||
- uses: actions/checkout@master
|
||||
- name: cargo check
|
||||
working-directory: tracing
|
||||
run: cargo check --no-default-features --features "${{ matrix.featureset }}"
|
||||
|
||||
cargo-check-subscriber:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
featureset:
|
||||
- ""
|
||||
- fmt
|
||||
- fmt ansi
|
||||
- fmt json
|
||||
- fmt json ansi
|
||||
- fmt registry
|
||||
- fmt env-filter
|
||||
- registry
|
||||
- env-filter
|
||||
steps:
|
||||
- uses: hecrj/setup-rust-action@v1
|
||||
with:
|
||||
rust-version: stable
|
||||
- uses: actions/checkout@master
|
||||
- name: cargo check
|
||||
working-directory: tracing-subscriber
|
||||
run: cargo check --no-default-features --features "${{ matrix.featureset }}"
|
||||
|
||||
test-versions:
|
||||
# Test against the stable, beta, and nightly Rust toolchains on ubuntu-latest.
|
||||
needs: check
|
||||
|
||||
Reference in New Issue
Block a user