Skip to content

Commit b2c22fa

Browse files
committed
Build and test transaction sync crate in CI
1 parent bc09e32 commit b2c22fa

File tree

1 file changed

+35
-8
lines changed

1 file changed

+35
-8
lines changed

.github/workflows/build.yml

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
beta,
1313
# 1.41.1 is MSRV for Rust-Lightning, lightning-invoice, and lightning-persister
1414
1.41.1,
15-
# 1.45.2 is MSRV for lightning-net-tokio, lightning-block-sync, lightning-background-processor, and coverage generation
15+
# 1.45.2 is MSRV for lightning-net-tokio, lightning-block-sync, lightning-background-processor
1616
1.45.2,
1717
# 1.47.0 will be the MSRV for no-std builds using hashbrown once core2 is updated
1818
1.47.0]
@@ -21,43 +21,52 @@ jobs:
2121
build-net-tokio: true
2222
build-no-std: true
2323
build-futures: true
24+
build-tx-sync: true
25+
coverage: true
2426
- toolchain: stable
2527
platform: macos-latest
2628
build-net-tokio: true
2729
build-no-std: true
2830
build-futures: true
31+
build-tx-sync: true
2932
- toolchain: beta
3033
platform: macos-latest
3134
build-net-tokio: true
3235
build-no-std: true
3336
build-futures: true
37+
build-tx-sync: true
3438
- toolchain: stable
3539
platform: windows-latest
3640
build-net-tokio: true
3741
build-no-std: true
3842
build-futures: true
43+
build-tx-sync: false
3944
- toolchain: beta
4045
platform: windows-latest
4146
build-net-tokio: true
4247
build-no-std: true
4348
build-futures: true
49+
build-tx-sync: false
4450
- toolchain: beta
4551
build-net-tokio: true
4652
build-no-std: true
4753
build-futures: true
54+
build-tx-sync: true
4855
- toolchain: 1.41.1
4956
build-no-std: false
5057
test-log-variants: true
5158
build-futures: false
59+
build-tx-sync: false
5260
- toolchain: 1.45.2
5361
build-net-old-tokio: true
5462
build-net-tokio: true
5563
build-no-std: false
5664
build-futures: true
57-
coverage: true
65+
build-tx-sync: false
5866
- toolchain: 1.47.0
5967
build-futures: true
6068
build-no-std: true
69+
build-tx-sync: false
6170
runs-on: ${{ matrix.platform }}
6271
steps:
6372
- name: Checkout source code
@@ -73,10 +82,10 @@ jobs:
7382
run: cargo update -p tokio --precise "1.14.0" --verbose
7483
env:
7584
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
76-
- name: Build on Rust ${{ matrix.toolchain }} with net-tokio
77-
if: "matrix.build-net-tokio && !matrix.coverage"
85+
- name: Build on Rust ${{ matrix.toolchain }} with net-tokio and tx-sync
86+
if: "matrix.build-net-tokio && !matrix.coverage && matrix.build-tx-sync"
7887
run: cargo build --verbose --color always
79-
- name: Build on Rust ${{ matrix.toolchain }} with net-tokio and full code-linking for coverage generation
88+
- name: Build on Rust ${{ matrix.toolchain }} with net-tokio, tx-sync, and full code-linking for coverage generation
8089
if: matrix.coverage
8190
run: RUSTFLAGS="-C link-dead-code" cargo build --verbose --color always
8291
- name: Build on Rust ${{ matrix.toolchain }}
@@ -108,14 +117,32 @@ jobs:
108117
RUSTFLAGS="-C link-dead-code" cargo build --verbose --color always --features rpc-client
109118
RUSTFLAGS="-C link-dead-code" cargo build --verbose --color always --features rpc-client,rest-client
110119
RUSTFLAGS="-C link-dead-code" cargo build --verbose --color always --features rpc-client,rest-client,tokio
120+
- name: Build Transaction Sync Clients on Rust ${{ matrix.toolchain }} with features
121+
if: "matrix.build-tx-sync && !matrix.coverage"
122+
run: |
123+
cd lightning-transaction-sync
124+
cargo build --verbose --color always --features esplora-blocking
125+
cargo build --verbose --color always --features esplora-async
126+
- name: Build transaction sync clients on Rust ${{ matrix.toolchain }} with features and full code-linking for coverage generation
127+
if: "matrix.build-tx-sync && matrix.coverage"
128+
run: |
129+
cd lightning-transaction-sync
130+
RUSTFLAGS="-C link-dead-code" cargo build --verbose --color always --features esplora-blocking
131+
RUSTFLAGS="-C link-dead-code" cargo build --verbose --color always --features esplora-async
132+
- name: Test transaction sync clients on Rust ${{ matrix.toolchain }} with features
133+
if: "matrix.build-tx-sync && !matrix.coverage"
134+
run: |
135+
cd lightning-transaction-sync
136+
cargo test --verbose --color always --features esplora-blocking
137+
cargo test --verbose --color always --features esplora-async
111138
- name: Test backtrace-debug builds on Rust ${{ matrix.toolchain }}
112139
if: "matrix.toolchain == 'stable'"
113140
run: |
114141
cd lightning && cargo test --verbose --color always --features backtrace
115142
- name: Test on Rust ${{ matrix.toolchain }} with net-tokio
116-
if: "matrix.build-net-tokio && !matrix.coverage"
143+
if: "matrix.build-net-tokio && !matrix.coverage && matrix.build-tx-sync"
117144
run: cargo test --verbose --color always
118-
- name: Test on Rust ${{ matrix.toolchain }} with net-tokio and full code-linking for coverage generation
145+
- name: Test on Rust ${{ matrix.toolchain }} with net-tokio, tx-sync, and full code-linking for coverage generation
119146
if: matrix.coverage
120147
run: RUSTFLAGS="-C link-dead-code" cargo test --verbose --color always
121148
- name: Test no-std builds on Rust ${{ matrix.toolchain }}
@@ -349,7 +376,7 @@ jobs:
349376
linting:
350377
runs-on: ubuntu-latest
351378
env:
352-
TOOLCHAIN: 1.47.0
379+
TOOLCHAIN: stable
353380
steps:
354381
- name: Checkout source code
355382
uses: actions/checkout@v3

0 commit comments

Comments
 (0)