Skip to content

Commit ddad7d3

Browse files
committed
Disable lightning-transaction-sync integration tests on Windows
.. as the `electrsd` crate doesn't support it. While we previously did so in our CI script, we just `cfg`-gate the tests and dependencies for easier handling.
1 parent 5bf58f0 commit ddad7d3

File tree

3 files changed

+23
-27
lines changed

3 files changed

+23
-27
lines changed

ci/ci-tests.sh

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -81,30 +81,26 @@ cargo test --verbose --color always --features rpc-client,rest-client,tokio
8181
cargo check --verbose --color always --features rpc-client,rest-client,tokio
8282
popd
8383

84-
if [[ "$HOST_PLATFORM" != *windows* ]]; then
85-
echo -e "\n\nBuilding and testing Transaction Sync Clients with features"
86-
pushd lightning-transaction-sync
87-
88-
# reqwest 0.11.21 had a regression that broke its 1.63.0 MSRV
89-
[ "$RUSTC_MINOR_VERSION" -lt 65 ] && cargo update -p reqwest --precise "0.11.20" --verbose
90-
# Starting with version 1.10.0, the `regex` crate has an MSRV of rustc 1.65.0.
91-
[ "$RUSTC_MINOR_VERSION" -lt 65 ] && cargo update -p regex --precise "1.9.6" --verbose
92-
# Starting with version 0.5.9 (there is no .6-.8), the `home` crate has an MSRV of rustc 1.70.0.
93-
[ "$RUSTC_MINOR_VERSION" -lt 70 ] && cargo update -p home --precise "0.5.5" --verbose
94-
95-
DOWNLOAD_ELECTRS_AND_BITCOIND
96-
97-
RUSTFLAGS="$RUSTFLAGS --cfg no_download" cargo test --verbose --color always --features esplora-blocking
98-
RUSTFLAGS="$RUSTFLAGS --cfg no_download" cargo check --verbose --color always --features esplora-blocking
99-
RUSTFLAGS="$RUSTFLAGS --cfg no_download" cargo test --verbose --color always --features esplora-async
100-
RUSTFLAGS="$RUSTFLAGS --cfg no_download" cargo check --verbose --color always --features esplora-async
101-
RUSTFLAGS="$RUSTFLAGS --cfg no_download" cargo test --verbose --color always --features esplora-async-https
102-
RUSTFLAGS="$RUSTFLAGS --cfg no_download" cargo check --verbose --color always --features esplora-async-https
103-
RUSTFLAGS="$RUSTFLAGS --cfg no_download" cargo test --verbose --color always --features electrum
104-
RUSTFLAGS="$RUSTFLAGS --cfg no_download" cargo check --verbose --color always --features electrum
105-
106-
popd
107-
fi
84+
echo -e "\n\nBuilding and testing Transaction Sync Clients with features"
85+
pushd lightning-transaction-sync
86+
# reqwest 0.11.21 had a regression that broke its 1.63.0 MSRV
87+
[ "$RUSTC_MINOR_VERSION" -lt 65 ] && cargo update -p reqwest --precise "0.11.20" --verbose
88+
# Starting with version 1.10.0, the `regex` crate has an MSRV of rustc 1.65.0.
89+
[ "$RUSTC_MINOR_VERSION" -lt 65 ] && cargo update -p regex --precise "1.9.6" --verbose
90+
# Starting with version 0.5.9 (there is no .6-.8), the `home` crate has an MSRV of rustc 1.70.0.
91+
[ "$RUSTC_MINOR_VERSION" -lt 70 ] && cargo update -p home --precise "0.5.5" --verbose
92+
93+
DOWNLOAD_ELECTRS_AND_BITCOIND
94+
95+
RUSTFLAGS="$RUSTFLAGS --cfg no_download" cargo test --verbose --color always --features esplora-blocking
96+
RUSTFLAGS="$RUSTFLAGS --cfg no_download" cargo check --verbose --color always --features esplora-blocking
97+
RUSTFLAGS="$RUSTFLAGS --cfg no_download" cargo test --verbose --color always --features esplora-async
98+
RUSTFLAGS="$RUSTFLAGS --cfg no_download" cargo check --verbose --color always --features esplora-async
99+
RUSTFLAGS="$RUSTFLAGS --cfg no_download" cargo test --verbose --color always --features esplora-async-https
100+
RUSTFLAGS="$RUSTFLAGS --cfg no_download" cargo check --verbose --color always --features esplora-async-https
101+
RUSTFLAGS="$RUSTFLAGS --cfg no_download" cargo test --verbose --color always --features electrum
102+
RUSTFLAGS="$RUSTFLAGS --cfg no_download" cargo check --verbose --color always --features electrum
103+
popd
108104

109105
echo -e "\n\nTest futures builds"
110106
pushd lightning-background-processor

lightning-transaction-sync/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ electrum-client = { version = "0.18.0", optional = true }
3434
lightning = { version = "0.0.121", path = "../lightning", default-features = false, features = ["std", "_test_utils"] }
3535
tokio = { version = "1.35.0", features = ["full"] }
3636

37-
[target.'cfg(not(no_download))'.dev-dependencies]
37+
[target.'cfg(all(not(target_os = "windows"), not(no_download)))'.dev-dependencies]
3838
electrsd = { version = "0.26.0", default-features = false, features = ["legacy", "esplora_a33e97e1", "bitcoind_25_0"] }
3939

40-
[target.'cfg(no_download)'.dev-dependencies]
40+
[target.'cfg(all(not(target_os = "windows"), no_download))'.dev-dependencies]
4141
electrsd = { version = "0.26.0", default-features = false, features = ["legacy"] }

lightning-transaction-sync/tests/integration_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![cfg(any(feature = "esplora-blocking", feature = "esplora-async", feature = "electrum"))]
1+
#![cfg(all(not(target_os = "windows"), any(feature = "esplora-blocking", feature = "esplora-async", feature = "electrum")))]
22

33
#[cfg(any(feature = "esplora-blocking", feature = "esplora-async"))]
44
use lightning_transaction_sync::EsploraSyncClient;

0 commit comments

Comments
 (0)