22# shellcheck disable=SC2002,SC2207
33set -eox pipefail
44
5- RUSTC_MINOR_VERSION=$( rustc --version | awk ' { split($2,a,"."); print a[2] }' )
5+ # Currently unused as we don't have to pin anything for MSRV:
6+ # RUSTC_MINOR_VERSION=$(rustc --version | awk '{ split($2,a,"."); print a[2] }')
67
78# Some crates require pinning to meet our MSRV even for our downstream users,
89# which we do here.
910# Further crates which appear only as dev-dependencies are pinned further down.
1011function PIN_RELEASE_DEPS {
11- # Starting with version 1.39.0, the `tokio` crate has an MSRV of rustc 1.70.0
12- [ " $RUSTC_MINOR_VERSION " -lt 70 ] && cargo update -p tokio --precise " 1.38.1" --verbose
13-
1412 return 0 # Don't fail the script if our rustc is higher than the last check
1513}
1614
1715PIN_RELEASE_DEPS # pin the release dependencies in our main workspace
1816
19- # Starting with version 1.10.0, the `regex` crate has an MSRV of rustc 1.65.0.
20- [ " $RUSTC_MINOR_VERSION " -lt 65 ] && cargo update -p regex --precise " 1.9.6" --verbose
21-
22- # The addr2line v0.21 crate (a dependency of `backtrace` starting with 0.3.69) relies on rustc 1.65
23- [ " $RUSTC_MINOR_VERSION " -lt 65 ] && cargo update -p backtrace --precise " 0.3.68" --verbose
24-
25- # The once_cell v1.21.0 crate (a dependency of `proptest`) relies on rustc 1.70
26- [ " $RUSTC_MINOR_VERSION " -lt 70 ] && cargo update -p once_cell --precise " 1.20.3" --verbose
27-
28- # proptest 1.3.0 requires rustc 1.64.0
29- [ " $RUSTC_MINOR_VERSION " -lt 64 ] && cargo update -p proptest --precise " 1.2.0" --verbose
30-
31- # parking_lot 0.12.4 requires rustc 1.64.0
32- [ " $RUSTC_MINOR_VERSION " -lt 64 ] && cargo update -p parking_lot --precise " 0.12.3" --verbose
33-
34- # parking_lot_core 0.9.11 requires rustc 1.64.0
35- [ " $RUSTC_MINOR_VERSION " -lt 64 ] && cargo update -p parking_lot_core --precise " 0.9.10" --verbose
36-
37- # lock_api 0.4.13 requires rustc 1.64.0
38- [ " $RUSTC_MINOR_VERSION " -lt 64 ] && cargo update -p lock_api --precise " 0.4.12" --verbose
17+ # The backtrace v0.3.75 crate relies on rustc 1.82
18+ [ " $RUSTC_MINOR_VERSION " -lt 82 ] && cargo update -p backtrace --precise " 0.3.74" --verbose
3919
4020export RUST_BACKTRACE=1
4121
@@ -49,7 +29,6 @@ cargo test --verbose --color always
4929
5030echo -e " \n\nTesting upgrade from prior versions of LDK"
5131pushd lightning-tests
52- [ " $RUSTC_MINOR_VERSION " -lt 65 ] && cargo update -p regex --precise " 1.9.6" --verbose
5332cargo test
5433popd
5534
0 commit comments