From a996040384670113a4d726b5270072ea31c840fc Mon Sep 17 00:00:00 2001 From: Eliza Weisman Date: Tue, 8 Dec 2020 13:09:02 -0800 Subject: [PATCH 1/2] chore: don't check examples on MSRV Tracing's examples depend on a number of external crates that the core `tracing` crates don't depend on. Sometimes, crates that we only depend on for examples will break compatibility with our MSRV. It's not ideal to bump our supported MSRV just for an example, since the actual `tracing` crates will still build fine. Instead, this PR updates the CI config to exclude examples from the MSRV check. This way, we don't have to bump MSRV for examples-only dependencies. --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d39976a445..1196a3f146 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -24,7 +24,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: check - args: --all --bins --examples --tests --benches + args: --all --bins --tests --benches cargo-hack: runs-on: ubuntu-latest From 77e3b16e0bc5ea0007f2a79dbb28976bc176bc85 Mon Sep 17 00:00:00 2001 From: Eliza Weisman Date: Tue, 8 Dec 2020 13:26:37 -0800 Subject: [PATCH 2/2] don't test examples either Signed-off-by: Eliza Weisman --- .github/workflows/CI.yml | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 1196a3f146..8b3ee0ea9e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -114,7 +114,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - rust: [stable, beta, nightly, 1.42.0] + rust: [stable, beta, nightly] steps: - uses: actions/checkout@main - uses: actions-rs/toolchain@v1 @@ -128,6 +128,32 @@ jobs: command: test args: --all + test-msrv: + # Test against the minimum supported Rust version + needs: check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@main + - uses: actions-rs/toolchain@v1 + with: + toolchain: 1.42.0 + profile: minimal + override: true + # We can't use `cargo test --all`, as that will also compile the examples. + # We don't guarantee the examples will work on the MSRV, because they have + # external dependencies which may not comply with our MSRV policy, but don't + # actually impact users on our MSRV. + - name: Run tests + uses: actions-rs/cargo@v1 + with: + command: test + args: --workspace --lib --tests + - name: Run doctests + uses: actions-rs/cargo@v1 + with: + command: test + args: --workspace --doc + test-build-wasm: needs: check runs-on: ubuntu-latest