mirror of
https://github.com/tokio-rs/tracing.git
synced 2026-04-19 07:55:47 +00:00
chore: don't check benches on MSRV
Currently, CI runs `cargo check --all --bins --tests --benches` on our MSRV. This is failing, because the latest `criterion` version now depends on a revision of `bitflags` that doesn't build on Rust 1.42.0 (due to `const fn`s not being const on 1.42.0). We *could* solve this by bumping our MSRV to a version where the appropriate functions are `const fn`, or we could use a `=` dependency to pin to a specific older version of `bitflags` that compiles on 1.42.0. However, both of these solutions seem kind of unfortunate. This commit just removes the `--benches` from the MSRV `cargo check` run. The benchmarks are an internal development tool, not an officially supported part of `tracing`. Users on 1.42.0 can still depend on `tracing` and use it in their code even if the benchmarks don't compile on their (fairly old) Rust version. Therefore, it should be fine to just remove the benchmarks from the MSRV check. I split the MSRV and stable `cargo check` jobs into separate jobs, so we still check that commits don't break the benchmarks on stable Rust. Signed-off-by: Eliza Weisman <eliza@buoyant.io>
This commit is contained in:
27
.github/workflows/CI.yml
vendored
27
.github/workflows/CI.yml
vendored
@@ -7,17 +7,32 @@ on:
|
||||
pull_request: {}
|
||||
|
||||
jobs:
|
||||
check:
|
||||
# Run `cargo check` first to ensure that the pushed code at least compiles.
|
||||
check-msrv:
|
||||
# Run `cargo check` on our minimum supported Rust version (1.42.0).
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
rust: [stable, 1.42.0]
|
||||
rust: 1.42.0
|
||||
steps:
|
||||
- uses: actions/checkout@main
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: ${{ matrix.rust }}
|
||||
toolchain: 1.42.0
|
||||
profile: minimal
|
||||
override: true
|
||||
- name: Check
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: check
|
||||
args: --all --bins --tests
|
||||
|
||||
check:
|
||||
# Run `cargo check` first to ensure that the pushed code at least compiles.
|
||||
runs-on: ubuntu-latest
|
||||
rust: stable
|
||||
steps:
|
||||
- uses: actions/checkout@main
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
profile: minimal
|
||||
override: true
|
||||
- name: Check
|
||||
|
||||
Reference in New Issue
Block a user