22# shellcheck disable=SC2002,SC2207
33set -eox pipefail
44
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] }')
5+ RUSTC_MINOR_VERSION=$( rustc --version | awk ' { split($2,a,"."); print a[2] }' )
76
87# Some crates require pinning to meet our MSRV even for our downstream users,
98# which we do here.
@@ -17,6 +16,12 @@ PIN_RELEASE_DEPS # pin the release dependencies in our main workspace
1716# The backtrace v0.3.75 crate relies on rustc 1.82
1817[ " $RUSTC_MINOR_VERSION " -lt 82 ] && cargo update -p backtrace --precise " 0.3.74" --verbose
1918
19+ # Starting with version 0.5.11, the `home` crate has an MSRV of rustc 1.81.0.
20+ [ " $RUSTC_MINOR_VERSION " -lt 81 ] && cargo update -p home --precise " 0.5.9" --verbose
21+
22+ # Starting with version 1.2.0, the `idna_adapter` crate has an MSRV of rustc 1.81.0.
23+ [ " $RUSTC_MINOR_VERSION " -lt 81 ] && cargo update -p idna_adapter --precise " 1.1.0" --verbose
24+
2025export RUST_BACKTRACE=1
2126
2227echo -e " \n\nChecking the workspace, except lightning-transaction-sync."
@@ -54,6 +59,23 @@ cargo check -p lightning-block-sync --verbose --color always --features rpc-clie
5459cargo test -p lightning-block-sync --verbose --color always --features rpc-client,rest-client,tokio
5560cargo check -p lightning-block-sync --verbose --color always --features rpc-client,rest-client,tokio
5661
62+ echo -e " \n\nChecking Transaction Sync Clients with features."
63+ cargo check -p lightning-transaction-sync --verbose --color always --features esplora-blocking
64+ cargo check -p lightning-transaction-sync --verbose --color always --features esplora-async
65+ cargo check -p lightning-transaction-sync --verbose --color always --features esplora-async-https
66+ cargo check -p lightning-transaction-sync --verbose --color always --features electrum
67+
68+ if [ -z " $CI_ENV " ] && [[ -z " $BITCOIND_EXE " || -z " $ELECTRS_EXE " ]]; then
69+ echo -e " \n\nSkipping testing Transaction Sync Clients due to BITCOIND_EXE or ELECTRS_EXE being unset."
70+ cargo check -p lightning-transaction-sync --tests
71+ else
72+ echo -e " \n\nTesting Transaction Sync Clients with features."
73+ cargo test -p lightning-transaction-sync --verbose --color always --features esplora-blocking
74+ cargo test -p lightning-transaction-sync --verbose --color always --features esplora-async
75+ cargo test -p lightning-transaction-sync --verbose --color always --features esplora-async-https
76+ cargo test -p lightning-transaction-sync --verbose --color always --features electrum
77+ fi
78+
5779echo -e " \n\nChecking and testing lightning-persister with features"
5880cargo test -p lightning-persister --verbose --color always --features tokio
5981cargo check -p lightning-persister --verbose --color always --features tokio
0 commit comments