Skip to content

Commit 4c577a3

Browse files
committed
Test for minimal dependency versions
1 parent 45f21b0 commit 4c577a3

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

.github/workflows/ci.yml

+30
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,33 @@ jobs:
142142
143143
echo ::endgroup::
144144
done
145+
146+
minimal-versions:
147+
runs-on: ubuntu-latest
148+
149+
steps:
150+
- uses: actions/checkout@v4
151+
152+
- run: git submodule update --init --recursive
153+
154+
- uses: dtolnay/rust-toolchain@master
155+
with:
156+
toolchain: 1.81.0 # MSRV
157+
158+
- uses: dtolnay/rust-toolchain@master
159+
with:
160+
toolchain: nightly
161+
162+
- name: Remove non-essential dependencies
163+
run: |
164+
# Remove workspace dependencies
165+
sed -i '/\[workspace]/,/#END-\[workspace]/d' Cargo.toml
166+
167+
# Remove dev-dependencies
168+
sed -i '/\[dev-dependencies]/,/#END-\[dev-dependencies]/d' Cargo.toml
169+
170+
- name: Downgrade to minimal dependencies
171+
run: |
172+
cargo +nightly -Z minimal-versions update
173+
174+
- run: cargo +1.81.0 build --all-features

Cargo.toml

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ members = [
2222
"twox-hash-sum",
2323
"xx_hash-sys",
2424
]
25+
#END-[workspace]
2526

2627
[features]
2728
default = ["random", "xxhash32", "xxhash64", "xxhash3_64", "std"]
@@ -52,6 +53,7 @@ serde = { version = "1.0.0", optional = true, default-features = false, features
5253

5354
[dev-dependencies]
5455
serde_json = "1.0.117"
56+
#END-[dev-dependencies]
5557

5658
[package.metadata.docs.rs]
5759
all-features = true

0 commit comments

Comments
 (0)