Skip to content

Commit a3bccb1

Browse files
committed
ci: tweak minimum supported Rust handling
lazy_static 1.2 bumped its MSRV to Rust 1.24.1, so we rollback to using lazy_static 1.1 when testing on Rust versions older than 1.24.1.
1 parent 6ff88ff commit a3bccb1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

ci/script.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
# This is the main CI script for testing the regex crate and its sub-crates.
44

55
set -ex
6+
MSRV="1.20.0"
7+
8+
# If we're building on 1.20, then lazy_static 1.2 will fail to build since it
9+
# updated its MSRV to 1.24.1. In this case, we force the use of lazy_static 1.1
10+
# to build on Rust 1.20.0.
11+
if [ "$TRAVIS_RUST_VERSION" = "$MSRV" ]; then
12+
cargo update -p lazy_static --precise 1.1.0
13+
fi
614

715
# Builds the regex crate and runs tests.
816
cargo build --verbose
@@ -13,7 +21,7 @@ cargo doc --verbose
1321
# more frequently, and therefore might require a newer version of Rust.
1422
#
1523
# This isn't ideal. It's a compromise.
16-
if [ "$TRAVIS_RUST_VERSION" = "1.20.0" ]; then
24+
if [ "$TRAVIS_RUST_VERSION" = "$MSRV" ]; then
1725
exit
1826
fi
1927

0 commit comments

Comments
 (0)