22set -eox pipefail
33
44RUSTC_MINOR_VERSION=$( rustc --version | awk ' { split($2,a,"."); print a[2] }' )
5- HOST_PLATFORM=" $( rustc --version --verbose | grep " host:" | awk ' { print $2 }' ) "
65
76# Some crates require pinning to meet our MSRV even for our downstream users,
87# which we do here.
@@ -11,19 +10,6 @@ function PIN_RELEASE_DEPS {
1110 # Starting with version 1.39.0, the `tokio` crate has an MSRV of rustc 1.70.0
1211 [ " $RUSTC_MINOR_VERSION " -lt 70 ] && cargo update -p tokio --precise " 1.38.1" --verbose
1312
14- # Starting with version 0.7.12, the `tokio-util` crate has an MSRV of rustc 1.70.0
15- [ " $RUSTC_MINOR_VERSION " -lt 70 ] && cargo update -p tokio-util --precise " 0.7.11" --verbose
16-
17- # url 2.5.3 switched to idna 1.0.3 and ICU4X, which requires rustc 1.67 or newer.
18- # Here we opt to keep using unicode-rs by pinning idna_adapter as described here: https://docs.rs/crate/idna_adapter/1.2.0
19- [ " $RUSTC_MINOR_VERSION " -lt 67 ] && cargo update -p idna_adapter --precise " 1.1.0" --verbose
20-
21- # indexmap 2.6.0 upgraded to hashbrown 0.15, which unfortunately bumped their MSRV to rustc 1.65 with the 0.15.1 release (and 2.7.0 was released since).
22- [
" $RUSTC_MINOR_VERSION " -lt 65 ]
&& cargo update -p
[email protected] --precise
" 2.5.0" --verbose
23-
24- # Starting with version 0.23.20, the `rustls` crate has an MSRV of rustc 1.71.0
25- [
" $RUSTC_MINOR_VERSION " -lt 71 ]
&& cargo update -p
[email protected] --precise
" 0.23.19" --verbose
26-
2713 return 0 # Don't fail the script if our rustc is higher than the last check
2814}
2915
@@ -35,15 +21,12 @@ PIN_RELEASE_DEPS # pin the release dependencies in our main workspace
3521# The addr2line v0.21 crate (a dependency of `backtrace` starting with 0.3.69) relies on rustc 1.65
3622[ " $RUSTC_MINOR_VERSION " -lt 65 ] && cargo update -p backtrace --precise " 0.3.68" --verbose
3723
38- # Starting with version 0.5.9 (there is no .6-.8), the `home` crate has an MSRV of rustc 1.70.0.
39- [ " $RUSTC_MINOR_VERSION " -lt 70 ] && cargo update -p home --precise " 0.5.5" --verbose
40-
4124# proptest 1.3.0 requires rustc 1.64.0
4225[ " $RUSTC_MINOR_VERSION " -lt 64 ] && cargo update -p proptest --precise " 1.2.0" --verbose
4326
4427export RUST_BACKTRACE=1
4528
46- echo -e " \n\nChecking the full workspace."
29+ echo -e " \n\nChecking the workspace, except lightning-transaction-sync ."
4730cargo check --verbose --color always
4831
4932# When the workspace members change, make sure to update the list here as well
@@ -58,7 +41,6 @@ WORKSPACE_MEMBERS=(
5841 lightning-background-processor
5942 lightning-rapid-gossip-sync
6043 lightning-custom-message
61- lightning-transaction-sync
6244 lightning-macros
6345 lightning-dns-resolver
6446 lightning-liquidity
@@ -83,25 +65,6 @@ cargo check -p lightning-block-sync --verbose --color always --features rpc-clie
8365cargo test -p lightning-block-sync --verbose --color always --features rpc-client,rest-client,tokio
8466cargo check -p lightning-block-sync --verbose --color always --features rpc-client,rest-client,tokio
8567
86- if [[ " $HOST_PLATFORM " != * windows* ]]; then
87- echo -e " \n\nChecking Transaction Sync Clients with features."
88- cargo check -p lightning-transaction-sync --verbose --color always --features esplora-blocking
89- cargo check -p lightning-transaction-sync --verbose --color always --features esplora-async
90- cargo check -p lightning-transaction-sync --verbose --color always --features esplora-async-https
91- cargo check -p lightning-transaction-sync --verbose --color always --features electrum
92-
93- if [ -z " $CI_ENV " ] && [[ -z " $BITCOIND_EXE " || -z " $ELECTRS_EXE " ]]; then
94- echo -e " \n\nSkipping testing Transaction Sync Clients due to BITCOIND_EXE or ELECTRS_EXE being unset."
95- cargo check -p lightning-transaction-sync --tests
96- else
97- echo -e " \n\nTesting Transaction Sync Clients with features."
98- cargo test -p lightning-transaction-sync --verbose --color always --features esplora-blocking
99- cargo test -p lightning-transaction-sync --verbose --color always --features esplora-async
100- cargo test -p lightning-transaction-sync --verbose --color always --features esplora-async-https
101- cargo test -p lightning-transaction-sync --verbose --color always --features electrum
102- fi
103- fi
104-
10568echo -e " \n\nTest futures builds"
10669cargo test -p lightning-background-processor --verbose --color always --features futures
10770cargo test -p lightning-background-processor --verbose --color always --features futures --no-default-features
@@ -145,7 +108,7 @@ cargo test -p lightning-invoice --verbose --color always --no-default-features -
145108echo -e " \n\nTesting no_std build on a downstream no-std crate"
146109# check no-std compatibility across dependencies
147110pushd no-std-check
148- cargo check --verbose --color always --features lightning-transaction-sync
111+ cargo check --verbose --color always
149112[ " $CI_MINIMIZE_DISK_USAGE " != " " ] && cargo clean
150113popd
151114
0 commit comments