@@ -32,83 +32,79 @@ cargo test --verbose --color always
32
32
cargo check --verbose --color always
33
33
34
34
echo -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
45
44
46
45
if [[ " $HOST_PLATFORM " != * windows* ]]; then
47
- pushd lightning-transaction-sync
48
46
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
53
51
54
52
if [ -z " $CI_ENV " ] && [[ -z " $BITCOIND_EXE " || -z " $ELECTRS_EXE " ]]; then
55
53
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
57
55
else
58
56
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
63
61
fi
64
- popd
65
62
fi
66
63
67
64
echo -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
71
67
72
68
echo -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
75
70
[ " $CI_MINIMIZE_DISK_USAGE " != " " ] && cargo clean
76
- popd
77
71
78
72
echo -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
82
74
83
75
echo -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 "
87
78
done
88
- popd
89
79
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
95
83
done
96
84
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
98
93
# 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
100
95
done
101
- RUSTFLAGS=" $RUSTFLAGS --cfg=c_bindings" cargo test --verbose --color always
102
96
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"
103
103
# 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
107
105
# This one only works for lightning-invoice
108
- pushd lightning-invoice
109
106
# 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
112
108
113
109
echo -e " \n\nTesting no-std build on a downstream no-std crate"
114
110
# check no-std compatibility across dependencies
0 commit comments