From 706b2f3497d067c0c3f480b01d427c48c497995d Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Sat, 23 Sep 2023 23:58:23 +0200 Subject: [PATCH] Test with minimal versions of the crates --- .github/workflows/tests.yml | 34 ++++++------ Cargo.lock | 94 --------------------------------- aoc/Cargo.toml | 2 +- aoc/tests/dummy-year/Cargo.lock | 7 +++ 4 files changed, 25 insertions(+), 112 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3421c28..6db5882 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -41,23 +41,23 @@ jobs: - name: Run tests run: cargo test --release - #test-minimal-versions: - # name: Test with minimal versions - # runs-on: ubuntu-latest - # needs: check - # steps: - # - uses: actions/checkout@v4 - # name: Checkout - # - name: Install nightly (for -Z) and stable Rust toolchains - # run: | - # rustup install --profile minimal nightly - # rustup install --profile minimal stable - # rustup default stable - # - name: Set dependencies to the minimal version allowed - # run: cargo +nightly update -Zminimal-versions - # - uses: Swatinem/rust-cache@v2 - # - name: Test with minimal version dependencies and stable compiler - # run: cargo +stable test --tests --benches + test-minimal-versions: + name: Test with minimal versions + runs-on: ubuntu-latest + needs: check + steps: + - uses: actions/checkout@v4 + name: Checkout + - name: Install nightly (for -Z) and stable Rust toolchains + run: | + rustup install --profile minimal nightly + rustup install --profile minimal stable + rustup default stable + - name: Set dependencies to the minimal version allowed + run: cargo +nightly update -Zminimal-versions + - uses: Swatinem/rust-cache@v2 + - name: Test with minimal version dependencies and stable compiler + run: cargo +stable test --tests --benches fmt: name: Rustfmt diff --git a/Cargo.lock b/Cargo.lock index 1d84a93..bf31cd9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -323,83 +323,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "futures" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" - -[[package]] -name = "futures-executor" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" - -[[package]] -name = "futures-sink" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" - -[[package]] -name = "futures-task" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" - -[[package]] -name = "futures-util" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - [[package]] name = "gimli" version = "0.28.0" @@ -598,12 +521,6 @@ version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - [[package]] name = "prettyplease" version = "0.2.15" @@ -750,9 +667,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e56dd856803e253c8f298af3f4d7eb0ae5e23a737252cd90bb4f3b435033b2d" dependencies = [ "dashmap", - "futures", "lazy_static", - "log", "parking_lot", "serial_test_derive", ] @@ -783,15 +698,6 @@ version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "420acb44afdae038210c99e69aae24109f32f15500aa708e81d46c9f29d55fcf" -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - [[package]] name = "smallvec" version = "1.11.1" diff --git a/aoc/Cargo.toml b/aoc/Cargo.toml index 4a208d3..a8cb108 100644 --- a/aoc/Cargo.toml +++ b/aoc/Cargo.toml @@ -16,4 +16,4 @@ thiserror = "1.0.48" [dev-dependencies] insta = "1.32.0" -serial_test = "2.0.0" +serial_test = { version = "2.0.0", default-features = false } diff --git a/aoc/tests/dummy-year/Cargo.lock b/aoc/tests/dummy-year/Cargo.lock index dcbb536..76dc3c4 100644 --- a/aoc/tests/dummy-year/Cargo.lock +++ b/aoc/tests/dummy-year/Cargo.lock @@ -129,6 +129,7 @@ version = "0.1.0" dependencies = [ "aoc", "aoc-build", + "bytecount", "eyre", ] @@ -159,6 +160,12 @@ version = "3.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" +[[package]] +name = "bytecount" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c676a478f63e9fa2dd5368a42f28bba0d6c560b775f38583c8bbaa7fcd67c9c" + [[package]] name = "cc" version = "1.0.77"