diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 59b165acd..f7806408b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -142,3 +142,33 @@ jobs: echo ::endgroup:: done + + minimal-versions: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - run: git submodule update --init --recursive + + - uses: dtolnay/rust-toolchain@master + with: + toolchain: 1.81.0 # MSRV + + - uses: dtolnay/rust-toolchain@master + with: + toolchain: nightly + + - name: Remove non-essential dependencies + run: | + # Remove workspace dependencies + sed -i '/\[workspace]/,/#END-\[workspace]/d' Cargo.toml + + # Remove dev-dependencies + sed -i '/\[dev-dependencies]/,/#END-\[dev-dependencies]/d' Cargo.toml + + - name: Downgrade to minimal dependencies + run: | + cargo +nightly -Z minimal-versions update + + - run: cargo +1.81.0 build --all-features diff --git a/Cargo.toml b/Cargo.toml index 426cd074e..cf7483bfd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,6 +22,7 @@ members = [ "twox-hash-sum", "xx_hash-sys", ] +#END-[workspace] [features] default = ["random", "xxhash32", "xxhash64", "xxhash3_64", "std"] @@ -52,6 +53,7 @@ serde = { version = "1.0.0", optional = true, default-features = false, features [dev-dependencies] serde_json = "1.0.117" +#END-[dev-dependencies] [package.metadata.docs.rs] all-features = true