Skip to content

Commit c260900

Browse files
committed
Fix the CI build with older Rust versions
When testing with the MSRV (1.46.0) or the Debian Rust package (1.48.0), we must lock predicates-core and predicates-tree at older versions. Add a Cargo.lock.msrv file and use it in CI. But it will not be published to crates.io.
1 parent 0b19dc9 commit c260900

File tree

3 files changed

+305
-1
lines changed

3 files changed

+305
-1
lines changed

.cirrus.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ rust_test_task:
2222
cargo_cache:
2323
folder: $CARGO_HOME/registry
2424
build_script:
25+
- rustc --version | grep -q 1.46.0 && mv plugins/rust/Cargo.lock.msrv plugins/rust/Cargo.lock
2526
- cd plugins/rust; cargo build $CARGO_ARGS
2627
test_script:
2728
- cd plugins/rust; cargo test $CARGO_ARGS

plugins/rust/Cargo.lock.msrv

Lines changed: 303 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/rust/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ repository = "https://gitlab.com/nbdkit/nbdkit"
99
categories = ["api-bindings", "filesystem"]
1010
keywords = ["network-block-device", "nbd"]
1111
homepage = "http://libguestfs.org/"
12-
exclude = ["nbdkit-rust-plugin.*", "Makefile*", "test.sh"]
12+
exclude = ["nbdkit-rust-plugin.*", "Makefile*", "test.sh", "Cargo.lock.msrv"]
1313
description = """
1414
Rust bindings to the NBDKit framework for creating Network Block Device servers
1515
"""

0 commit comments

Comments
 (0)