Skip to content

Commit 7956af0

Browse files
committed
Move lightning-transaction-sync back into the main workspace
Now that it has the same MSRV as everything else in the workspace, it doesn't need to live on its own.
1 parent e42e74e commit 7956af0

File tree

4 files changed

+26
-63
lines changed

4 files changed

+26
-63
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -62,52 +62,35 @@ jobs:
6262
- name: Set RUSTFLAGS to deny warnings
6363
if: "matrix.toolchain == '1.75.0'"
6464
run: echo "RUSTFLAGS=-D warnings" >> "$GITHUB_ENV"
65-
- name: Run CI script
66-
shell: bash # Default on Winblows is powershell
67-
run: CI_ENV=1 CI_MINIMIZE_DISK_USAGE=1 ./ci/ci-tests.sh
68-
69-
build-tx-sync:
70-
strategy:
71-
fail-fast: false
72-
matrix:
73-
platform: [ ubuntu-latest, macos-latest ]
74-
toolchain: [ stable, beta, 1.75.0 ]
75-
runs-on: ${{ matrix.platform }}
76-
steps:
77-
- name: Checkout source code
78-
uses: actions/checkout@v4
79-
- name: Install Rust ${{ matrix.toolchain }} toolchain
80-
run: |
81-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ matrix.toolchain }}
82-
- name: Set RUSTFLAGS to deny warnings
83-
if: "matrix.toolchain == '1.75.0'"
84-
run: echo "RUSTFLAGS=-D warnings" >> "$GITHUB_ENV"
8565
- name: Enable caching for bitcoind
66+
if: matrix.platform != 'windows-latest'
8667
id: cache-bitcoind
8768
uses: actions/cache@v4
8869
with:
8970
path: bin/bitcoind-${{ runner.os }}-${{ runner.arch }}
9071
key: bitcoind-${{ runner.os }}-${{ runner.arch }}
9172
- name: Enable caching for electrs
73+
if: matrix.platform != 'windows-latest'
9274
id: cache-electrs
9375
uses: actions/cache@v4
9476
with:
9577
path: bin/electrs-${{ runner.os }}-${{ runner.arch }}
9678
key: electrs-${{ runner.os }}-${{ runner.arch }}
9779
- name: Download bitcoind/electrs
98-
if: "steps.cache-bitcoind.outputs.cache-hit != 'true' || steps.cache-electrs.outputs.cache-hit != 'true'"
80+
if: "matrix.platform != 'windows-latest' && (steps.cache-bitcoind.outputs.cache-hit != 'true' || steps.cache-electrs.outputs.cache-hit != 'true')"
9981
run: |
10082
source ./contrib/download_bitcoind_electrs.sh
10183
mkdir bin
10284
mv "$BITCOIND_EXE" bin/bitcoind-${{ runner.os }}-${{ runner.arch }}
10385
mv "$ELECTRS_EXE" bin/electrs-${{ runner.os }}-${{ runner.arch }}
10486
- name: Set bitcoind/electrs environment variables
87+
if: matrix.platform != 'windows-latest'
10588
run: |
10689
echo "BITCOIND_EXE=$( pwd )/bin/bitcoind-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV"
10790
echo "ELECTRS_EXE=$( pwd )/bin/electrs-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV"
10891
- name: Run CI script
10992
shell: bash # Default on Winblows is powershell
110-
run: CI_ENV=1 CI_MINIMIZE_DISK_USAGE=1 ./ci/ci-tx-sync-tests.sh
93+
run: CI_ENV=1 CI_MINIMIZE_DISK_USAGE=1 ./ci/ci-tests.sh
11194

11295
coverage:
11396
needs: fuzz

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ members = [
1616
"lightning-macros",
1717
"lightning-dns-resolver",
1818
"lightning-liquidity",
19+
"lightning-transaction-sync",
1920
"possiblyrandom",
2021
]
2122

2223
exclude = [
23-
"lightning-transaction-sync",
2424
"lightning-tests",
2525
"ext-functional-test-demo",
2626
"no-std-check",

ci/ci-tests.sh

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#shellcheck disable=SC2002,SC2207
33
set -eox pipefail
44

5-
# Currently unused as we don't have to pin anything for MSRV:
65
RUSTC_MINOR_VERSION=$(rustc --version | awk '{ split($2,a,"."); print a[2] }')
76

87
# Some crates require pinning to meet our MSRV even for our downstream users,
@@ -20,6 +19,9 @@ PIN_RELEASE_DEPS # pin the release dependencies in our main workspace
2019
# proptest 1.9.0 requires rustc 1.82.0
2120
[ "$RUSTC_MINOR_VERSION" -lt 82 ] && cargo update -p proptest --precise "1.8.0" --verbose
2221

22+
# Starting with version 1.2.0, the `idna_adapter` crate has an MSRV of rustc 1.81.0.
23+
[ "$RUSTC_MINOR_VERSION" -lt 81 ] && cargo update -p idna_adapter --precise "1.1.0" --verbose
24+
2325
export RUST_BACKTRACE=1
2426

2527
echo -e "\n\nChecking the workspace, except lightning-transaction-sync."
@@ -57,6 +59,23 @@ cargo check -p lightning-block-sync --verbose --color always --features rpc-clie
5759
cargo test -p lightning-block-sync --verbose --color always --features rpc-client,rest-client,tokio
5860
cargo check -p lightning-block-sync --verbose --color always --features rpc-client,rest-client,tokio
5961

62+
echo -e "\n\nChecking Transaction Sync Clients with features."
63+
cargo check -p lightning-transaction-sync --verbose --color always --features esplora-blocking
64+
cargo check -p lightning-transaction-sync --verbose --color always --features esplora-async
65+
cargo check -p lightning-transaction-sync --verbose --color always --features esplora-async-https
66+
cargo check -p lightning-transaction-sync --verbose --color always --features electrum
67+
68+
if [ -z "$CI_ENV" ] && [[ -z "$BITCOIND_EXE" || -z "$ELECTRS_EXE" ]]; then
69+
echo -e "\n\nSkipping testing Transaction Sync Clients due to BITCOIND_EXE or ELECTRS_EXE being unset."
70+
cargo check -p lightning-transaction-sync --tests
71+
else
72+
echo -e "\n\nTesting Transaction Sync Clients with features."
73+
cargo test -p lightning-transaction-sync --verbose --color always --features esplora-blocking
74+
cargo test -p lightning-transaction-sync --verbose --color always --features esplora-async
75+
cargo test -p lightning-transaction-sync --verbose --color always --features esplora-async-https
76+
cargo test -p lightning-transaction-sync --verbose --color always --features electrum
77+
fi
78+
6079
echo -e "\n\nChecking and testing lightning-persister with features"
6180
cargo test -p lightning-persister --verbose --color always --features tokio
6281
cargo check -p lightning-persister --verbose --color always --features tokio

ci/ci-tx-sync-tests.sh

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)