@@ -24,123 +24,10 @@ export RUST_BACKTRACE=1
2424echo -e " \n\nChecking the workspace, except lightning-transaction-sync."
2525cargo check --quiet --color always
2626
27- WORKSPACE_MEMBERS=( $( cat Cargo.toml | tr ' \n' ' \r' | sed ' s/\r //g' | tr ' \r' ' \n' | grep ' ^members =' | sed ' s/members.*=.*\[//' | tr -d ' "' | tr ' ,' ' ' ) )
28-
29- echo -e " \n\nTesting the workspace, except lightning-transaction-sync."
30- cargo test --quiet --color always
31-
32- echo -e " \n\nTesting upgrade from prior versions of LDK"
33- pushd lightning-tests
34- cargo test --quiet
35- popd
36-
37- echo -e " \n\nChecking and building docs for all workspace members individually..."
38- for DIR in " ${WORKSPACE_MEMBERS[@]} " ; do
39- cargo check -p " $DIR " --quiet --color always
40- cargo doc -p " $DIR " --quiet --document-private-items
27+ echo -e " \n\nTesting the workspace 10 times, except lightning-transaction-sync."
28+ for i in $( seq 1 10) ; do
29+ echo -e " \n\nWorkspace test run $i /10"
30+ cargo test --quiet --color always
4131done
4232
43- echo -e " \n\nChecking and testing lightning with features"
44- cargo test -p lightning --quiet --color always --features dnssec
45- cargo check -p lightning --quiet --color always --features dnssec
46- cargo doc -p lightning --quiet --document-private-items --features dnssec
47-
48- echo -e " \n\nChecking and testing Block Sync Clients with features"
49-
50- cargo test -p lightning-block-sync --quiet --color always --features rest-client
51- cargo check -p lightning-block-sync --quiet --color always --features rest-client
52- cargo test -p lightning-block-sync --quiet --color always --features rpc-client
53- cargo check -p lightning-block-sync --quiet --color always --features rpc-client
54- cargo test -p lightning-block-sync --quiet --color always --features rpc-client,rest-client
55- cargo check -p lightning-block-sync --quiet --color always --features rpc-client,rest-client
56- cargo test -p lightning-block-sync --quiet --color always --features rpc-client,rest-client,tokio
57- cargo check -p lightning-block-sync --quiet --color always --features rpc-client,rest-client,tokio
58-
59- echo -e " \n\nChecking Transaction Sync Clients with features."
60- cargo check -p lightning-transaction-sync --quiet --color always --features esplora-blocking
61- cargo check -p lightning-transaction-sync --quiet --color always --features esplora-async
62- cargo check -p lightning-transaction-sync --quiet --color always --features esplora-async-https
63- cargo check -p lightning-transaction-sync --quiet --color always --features electrum
64-
65- if [ -z " $CI_ENV " ] && [[ -z " $BITCOIND_EXE " || -z " $ELECTRS_EXE " ]]; then
66- echo -e " \n\nSkipping testing Transaction Sync Clients due to BITCOIND_EXE or ELECTRS_EXE being unset."
67- cargo check -p lightning-transaction-sync --tests
68- else
69- echo -e " \n\nTesting Transaction Sync Clients with features."
70- cargo test -p lightning-transaction-sync --quiet --color always --features esplora-blocking
71- cargo test -p lightning-transaction-sync --quiet --color always --features esplora-async
72- cargo test -p lightning-transaction-sync --quiet --color always --features esplora-async-https
73- cargo test -p lightning-transaction-sync --quiet --color always --features electrum
74- fi
75-
76- echo -e " \n\nChecking and testing lightning-persister with features"
77- cargo test -p lightning-persister --quiet --color always --features tokio
78- cargo check -p lightning-persister --quiet --color always --features tokio
79- cargo doc -p lightning-persister --quiet --document-private-items --features tokio
80-
81- echo -e " \n\nTest Custom Message Macros"
82- cargo test -p lightning-custom-message --quiet --color always
83- [ " $CI_MINIMIZE_DISK_USAGE " != " " ] && cargo clean
84-
85- echo -e " \n\nTest backtrace-debug builds"
86- cargo test -p lightning --quiet --color always --features backtrace
87-
88- echo -e " \n\nTesting no_std builds"
89- for DIR in lightning-invoice lightning-rapid-gossip-sync lightning-liquidity; do
90- cargo test -p $DIR --quiet --color always --no-default-features
91- done
92-
93- cargo test -p lightning --quiet --color always --no-default-features
94- cargo test -p lightning-background-processor --quiet --color always --no-default-features
95-
96- echo -e " \n\nTesting c_bindings builds"
97- # Note that because `$RUSTFLAGS` is not passed through to doctest builds we cannot selectively
98- # disable doctests in `c_bindings` so we skip doctests entirely here.
99- RUSTFLAGS=" $RUSTFLAGS --cfg=c_bindings" cargo test --quiet --color always --lib --bins --tests
100-
101- for DIR in lightning-invoice lightning-rapid-gossip-sync; do
102- # check if there is a conflict between no_std and the c_bindings cfg
103- RUSTFLAGS=" $RUSTFLAGS --cfg=c_bindings" cargo test -p $DIR --quiet --color always --no-default-features
104- done
105-
106- # Note that because `$RUSTFLAGS` is not passed through to doctest builds we cannot selectively
107- # disable doctests in `c_bindings` so we skip doctests entirely here.
108- RUSTFLAGS=" $RUSTFLAGS --cfg=c_bindings" cargo test -p lightning-background-processor --quiet --color always --no-default-features --lib --bins --tests
109- RUSTFLAGS=" $RUSTFLAGS --cfg=c_bindings" cargo test -p lightning --quiet --color always --no-default-features --lib --bins --tests
110-
111- echo -e " \n\nTesting other crate-specific builds"
112- # Note that outbound_commitment_test only runs in this mode because of hardcoded signature values
113- RUSTFLAGS=" $RUSTFLAGS --cfg=ldk_test_vectors" cargo test -p lightning --quiet --color always --no-default-features --features=std
114- # This one only works for lightning-invoice
115- # check that compile with no_std and serde works in lightning-invoice
116- cargo test -p lightning-invoice --quiet --color always --no-default-features --features serde
117-
118- echo -e " \n\nTesting no_std build on a downstream no-std crate"
119- # check no-std compatibility across dependencies
120- pushd no-std-check
121- cargo check --quiet --color always
122- [ " $CI_MINIMIZE_DISK_USAGE " != " " ] && cargo clean
123- popd
124-
125- # Test that we can build downstream code with only the "release pins".
126- pushd msrv-no-dev-deps-check
127- PIN_RELEASE_DEPS
128- cargo check --quiet
129- [ " $CI_MINIMIZE_DISK_USAGE " != " " ] && cargo clean
130- popd
131-
132- if [ -f " $( which arm-none-eabi-gcc) " ]; then
133- pushd no-std-check
134- cargo build --quiet --target=thumbv7m-none-eabi
135- [ " $CI_MINIMIZE_DISK_USAGE " != " " ] && cargo clean
136- popd
137- fi
138-
139- echo -e " \n\nTest cfg-flag builds"
140- RUSTFLAGS=" --cfg=taproot" cargo test --quiet --color always -p lightning
141- [ " $CI_MINIMIZE_DISK_USAGE " != " " ] && cargo clean
142- RUSTFLAGS=" --cfg=simple_close" cargo test --quiet --color always -p lightning
143- [ " $CI_MINIMIZE_DISK_USAGE " != " " ] && cargo clean
144- RUSTFLAGS=" --cfg=lsps1_service" cargo test --quiet --color always -p lightning-liquidity
145- [ " $CI_MINIMIZE_DISK_USAGE " != " " ] && cargo clean
146- RUSTFLAGS=" --cfg=peer_storage" cargo test --quiet --color always -p lightning
33+ exit 0
0 commit comments