From 706fc2b5592f415329d17df7b3777b56af909413 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 23 Jun 2023 20:56:24 -0700 Subject: [PATCH] Do all CI builds with old rustc using shim crate Fixes the following error when testing against a compiler older than 1.64: error: failed to select a version for the requirement `hashbrown = "^0.14"` candidate versions found which didn't match: 0.13.2, 0.13.1, 0.12.3, ... location searched: crates.io index required by package `indexmap v2.0.0` ... which satisfies dependency `indexmap = "^2"` of package `serde_json v1.0.97` ... which satisfies path dependency `serde_json` of package `serde_json_test v0.0.0` --- .github/workflows/ci.yml | 14 +++++++------- tests/crate/Cargo.toml | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c3972a60..92cacf5bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,17 +52,17 @@ jobs: with: toolchain: ${{matrix.rust}} targets: ${{matrix.target}} - - run: cargo check - - run: cargo check --features float_roundtrip - - run: cargo check --features arbitrary_precision - - run: cargo check --features raw_value - - run: cargo check --features unbounded_depth + - run: cargo check --manifest-path tests/crate/Cargo.toml + - run: cargo check --manifest-path tests/crate/Cargo.toml --features float_roundtrip + - run: cargo check --manifest-path tests/crate/Cargo.toml --features arbitrary_precision + - run: cargo check --manifest-path tests/crate/Cargo.toml --features raw_value + - run: cargo check --manifest-path tests/crate/Cargo.toml --features unbounded_depth - run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features --features alloc - run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features --features alloc,arbitrary_precision - run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features --features alloc,raw_value - - run: cargo check --features preserve_order + - run: cargo check --manifest-path tests/crate/Cargo.toml --features serde_json/preserve_order if: matrix.rust != '1.56.1' - - run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features --features alloc,preserve_order + - run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features --features alloc,serde_json/preserve_order if: matrix.rust != '1.56.1' - name: Build without std run: cargo check --manifest-path tests/crate/Cargo.toml --target ${{matrix.target}} --no-default-features --features alloc diff --git a/tests/crate/Cargo.toml b/tests/crate/Cargo.toml index 739149fd2..03fde9c44 100644 --- a/tests/crate/Cargo.toml +++ b/tests/crate/Cargo.toml @@ -16,6 +16,7 @@ default = ["std"] std = ["serde_json/std"] alloc = ["serde_json/alloc"] #preserve_order = ["serde_json/preserve_order"] +float_roundtrip = ["serde_json/float_roundtrip"] arbitrary_precision = ["serde_json/arbitrary_precision"] raw_value = ["serde_json/raw_value"] unbounded_depth = ["serde_json/unbounded_depth"]