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.
@@ -14,16 +13,6 @@ function PIN_RELEASE_DEPS {
1413 # Starting with version 0.7.12, the `tokio-util` crate has an MSRV of rustc 1.70.0
1514 [ " $RUSTC_MINOR_VERSION " -lt 70 ] && cargo update -p tokio-util --precise " 0.7.11" --verbose
1615
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-
2716 return 0 # Don't fail the script if our rustc is higher than the last check
2817}
2918
@@ -35,15 +24,12 @@ PIN_RELEASE_DEPS # pin the release dependencies in our main workspace
3524# The addr2line v0.21 crate (a dependency of `backtrace` starting with 0.3.69) relies on rustc 1.65
3625[ " $RUSTC_MINOR_VERSION " -lt 65 ] && cargo update -p backtrace --precise " 0.3.68" --verbose
3726
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-
4127# proptest 1.3.0 requires rustc 1.64.0
4228[ " $RUSTC_MINOR_VERSION " -lt 64 ] && cargo update -p proptest --precise " 1.2.0" --verbose
4329
4430export RUST_BACKTRACE=1
4531
46- echo -e " \n\nChecking the full workspace."
32+ echo -e " \n\nChecking the workspace, except lightning-transaction-sync ."
4733cargo check --verbose --color always
4834
4935# When the workspace members change, make sure to update the list here as well
@@ -58,7 +44,6 @@ WORKSPACE_MEMBERS=(
5844 lightning-background-processor
5945 lightning-rapid-gossip-sync
6046 lightning-custom-message
61- lightning-transaction-sync
6247 lightning-macros
6348 lightning-dns-resolver
6449 lightning-liquidity
@@ -83,25 +68,6 @@ cargo check -p lightning-block-sync --verbose --color always --features rpc-clie
8368cargo test -p lightning-block-sync --verbose --color always --features rpc-client,rest-client,tokio
8469cargo check -p lightning-block-sync --verbose --color always --features rpc-client,rest-client,tokio
8570
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-
10571echo -e " \n\nTest futures builds"
10672cargo test -p lightning-background-processor --verbose --color always --features futures
10773cargo test -p lightning-background-processor --verbose --color always --features futures --no-default-features
@@ -123,7 +89,9 @@ cargo test -p lightning --verbose --color always --no-default-features
12389echo -e " \n\nTesting c_bindings builds"
12490# Note that because `$RUSTFLAGS` is not passed through to doctest builds we cannot selectively
12591# disable doctests in `c_bindings` so we skip doctests entirely here.
126- RUSTFLAGS=" $RUSTFLAGS --cfg=c_bindings" cargo test --verbose --color always --lib --bins --tests
92+ for DIR in " ${WORKSPACE_MEMBERS[@]} " ; do
93+ RUSTFLAGS=" $RUSTFLAGS --cfg=c_bindings" cargo test -p " $DIR " --verbose --color always --lib --bins --tests
94+ done
12795
12896for DIR in lightning-invoice lightning-rapid-gossip-sync; do
12997 # check if there is a conflict between no_std and the c_bindings cfg
@@ -145,7 +113,7 @@ cargo test -p lightning-invoice --verbose --color always --no-default-features -
145113echo -e " \n\nTesting no_std build on a downstream no-std crate"
146114# check no-std compatibility across dependencies
147115pushd no-std-check
148- cargo check --verbose --color always --features lightning-transaction-sync
116+ cargo check --verbose --color always
149117[ " $CI_MINIMIZE_DISK_USAGE " != " " ] && cargo clean
150118popd
151119
0 commit comments