mirror of
https://github.com/tokio-rs/tracing.git
synced 2026-03-22 07:34:34 +00:00
## Motivation This branch fixes broken builds of `tracing-futures` with the `tokio-alpha` feature. ## Solution I've added the missing `WithDispatch` impl for `std::future::Future` that was breaking the build. I've also updated the `tokio` alpha dependency, and added a CI check that the tokio-alpha feature flag compiles. Fixes #337 * futures: add missing `WithDispatch` impl * futures: update tokio alphas * chore: add CI job to ensure tokio alpha compiles Signed-off-by: Eliza Weisman <eliza@buoyant.io>
117 lines
3.4 KiB
YAML
117 lines
3.4 KiB
YAML
name: CI
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
check:
|
|
# Run `cargo check` first to ensure that the pushed code at least compiles.
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
rust: [stable, 1.34.0]
|
|
steps:
|
|
- uses: hecrj/setup-rust-action@v1
|
|
with:
|
|
rust-version: ${{ matrix.rust }}
|
|
- uses: actions/checkout@master
|
|
- name: Check
|
|
run: cargo check --all --bins --examples --tests --benches
|
|
|
|
test-versions:
|
|
# Test against the stable, beta, and nightly Rust toolchains on ubuntu-latest.
|
|
needs: check
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
rust: [stable, beta, nightly, 1.34.0]
|
|
steps:
|
|
- uses: hecrj/setup-rust-action@v1
|
|
with:
|
|
rust-version: ${{ matrix.rust }}
|
|
- uses: actions/checkout@master
|
|
- name: Build
|
|
run: cargo build
|
|
- name: Run tests
|
|
run: cargo test --all
|
|
|
|
test-os:
|
|
# Test against stable Rust across macOS, Windows, and Linux.
|
|
needs: check
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest, macOS-latest]
|
|
steps:
|
|
- uses: hecrj/setup-rust-action@v1
|
|
with:
|
|
rust-version: stable
|
|
- uses: actions/checkout@master
|
|
- name: Build
|
|
run: cargo build
|
|
- name: Run tests
|
|
run: cargo test --all
|
|
|
|
features-stable:
|
|
# Feature flag tests that run on stable Rust.
|
|
needs: check
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: hecrj/setup-rust-action@v1
|
|
with:
|
|
rust-version: stable
|
|
- uses: actions/checkout@master
|
|
- name: "Test log support"
|
|
run: (cd tracing/test-log-support && cargo test)
|
|
- name: "Test static max level"
|
|
run: (cd tracing/test_static_max_level_features && cargo test)
|
|
- name: "Test tracing-core no-std support"
|
|
run: (cd tracing-core && cargo test --no-default-features)
|
|
- name: "Test tracing no-std support"
|
|
run: (cd tracing && cargo test --no-default-features)
|
|
- name: "Test tracing all features"
|
|
run: cargo test -p tracing --all-features
|
|
|
|
features-nightly:
|
|
# Feature flag tests for features that require nightly Rust.
|
|
needs: check
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: hecrj/setup-rust-action@v1
|
|
with:
|
|
rust-version: nightly
|
|
- uses: actions/checkout@master
|
|
- name: "Test tracing-futures std::future support"
|
|
run: (cd tracing-futures/test_std_future && cargo test)
|
|
- name: "Test tracing-futures tokio alpha support"
|
|
run: (cd tracing-futures && cargo check --no-default-features --features "tokio-alpha")
|
|
- name: "Test tracing-attributes async/await support"
|
|
run: (cd tracing/test_static_max_level_features && cargo test)
|
|
- name: "Test tracing-core no-std support"
|
|
run: (cd tracing-attributes/test_async_await && cargo test)
|
|
- name: "Test nightly-only examples"
|
|
run: (cd nightly-examples && cargo test)
|
|
|
|
style:
|
|
# Check style.
|
|
needs: check
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: hecrj/setup-rust-action@v1
|
|
with:
|
|
rust-version: stable
|
|
- uses: actions/checkout@master
|
|
- name: rustfmt
|
|
run: cargo fmt --all -- --check
|
|
|
|
warnings:
|
|
# Check for any warnings. This is informational and thus is allowed to fail.
|
|
needs: check
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: hecrj/setup-rust-action@v1
|
|
with:
|
|
rust-version: stable
|
|
- uses: actions/checkout@master
|
|
- name: warnings
|
|
run: RUSTFLAGS="-Dwarnings" cargo check --all
|