Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions ci/ci-tests-features.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ set -eox pipefail
# shellcheck source=ci/ci-tests-common.sh
source "$(dirname "$0")/ci-tests-common.sh"

echo -e "\n\nChecking and testing lightning with features"
echo -e "\n\nTesting lightning with features"
cargo test -p lightning --quiet --color always --features dnssec
cargo check -p lightning --quiet --color always --features dnssec
cargo doc -p lightning --quiet --document-private-items --features dnssec

echo -e "\n\nChecking and testing lightning-persister with features"
echo -e "\n\nTesting lightning-persister with features"
cargo test -p lightning-persister --quiet --color always --features tokio
cargo check -p lightning-persister --quiet --color always --features tokio
cargo doc -p lightning-persister --quiet --document-private-items --features tokio

echo -e "\n\nTest backtrace-debug builds"
Expand Down
16 changes: 5 additions & 11 deletions ci/ci-tests-sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,17 @@ source "$(dirname "$0")/ci-tests-common.sh"
echo -e "\n\nChecking and testing Block Sync Clients with features"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop "Checking and ".


cargo test -p lightning-block-sync --quiet --color always --features rest-client
cargo check -p lightning-block-sync --quiet --color always --features rest-client
cargo test -p lightning-block-sync --quiet --color always --features rpc-client
cargo check -p lightning-block-sync --quiet --color always --features rpc-client
cargo test -p lightning-block-sync --quiet --color always --features rpc-client,rest-client
cargo check -p lightning-block-sync --quiet --color always --features rpc-client,rest-client
cargo test -p lightning-block-sync --quiet --color always --features rpc-client,rest-client,tokio
cargo check -p lightning-block-sync --quiet --color always --features rpc-client,rest-client,tokio

echo -e "\n\nChecking Transaction Sync Clients with features."
cargo check -p lightning-transaction-sync --quiet --color always --features esplora-blocking
cargo check -p lightning-transaction-sync --quiet --color always --features esplora-async
cargo check -p lightning-transaction-sync --quiet --color always --features esplora-async-https
cargo check -p lightning-transaction-sync --quiet --color always --features electrum

if [ -z "$CI_ENV" ] && [[ -z "$BITCOIND_EXE" || -z "$ELECTRS_EXE" ]]; then
echo -e "\n\nSkipping testing Transaction Sync Clients due to BITCOIND_EXE or ELECTRS_EXE being unset."
cargo check -p lightning-transaction-sync --tests
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this line dropped?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restored

cargo check -p lightning-transaction-sync --tests --quiet --color always
cargo check -p lightning-transaction-sync --tests --quiet --color always --features esplora-blocking
cargo check -p lightning-transaction-sync --tests --quiet --color always --features esplora-async
cargo check -p lightning-transaction-sync --tests --quiet --color always --features esplora-async-https
cargo check -p lightning-transaction-sync --tests --quiet --color always --features electrum
else
echo -e "\n\nTesting Transaction Sync Clients with features."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this also test without any features?

cargo test -p lightning-transaction-sync --quiet --color always --features esplora-blocking
Expand Down
18 changes: 5 additions & 13 deletions ci/ci-tests-workspace.sh
Original file line number Diff line number Diff line change
@@ -1,31 +1,23 @@
#!/bin/bash
#shellcheck disable=SC2002,SC2207
set -eox pipefail

# shellcheck source=ci/ci-tests-common.sh
source "$(dirname "$0")/ci-tests-common.sh"

echo -e "\n\nChecking the workspace, except lightning-transaction-sync."
cargo check --quiet --color always
echo -e "\n\nChecking the workspace."
cargo check --tests --quiet --color always

WORKSPACE_MEMBERS=( $(cat Cargo.toml | tr '\n' '\r' | sed 's/\r //g' | tr '\r' '\n' | grep '^members =' | sed 's/members.*=.*\[//' | tr -d '"' | tr ',' ' ') )

echo -e "\n\nTesting the workspace, except lightning-transaction-sync."
echo -e "\n\nTesting the workspace."
cargo test --quiet --color always
Comment on lines +8 to 11
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these two redundant?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the goal is to fail as fast as possible - perhaps 🤷‍♂️


echo -e "\n\nTesting upgrade from prior versions of LDK"
pushd lightning-tests
cargo test --quiet
popd

echo -e "\n\nChecking and building docs for all workspace members individually..."
for DIR in "${WORKSPACE_MEMBERS[@]}"; do
cargo check -p "$DIR" --quiet --color always
cargo doc -p "$DIR" --quiet --document-private-items
done
echo -e "\n\nBuilding docs for all workspace members."
cargo doc --workspace --quiet --document-private-items

echo -e "\n\nTest Custom Message Macros"
cargo test -p lightning-custom-message --quiet --color always
[ "$CI_MINIMIZE_DISK_USAGE" != "" ] && cargo clean

# Test that we can build downstream code with only the "release pins".
Expand Down
Loading