Skip to content

Commit aa3c786

Browse files
committed
Run all tests first before testing more esoteric flags in CI
This should at least marginally more aggressively target things which are more likely to have changed in CI, making `ci-tests.sh` more useful as a "default" script for developers to run locally.
1 parent e13ff10 commit aa3c786

File tree

1 file changed

+41
-41
lines changed

1 file changed

+41
-41
lines changed

ci/ci-tests.sh

+41-41
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,56 @@ echo -e "\n\nBuilding and testing all workspace crates..."
4040
cargo build --verbose --color always
4141
cargo test --verbose --color always
4242

43-
echo -e "\n\nBuilding with all Log-Limiting features"
44-
pushd lightning
45-
grep '^max_level_' Cargo.toml | awk '{ print $1 }'| while read -r FEATURE; do
46-
cargo build --verbose --color always --features "$FEATURE"
47-
done
43+
echo -e "\n\nBuilding and testing Block Sync Clients with features"
44+
pushd lightning-block-sync
45+
cargo build --verbose --color always --features rest-client
46+
cargo test --verbose --color always --features rest-client
47+
cargo build --verbose --color always --features rpc-client
48+
cargo test --verbose --color always --features rpc-client
49+
cargo build --verbose --color always --features rpc-client,rest-client
50+
cargo test --verbose --color always --features rpc-client,rest-client
51+
cargo build --verbose --color always --features rpc-client,rest-client,tokio
52+
cargo test --verbose --color always --features rpc-client,rest-client,tokio
4853
popd
4954

55+
if [[ $RUSTC_MINOR_VERSION -gt 67 && "$HOST_PLATFORM" != *windows* ]]; then
56+
echo -e "\n\nBuilding and testing Transaction Sync Clients with features"
57+
pushd lightning-transaction-sync
58+
cargo build --verbose --color always --features esplora-blocking
59+
cargo test --verbose --color always --features esplora-blocking
60+
cargo build --verbose --color always --features esplora-async
61+
cargo test --verbose --color always --features esplora-async
62+
cargo build --verbose --color always --features esplora-async-https
63+
cargo test --verbose --color always --features esplora-async-https
64+
popd
65+
fi
66+
67+
echo -e "\n\nTest futures builds"
68+
pushd lightning-background-processor
69+
cargo test --verbose --color always --features futures
70+
popd
71+
72+
if [ "$RUSTC_MINOR_VERSION" -gt 55 ]; then
73+
echo -e "\n\nTest Custom Message Macros"
74+
pushd lightning-custom-message
75+
cargo test --verbose --color always
76+
popd
77+
fi
78+
5079
if [ "$RUSTC_MINOR_VERSION" -gt 51 ]; then # Current `object` MSRV, subject to change
5180
echo -e "\n\nTest backtrace-debug builds"
5281
pushd lightning
5382
cargo test --verbose --color always --features backtrace
5483
popd
5584
fi
5685

86+
echo -e "\n\nBuilding with all Log-Limiting features"
87+
pushd lightning
88+
grep '^max_level_' Cargo.toml | awk '{ print $1 }'| while read -r FEATURE; do
89+
cargo build --verbose --color always --features "$FEATURE"
90+
done
91+
popd
92+
5793
echo -e "\n\nTesting no-std flags in various combinations"
5894
for DIR in lightning lightning-invoice lightning-rapid-gossip-sync; do
5995
pushd $DIR
@@ -97,42 +133,6 @@ if [ -f "$(which arm-none-eabi-gcc)" ]; then
97133
popd
98134
fi
99135

100-
echo -e "\n\nBuilding and testing Block Sync Clients with features"
101-
pushd lightning-block-sync
102-
cargo build --verbose --color always --features rest-client
103-
cargo test --verbose --color always --features rest-client
104-
cargo build --verbose --color always --features rpc-client
105-
cargo test --verbose --color always --features rpc-client
106-
cargo build --verbose --color always --features rpc-client,rest-client
107-
cargo test --verbose --color always --features rpc-client,rest-client
108-
cargo build --verbose --color always --features rpc-client,rest-client,tokio
109-
cargo test --verbose --color always --features rpc-client,rest-client,tokio
110-
popd
111-
112-
if [[ $RUSTC_MINOR_VERSION -gt 67 && "$HOST_PLATFORM" != *windows* ]]; then
113-
echo -e "\n\nBuilding and testing Transaction Sync Clients with features"
114-
pushd lightning-transaction-sync
115-
cargo build --verbose --color always --features esplora-blocking
116-
cargo test --verbose --color always --features esplora-blocking
117-
cargo build --verbose --color always --features esplora-async
118-
cargo test --verbose --color always --features esplora-async
119-
cargo build --verbose --color always --features esplora-async-https
120-
cargo test --verbose --color always --features esplora-async-https
121-
popd
122-
fi
123-
124-
echo -e "\n\nTest futures builds"
125-
pushd lightning-background-processor
126-
cargo test --verbose --color always --features futures
127-
popd
128-
129-
if [ "$RUSTC_MINOR_VERSION" -gt 55 ]; then
130-
echo -e "\n\nTest Custom Message Macros"
131-
pushd lightning-custom-message
132-
cargo test --verbose --color always
133-
popd
134-
fi
135-
136136
echo -e "\n\nTest Taproot builds"
137137
pushd lightning
138138
RUSTFLAGS="$RUSTFLAGS --cfg=taproot" cargo test --verbose --color always -p lightning

0 commit comments

Comments
 (0)