From a06e7b9133e0731766eba495ac049f27859d56a3 Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Wed, 4 Sep 2024 11:10:13 +0200 Subject: [PATCH] Check workspace members with default features individually in CI Previously, we would only check the workspace as a whole. This however would mean that we would check/test crates with `lightning`'s default features enabled, allowing failures-to-build under the crates own default features to slip through, if they didn't explicitly enable `lightning/std`, for example. Here, we extend the CI to check the workspace as a whole but then run checks, tests, and doc generation on the workspace members individually, asserting that all of them build even when not built as part of the same workspace as `lightning`. --- ci/ci-tests.sh | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/ci/ci-tests.sh b/ci/ci-tests.sh index 017711220..92068f7cc 100755 --- a/ci/ci-tests.sh +++ b/ci/ci-tests.sh @@ -30,11 +30,31 @@ PIN_RELEASE_DEPS # pin the release dependencies in our main workspace export RUST_BACKTRACE=1 -echo -e "\n\nBuilding and testing all workspace crates..." -cargo test --verbose --color always +echo -e "\n\nChecking the full workspace." cargo check --verbose --color always -echo -e "\n\nBuilding and testing Block Sync Clients with features" +WORKSPACE_MEMBERS=( + lightning + lightning-types + lightning-block-sync + lightning-invoice + lightning-net-tokio + lightning-persister + lightning-background-processor + lightning-rapid-gossip-sync + lightning-custom-message + lightning-transaction-sync + possiblyrandom +) + +echo -e "\n\nChecking, testing, and building docs for all workspace members individually..." +for DIR in "${WORKSPACE_MEMBERS[@]}"; do + cargo test -p "$DIR" --verbose --color always + cargo check -p "$DIR" --verbose --color always + cargo doc -p "$DIR" --document-private-items +done + +echo -e "\n\nChecking and testing Block Sync Clients with features" cargo test -p lightning-block-sync --verbose --color always --features rest-client cargo check -p lightning-block-sync --verbose --color always --features rest-client -- 2.39.5