2
2
set -eox pipefail
3
3
4
4
RUSTC_MINOR_VERSION=$( rustc --version | awk ' { split($2,a,"."); print a[2] }' )
5
- HOST_PLATFORM=" $( rustc --version --verbose | grep " host:" | awk ' { print $2 }' ) "
6
5
7
6
# Some crates require pinning to meet our MSRV even for our downstream users,
8
7
# which we do here.
@@ -14,16 +13,6 @@ function PIN_RELEASE_DEPS {
14
13
# Starting with version 0.7.12, the `tokio-util` crate has an MSRV of rustc 1.70.0
15
14
[ " $RUSTC_MINOR_VERSION " -lt 70 ] && cargo update -p tokio-util --precise " 0.7.11" --verbose
16
15
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
-
27
16
return 0 # Don't fail the script if our rustc is higher than the last check
28
17
}
29
18
@@ -35,15 +24,12 @@ PIN_RELEASE_DEPS # pin the release dependencies in our main workspace
35
24
# The addr2line v0.21 crate (a dependency of `backtrace` starting with 0.3.69) relies on rustc 1.65
36
25
[ " $RUSTC_MINOR_VERSION " -lt 65 ] && cargo update -p backtrace --precise " 0.3.68" --verbose
37
26
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
-
41
27
# proptest 1.3.0 requires rustc 1.64.0
42
28
[ " $RUSTC_MINOR_VERSION " -lt 64 ] && cargo update -p proptest --precise " 1.2.0" --verbose
43
29
44
30
export RUST_BACKTRACE=1
45
31
46
- echo -e " \n\nChecking the full workspace."
32
+ echo -e " \n\nChecking the workspace, except lightning-transaction-sync ."
47
33
cargo check --verbose --color always
48
34
49
35
# When the workspace members change, make sure to update the list here as well
@@ -58,7 +44,6 @@ WORKSPACE_MEMBERS=(
58
44
lightning-background-processor
59
45
lightning-rapid-gossip-sync
60
46
lightning-custom-message
61
- lightning-transaction-sync
62
47
lightning-macros
63
48
lightning-dns-resolver
64
49
lightning-liquidity
@@ -83,25 +68,6 @@ cargo check -p lightning-block-sync --verbose --color always --features rpc-clie
83
68
cargo test -p lightning-block-sync --verbose --color always --features rpc-client,rest-client,tokio
84
69
cargo check -p lightning-block-sync --verbose --color always --features rpc-client,rest-client,tokio
85
70
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
-
105
71
echo -e " \n\nTest futures builds"
106
72
cargo test -p lightning-background-processor --verbose --color always --features futures
107
73
cargo 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
123
89
echo -e " \n\nTesting c_bindings builds"
124
90
# Note that because `$RUSTFLAGS` is not passed through to doctest builds we cannot selectively
125
91
# 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
127
95
128
96
for DIR in lightning-invoice lightning-rapid-gossip-sync; do
129
97
# 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 -
145
113
echo -e " \n\nTesting no_std build on a downstream no-std crate"
146
114
# check no-std compatibility across dependencies
147
115
pushd no-std-check
148
- cargo check --verbose --color always --features lightning-transaction-sync
116
+ cargo check --verbose --color always
149
117
[ " $CI_MINIMIZE_DISK_USAGE " != " " ] && cargo clean
150
118
popd
151
119
0 commit comments