Skip to content

Commit 171401f

Browse files
committed
Test the whole workspace at once in ci-tests.sh
Running `cargo test -p crate` for each crate in the workspace results in re-building the `lightning` crate for each workspace crate, which can be quite slow. This adds nontrivial time to our total CI runs. Here, instead, we just run `cargo test` and let it build the whole workspace crate list in one go. This does result in combined features which may leave some issues with `cargo test -p crate` undetected, but there's not a ton of harm to that.
1 parent b53f6e6 commit 171401f

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

ci/ci-tests.sh

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,21 @@ WORKSPACE_MEMBERS=(
5050
possiblyrandom
5151
)
5252

53-
echo -e "\n\nChecking, testing, and building docs for all workspace members individually..."
54-
for DIR in "${WORKSPACE_MEMBERS[@]}"; do
55-
cargo test -p "$DIR" --verbose --color always
56-
cargo check -p "$DIR" --verbose --color always
57-
cargo doc -p "$DIR" --document-private-items
58-
done
53+
echo -e "\n\nTesting the workspace, except lightning-transaction-sync."
54+
cargo test --verbose --color always
5955

6056
echo -e "\n\nTesting upgrade from prior versions of LDK"
6157
pushd lightning-tests
6258
[ "$RUSTC_MINOR_VERSION" -lt 65 ] && cargo update -p regex --precise "1.9.6" --verbose
6359
cargo test
6460
popd
6561

62+
echo -e "\n\nChecking and building docs for all workspace members individually..."
63+
for DIR in "${WORKSPACE_MEMBERS[@]}"; do
64+
cargo check -p "$DIR" --verbose --color always
65+
cargo doc -p "$DIR" --document-private-items
66+
done
67+
6668
echo -e "\n\nChecking and testing Block Sync Clients with features"
6769

6870
cargo test -p lightning-block-sync --verbose --color always --features rest-client

0 commit comments

Comments
 (0)