Move `lightning-transaction-sync` tests to dedicated script
.. and bump its MSRV to 1.75.
Recently, `rustls` bumped their MSRV to 1.71. As we depend on them and
don't want to continuously pin this security-critical dependency back,
we have no choice left but to bump the MSRV for
`lightning-transaction-sync` to a version >= 1.71, too.
Here, we hence move the `lightning-transaction-sync` tests to a
dedicated script and propose to introduce a secondary MSRV of 1.75.
We chose this particular version, because:
a) it's > 1 year old
b) it provides a buffer to 1.71, i.e., if some crate bumped to a version
> 1.71, there is a chance we don't immediately have to react again
c) it
stabilized `async fn`s in traits (see
https://blog.rust-lang.org/2023/12/21/async-fn-rpit-in-traits.html),
which might become handy for related (BDK) crates, which hopefully will
adopt the same target.
2025-01-13 10:44:16 +01:00
|
|
|
#!/bin/bash
|
|
|
|
set -eox pipefail
|
|
|
|
|
|
|
|
RUSTC_MINOR_VERSION=$(rustc --version | awk '{ split($2,a,"."); print a[2] }')
|
|
|
|
|
|
|
|
pushd lightning-transaction-sync
|
|
|
|
|
|
|
|
# Some crates require pinning to meet our MSRV even for our downstream users,
|
|
|
|
# which we do here.
|
|
|
|
# Further crates which appear only as dev-dependencies are pinned further down.
|
|
|
|
function PIN_RELEASE_DEPS {
|
|
|
|
return 0 # Don't fail the script if our rustc is higher than the last check
|
|
|
|
}
|
|
|
|
|
|
|
|
PIN_RELEASE_DEPS # pin the release dependencies
|
|
|
|
|
|
|
|
# Starting with version 0.5.11, the `home` crate has an MSRV of rustc 1.81.0.
|
|
|
|
[ "$RUSTC_MINOR_VERSION" -lt 81 ] && cargo update -p home --precise "0.5.9" --verbose
|
|
|
|
|
2025-02-26 22:40:22 -08:00
|
|
|
# Starting with version 1.2.0, the `idna_adapter` crate has an MSRV of rustc 1.81.0.
|
|
|
|
[ "$RUSTC_MINOR_VERSION" -lt 81 ] && cargo update -p idna_adapter --precise "1.1.0" --verbose
|
|
|
|
|
Move `lightning-transaction-sync` tests to dedicated script
.. and bump its MSRV to 1.75.
Recently, `rustls` bumped their MSRV to 1.71. As we depend on them and
don't want to continuously pin this security-critical dependency back,
we have no choice left but to bump the MSRV for
`lightning-transaction-sync` to a version >= 1.71, too.
Here, we hence move the `lightning-transaction-sync` tests to a
dedicated script and propose to introduce a secondary MSRV of 1.75.
We chose this particular version, because:
a) it's > 1 year old
b) it provides a buffer to 1.71, i.e., if some crate bumped to a version
> 1.71, there is a chance we don't immediately have to react again
c) it
stabilized `async fn`s in traits (see
https://blog.rust-lang.org/2023/12/21/async-fn-rpit-in-traits.html),
which might become handy for related (BDK) crates, which hopefully will
adopt the same target.
2025-01-13 10:44:16 +01:00
|
|
|
export RUST_BACKTRACE=1
|
|
|
|
|
|
|
|
echo -e "\n\nChecking Transaction Sync Clients with features."
|
|
|
|
cargo check --verbose --color always --features esplora-blocking
|
|
|
|
cargo check --verbose --color always --features esplora-async
|
|
|
|
cargo check --verbose --color always --features esplora-async-https
|
|
|
|
cargo check --verbose --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 --tests
|
|
|
|
else
|
|
|
|
echo -e "\n\nTesting Transaction Sync Clients with features."
|
|
|
|
cargo test --verbose --color always --features esplora-blocking
|
|
|
|
cargo test --verbose --color always --features esplora-async
|
|
|
|
cargo test --verbose --color always --features esplora-async-https
|
|
|
|
cargo test --verbose --color always --features electrum
|
|
|
|
fi
|
|
|
|
|
|
|
|
popd
|