@@ -32,83 +32,79 @@ cargo test --verbose --color always
3232cargo check --verbose --color always
3333
3434echo -e " \n\nBuilding and testing Block Sync Clients with features"
35- pushd lightning-block-sync
36- cargo test --verbose --color always --features rest-client
37- cargo check --verbose --color always --features rest-client
38- cargo test --verbose --color always --features rpc-client
39- cargo check --verbose --color always --features rpc-client
40- cargo test --verbose --color always --features rpc-client,rest-client
41- cargo check --verbose --color always --features rpc-client,rest-client
42- cargo test --verbose --color always --features rpc-client,rest-client,tokio
43- cargo check --verbose --color always --features rpc-client,rest-client,tokio
44- popd
35+
36+ cargo test -p lightning-block-sync --verbose --color always --features rest-client
37+ cargo check -p lightning-block-sync --verbose --color always --features rest-client
38+ cargo test -p lightning-block-sync --verbose --color always --features rpc-client
39+ cargo check -p lightning-block-sync --verbose --color always --features rpc-client
40+ cargo test -p lightning-block-sync --verbose --color always --features rpc-client,rest-client
41+ cargo check -p lightning-block-sync --verbose --color always --features rpc-client,rest-client
42+ cargo test -p lightning-block-sync --verbose --color always --features rpc-client,rest-client,tokio
43+ cargo check -p lightning-block-sync --verbose --color always --features rpc-client,rest-client,tokio
4544
4645if [[ " $HOST_PLATFORM " != * windows* ]]; then
47- pushd lightning-transaction-sync
4846 echo -e " \n\nChecking Transaction Sync Clients with features."
49- cargo check --verbose --color always --features esplora-blocking
50- cargo check --verbose --color always --features esplora-async
51- cargo check --verbose --color always --features esplora-async-https
52- cargo check --verbose --color always --features electrum
47+ cargo check -p lightning-transaction-sync - -verbose --color always --features esplora-blocking
48+ cargo check -p lightning-transaction-sync - -verbose --color always --features esplora-async
49+ cargo check -p lightning-transaction-sync - -verbose --color always --features esplora-async-https
50+ cargo check -p lightning-transaction-sync - -verbose --color always --features electrum
5351
5452 if [ -z " $CI_ENV " ] && [[ -z " $BITCOIND_EXE " || -z " $ELECTRS_EXE " ]]; then
5553 echo -e " \n\nSkipping testing Transaction Sync Clients due to BITCOIND_EXE or ELECTRS_EXE being unset."
56- cargo check --tests
54+ cargo check -p lightning-transaction-sync - -tests
5755 else
5856 echo -e " \n\nTesting Transaction Sync Clients with features."
59- cargo test --verbose --color always --features esplora-blocking
60- cargo test --verbose --color always --features esplora-async
61- cargo test --verbose --color always --features esplora-async-https
62- cargo test --verbose --color always --features electrum
57+ cargo test -p lightning-transaction-sync - -verbose --color always --features esplora-blocking
58+ cargo test -p lightning-transaction-sync - -verbose --color always --features esplora-async
59+ cargo test -p lightning-transaction-sync - -verbose --color always --features esplora-async-https
60+ cargo test -p lightning-transaction-sync - -verbose --color always --features electrum
6361 fi
64- popd
6562fi
6663
6764echo -e " \n\nTest futures builds"
68- pushd lightning-background-processor
69- cargo test --verbose --color always --features futures
70- popd
65+ cargo test -p lightning-background-processor --verbose --color always --features futures
66+ cargo test -p lightning-background-processor --verbose --color always --features futures --no-default-features
7167
7268echo -e " \n\nTest Custom Message Macros"
73- pushd lightning-custom-message
74- cargo test --verbose --color always
69+ cargo test -p lightning-custom-message --verbose --color always
7570[ " $CI_MINIMIZE_DISK_USAGE " != " " ] && cargo clean
76- popd
7771
7872echo -e " \n\nTest backtrace-debug builds"
79- pushd lightning
80- cargo test --verbose --color always --features backtrace
81- popd
73+ cargo test -p lightning --verbose --color always --features backtrace
8274
8375echo -e " \n\nBuilding with all Log-Limiting features"
84- pushd lightning
85- grep ' ^max_level_' Cargo.toml | awk ' { print $1 }' | while read -r FEATURE; do
86- RUSTFLAGS=" $RUSTFLAGS -A unused_variables -A unused_macros -A unused_imports -A dead_code" cargo check --verbose --color always --features " $FEATURE "
76+ grep ' ^max_level_' lightning/Cargo.toml | awk ' { print $1 }' | while read -r FEATURE; do
77+ RUSTFLAGS=" $RUSTFLAGS -A unused_variables -A unused_macros -A unused_imports -A dead_code" cargo check -p lightning --verbose --color always --features " $FEATURE "
8778done
88- popd
8979
90- echo -e " \n\nTesting no-std flags in various combinations"
91- for DIR in lightning lightning-invoice lightning-rapid-gossip-sync; do
92- cargo test -p $DIR --verbose --color always --no-default-features --features no-std
93- # check if there is a conflict between no-std and the default std feature
94- cargo test -p $DIR --verbose --color always --features no-std
80+ echo -e " \n\nTesting no-std builds"
81+ for DIR in lightning-invoice lightning-rapid-gossip-sync; do
82+ cargo test -p $DIR --verbose --color always --no-default-features
9583done
9684
97- for DIR in lightning lightning-invoice lightning-rapid-gossip-sync; do
85+ cargo test -p lightning --verbose --color always --no-default-features --features no-std
86+ # check if there is a conflict between no-std and the default std feature
87+ cargo test -p lightning --verbose --color always --features no-std
88+
89+ echo -e " \n\nTesting c_bindings builds"
90+ RUSTFLAGS=" $RUSTFLAGS --cfg=c_bindings" cargo test --verbose --color always
91+
92+ for DIR in lightning-invoice lightning-rapid-gossip-sync; do
9893 # check if there is a conflict between no-std and the c_bindings cfg
99- RUSTFLAGS=" $RUSTFLAGS --cfg=c_bindings" cargo test -p $DIR --verbose --color always --no-default-features --features=no-std
94+ RUSTFLAGS=" $RUSTFLAGS --cfg=c_bindings" cargo test -p $DIR --verbose --color always --no-default-features
10095done
101- RUSTFLAGS=" $RUSTFLAGS --cfg=c_bindings" cargo test --verbose --color always
10296
97+ # Note that because `$RUSTFLAGS` is not passed through to doctest builds we cannot selectively
98+ # disable tests in `c_bindings` so we skip doctests entirely here.
99+ RUSTFLAGS=" $RUSTFLAGS --cfg=c_bindings" cargo test -p lightning-background-processor --verbose --color always --features futures --no-default-features --lib --bins --tests
100+ RUSTFLAGS=" $RUSTFLAGS --cfg=c_bindings" cargo test -p lightning --verbose --color always --no-default-features --features=no-std
101+
102+ echo -e " \n\nTesting other crate-specific builds"
103103# Note that outbound_commitment_test only runs in this mode because of hardcoded signature values
104- pushd lightning
105- cargo test --verbose --color always --no-default-features --features=std,_test_vectors
106- popd
104+ RUSTFLAGS=" $RUSTFLAGS --cfg=ldk_test_vectors" cargo test -p lightning --verbose --color always --no-default-features --features=std
107105# This one only works for lightning-invoice
108- pushd lightning-invoice
109106# check that compile with no-std and serde works in lightning-invoice
110- cargo test --verbose --color always --no-default-features --features no-std --features serde
111- popd
107+ cargo test -p lightning-invoice --verbose --color always --no-default-features --features serde
112108
113109echo -e " \n\nTesting no-std build on a downstream no-std crate"
114110# check no-std compatibility across dependencies
0 commit comments