@@ -30,11 +30,33 @@ PIN_RELEASE_DEPS # pin the release dependencies in our main workspace
3030
3131export RUST_BACKTRACE=1
3232
33- echo -e " \n\nBuilding and testing all workspace crates..."
34- cargo test --verbose --color always
33+ echo -e " \n\nChecking the full workspace."
3534cargo check --verbose --color always
3635
37- echo -e " \n\nBuilding and testing Block Sync Clients with features"
36+ # When the workspace members change, make sure to update the list here as well
37+ # as in `Cargo.toml`.
38+ WORKSPACE_MEMBERS=(
39+ lightning
40+ lightning-types
41+ lightning-block-sync
42+ lightning-invoice
43+ lightning-net-tokio
44+ lightning-persister
45+ lightning-background-processor
46+ lightning-rapid-gossip-sync
47+ lightning-custom-message
48+ lightning-transaction-sync
49+ possiblyrandom
50+ )
51+
52+ echo -e " \n\nChecking, testing, and building docs for all workspace members individually..."
53+ for DIR in " ${WORKSPACE_MEMBERS[@]} " ; do
54+ cargo test -p " $DIR " --verbose --color always
55+ cargo check -p " $DIR " --verbose --color always
56+ cargo doc -p " $DIR " --document-private-items
57+ done
58+
59+ echo -e " \n\nChecking and testing Block Sync Clients with features"
3860
3961cargo test -p lightning-block-sync --verbose --color always --features rest-client
4062cargo check -p lightning-block-sync --verbose --color always --features rest-client
@@ -80,38 +102,36 @@ grep '^max_level_' lightning/Cargo.toml | awk '{ print $1 }'| while read -r FEAT
80102 RUSTFLAGS=" $RUSTFLAGS -A unused_variables -A unused_macros -A unused_imports -A dead_code" cargo check -p lightning --verbose --color always --features " $FEATURE "
81103done
82104
83- echo -e " \n\nTesting no-std builds"
105+ echo -e " \n\nTesting no_std builds"
84106for DIR in lightning-invoice lightning-rapid-gossip-sync; do
85107 cargo test -p $DIR --verbose --color always --no-default-features
86108done
87109
88- cargo test -p lightning --verbose --color always --no-default-features --features no-std
89- # check if there is a conflict between no-std and the default std feature
90- cargo test -p lightning --verbose --color always --features no-std
110+ cargo test -p lightning --verbose --color always --no-default-features
91111
92112echo -e " \n\nTesting c_bindings builds"
93113# Note that because `$RUSTFLAGS` is not passed through to doctest builds we cannot selectively
94114# disable doctests in `c_bindings` so we skip doctests entirely here.
95115RUSTFLAGS=" $RUSTFLAGS --cfg=c_bindings" cargo test --verbose --color always --lib --bins --tests
96116
97117for DIR in lightning-invoice lightning-rapid-gossip-sync; do
98- # check if there is a conflict between no-std and the c_bindings cfg
118+ # check if there is a conflict between no_std and the c_bindings cfg
99119 RUSTFLAGS=" $RUSTFLAGS --cfg=c_bindings" cargo test -p $DIR --verbose --color always --no-default-features
100120done
101121
102122# Note that because `$RUSTFLAGS` is not passed through to doctest builds we cannot selectively
103123# disable doctests in `c_bindings` so we skip doctests entirely here.
104124RUSTFLAGS=" $RUSTFLAGS --cfg=c_bindings" cargo test -p lightning-background-processor --verbose --color always --features futures --no-default-features --lib --bins --tests
105- RUSTFLAGS=" $RUSTFLAGS --cfg=c_bindings" cargo test -p lightning --verbose --color always --no-default-features --features=no-std -- lib --bins --tests
125+ RUSTFLAGS=" $RUSTFLAGS --cfg=c_bindings" cargo test -p lightning --verbose --color always --no-default-features --lib --bins --tests
106126
107127echo -e " \n\nTesting other crate-specific builds"
108128# Note that outbound_commitment_test only runs in this mode because of hardcoded signature values
109129RUSTFLAGS=" $RUSTFLAGS --cfg=ldk_test_vectors" cargo test -p lightning --verbose --color always --no-default-features --features=std
110130# This one only works for lightning-invoice
111- # check that compile with no-std and serde works in lightning-invoice
131+ # check that compile with no_std and serde works in lightning-invoice
112132cargo test -p lightning-invoice --verbose --color always --no-default-features --features serde
113133
114- echo -e " \n\nTesting no-std build on a downstream no-std crate"
134+ echo -e " \n\nTesting no_std build on a downstream no-std crate"
115135# check no-std compatibility across dependencies
116136pushd no-std-check
117137cargo check --verbose --color always --features lightning-transaction-sync
0 commit comments