summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Lisov <dennis.lissov@gmail.com>2020-04-26 04:00:39 +0300
committerEmilio Cobos Álvarez <emilio@crisal.io>2020-04-26 18:56:23 +0200
commitc11b780fcb13ce7fe50b76d0c250cef83d49c880 (patch)
tree494fe894b84072b03ce0221a3c20c89b98d92fb5
parent2793fd43f23d37462da0f3d1e9359e1877ac3503 (diff)
Readme/CI: mention and test the MSRV
Write down the minimal supported Rust version in the README.md and add a CI test that ensures MSRV bumps cannot happen accidentally.
-rw-r--r--.travis.yml1
-rw-r--r--README.md6
-rwxr-xr-xci/script.sh9
3 files changed, 16 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
index 5f657ecb..655d2eac 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -65,6 +65,7 @@ env:
# Miscellaneous tests.
- LLVM_VERSION="9.0" BINDGEN_JOB="misc"
- LLVM_VERSION="9.0" BINDGEN_JOB="quickchecking"
+ - LLVM_VERSION="9.0" BINDGEN_JOB="msrv"
matrix:
fast_finish: true
diff --git a/README.md b/README.md
index b7340a5c..a972ab9f 100644
--- a/README.md
+++ b/README.md
@@ -37,6 +37,12 @@ extern "C" {
[📚 Read the `bindgen` users guide here! 📚](https://rust-lang.github.io/rust-bindgen)
+## MSRV
+
+The minimum supported Rust version is **1.34**.
+
+No MSRV bump policy has been established yet, so MSRV may increase in any release.
+
## API Reference
[API reference documentation is on docs.rs](https://docs.rs/bindgen)
diff --git a/ci/script.sh b/ci/script.sh
index 83f2a69e..e5f64f96 100755
--- a/ci/script.sh
+++ b/ci/script.sh
@@ -26,6 +26,15 @@ case "$BINDGEN_JOB" in
./ci/assert-no-diff.sh
;;
+ "msrv")
+ # Test that the bindgen library can be built with the minimum supported Rust version
+ # This test should not use Cargo.lock as it's ignored for library builds
+ rm Cargo.lock
+ # The MSRV below is also documented in README.md, please keep in sync
+ rustup install 1.34.0
+ cargo +1.34.0 build --lib $NO_DEFAULT_FEATURES --features "$BINDGEN_FEATURES"
+ ;;
+
"integration")
cd ./bindgen-integration
cargo test "$BINDGEN_PROFILE" $NO_DEFAULT_FEATURES --features "$BINDGEN_FEATURES"