Skip to content

Commit adeded1

Browse files
committed
ci: Update cont_integration.yml
Added workspace level MSRV job. Added per-crate jobs to build meaningful feature combinations and test all features. Removed build-test job.
1 parent 47556ab commit adeded1

1 file changed

Lines changed: 225 additions & 46 deletions

File tree

.github/workflows/cont_integration.yml

Lines changed: 225 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -19,63 +19,223 @@ jobs:
1919
id: read_toolchain
2020
run: echo "rust_version=$(cat rust-version)" >> $GITHUB_OUTPUT
2121

22-
build-test:
23-
needs: prepare
24-
name: Build & Test
22+
msrv:
23+
name: MSRV
2524
runs-on: ubuntu-latest
26-
strategy:
27-
matrix:
28-
rust:
29-
- version: ${{ needs.prepare.outputs.rust_version }}
30-
- version: 1.85.0 # MSRV
31-
features:
32-
- --no-default-features --features bdk_chain/hashbrown
33-
- --all-features
3425
steps:
35-
- name: checkout
26+
- name: Checkout
3627
uses: actions/checkout@v6
3728
with:
3829
persist-credentials: false
39-
- name: Install Rust toolchain
40-
uses: actions-rust-lang/setup-rust-toolchain@v1
30+
- uses: actions-rust-lang/setup-rust-toolchain@v1
4131
with:
42-
toolchain: ${{ matrix.rust.version }}
43-
override: true
44-
cache: true
32+
toolchain: 1.85.0 # MSRV
33+
cache: true
4534
- name: Pin dependencies for MSRV
46-
if: matrix.rust.version == '1.85.0'
4735
run: ./ci/pin-msrv.sh
48-
- name: Build + Test
49-
env:
50-
MATRIX_RUST_VERSION: ${{ matrix.rust.version }}
51-
run: |
52-
cargo build --workspace ${{ matrix.features }}
53-
cargo test --workspace ${{ matrix.features }}
36+
- name: Build 1.85.0 (no-default-features)
37+
run: cargo build --workspace --all-targets --no-default-features --features bdk_core/hashbrown
38+
- name: Build 1.85.0 (all features)
39+
run: cargo build --workspace --all-targets --all-features
40+
- name: Test 1.85.0 (all features)
41+
run: cargo test --workspace --lib --tests --all-features
5442

55-
check-no-std:
43+
build-core:
5644
needs: prepare
57-
name: Check no_std
45+
name: bdk_core
5846
runs-on: ubuntu-latest
47+
defaults:
48+
run:
49+
working-directory: ./crates/core
5950
steps:
6051
- name: Checkout
6152
uses: actions/checkout@v6
6253
with:
6354
persist-credentials: false
64-
- name: Install Rust toolchain
65-
uses: actions-rust-lang/setup-rust-toolchain@v1
55+
- uses: actions-rust-lang/setup-rust-toolchain@v1
6656
with:
6757
toolchain: ${{ needs.prepare.outputs.rust_version }}
68-
override: true
6958
cache: true
70-
# target: "thumbv6m-none-eabi"
71-
- name: Check bdk_chain
59+
- name: Build (default features)
60+
run: cargo build
61+
- name: Build (no default features)
62+
run: cargo build --no-default-features
63+
- name: Build (serde)
64+
run: cargo build --no-default-features --features serde
65+
- name: Build (all features)
66+
run: cargo build --all-features
67+
- name: Test (all features)
68+
run: cargo test --all-features
69+
70+
build-chain:
71+
needs: prepare
72+
name: bdk_chain
73+
runs-on: ubuntu-latest
74+
defaults:
75+
run:
7276
working-directory: ./crates/chain
73-
# TODO "--target thumbv6m-none-eabi" should work but currently does not
74-
run: cargo check --no-default-features --features hashbrown
75-
- name: Check esplora
77+
steps:
78+
- name: Checkout
79+
uses: actions/checkout@v6
80+
with:
81+
persist-credentials: false
82+
- uses: actions-rust-lang/setup-rust-toolchain@v1
83+
with:
84+
toolchain: ${{ needs.prepare.outputs.rust_version }}
85+
cache: true
86+
- name: Build (default features)
87+
run: cargo build
88+
- name: Build (no default features)
89+
run: cargo build --no-default-features
90+
- name: Build (serde)
91+
run: cargo build --no-default-features --features serde
92+
- name: Build (miniscript)
93+
run: cargo build --no-default-features --features miniscript
94+
- name: Build (rusqlite)
95+
run: cargo build --features rusqlite
96+
- name: Build (all features)
97+
run: cargo build --all-features
98+
- name: Test (all features)
99+
run: cargo test --all-features
100+
101+
build-bitcoind-rpc:
102+
needs: prepare
103+
name: bdk_bitcoind_rpc
104+
runs-on: ubuntu-latest
105+
defaults:
106+
run:
107+
working-directory: ./crates/bitcoind_rpc
108+
steps:
109+
- name: Checkout
110+
uses: actions/checkout@v6
111+
with:
112+
persist-credentials: false
113+
- uses: actions-rust-lang/setup-rust-toolchain@v1
114+
with:
115+
toolchain: ${{ needs.prepare.outputs.rust_version }}
116+
cache: true
117+
- name: Build (default features)
118+
run: cargo build
119+
- name: Build (no default features)
120+
run: cargo build --no-default-features
121+
- name: Build (serde)
122+
run: cargo build --no-default-features --features serde
123+
- name: Build (all features)
124+
run: cargo build --all-features
125+
- name: Test (all features)
126+
run: cargo test --all-features
127+
128+
build-electrum:
129+
needs: prepare
130+
name: bdk_electrum
131+
runs-on: ubuntu-latest
132+
defaults:
133+
run:
134+
working-directory: ./crates/electrum
135+
steps:
136+
- name: Checkout
137+
uses: actions/checkout@v6
138+
with:
139+
persist-credentials: false
140+
- uses: actions-rust-lang/setup-rust-toolchain@v1
141+
with:
142+
toolchain: ${{ needs.prepare.outputs.rust_version }}
143+
cache: true
144+
- name: Build (default features)
145+
run: cargo build
146+
- name: Build (use-rustls)
147+
run: cargo build --no-default-features --features use-rustls
148+
- name: Build (use-rustls-ring)
149+
run: cargo build --no-default-features --features use-rustls-ring
150+
- name: Build (use-openssl)
151+
run: cargo build --no-default-features --features use-openssl
152+
- name: Test (default features)
153+
run: cargo test
154+
- name: Test (all features)
155+
run: cargo test --all-features
156+
157+
build-esplora:
158+
needs: prepare
159+
name: bdk_esplora
160+
runs-on: ubuntu-latest
161+
defaults:
162+
run:
76163
working-directory: ./crates/esplora
77-
# TODO "--target thumbv6m-none-eabi" should work but currently does not
78-
run: cargo check --no-default-features --features bdk_chain/hashbrown
164+
steps:
165+
- name: Checkout
166+
uses: actions/checkout@v6
167+
with:
168+
persist-credentials: false
169+
- uses: actions-rust-lang/setup-rust-toolchain@v1
170+
with:
171+
toolchain: ${{ needs.prepare.outputs.rust_version }}
172+
cache: true
173+
- name: Build (default features)
174+
run: cargo build
175+
- name: Build (no default features)
176+
run: cargo build --no-default-features
177+
- name: Build (async)
178+
run: cargo build --no-default-features --features std,async
179+
- name: Build (blocking)
180+
run: cargo build --no-default-features --features std,blocking
181+
- name: Build (async-https-native)
182+
run: cargo build --no-default-features --features std,async-https-native
183+
- name: Build (blocking-https-native)
184+
run: cargo build --no-default-features --features std,blocking-https-native
185+
- name: Build (all features)
186+
run: cargo build --all-features
187+
- name: Test (default features)
188+
run: cargo test
189+
- name: Test (all features)
190+
run: cargo test --all-features
191+
192+
build-file-store:
193+
needs: prepare
194+
name: bdk_file_store
195+
runs-on: ubuntu-latest
196+
defaults:
197+
run:
198+
working-directory: ./crates/file_store
199+
steps:
200+
- name: Checkout
201+
uses: actions/checkout@v6
202+
with:
203+
persist-credentials: false
204+
- uses: actions-rust-lang/setup-rust-toolchain@v1
205+
with:
206+
toolchain: ${{ needs.prepare.outputs.rust_version }}
207+
cache: true
208+
- name: Build (default features)
209+
run: cargo build
210+
- name: Test (all features)
211+
run: cargo test --all-features
212+
213+
build-testenv:
214+
needs: prepare
215+
name: bdk_testenv
216+
runs-on: ubuntu-latest
217+
defaults:
218+
run:
219+
working-directory: ./crates/testenv
220+
steps:
221+
- name: Checkout
222+
uses: actions/checkout@v6
223+
with:
224+
persist-credentials: false
225+
- uses: actions-rust-lang/setup-rust-toolchain@v1
226+
with:
227+
toolchain: ${{ needs.prepare.outputs.rust_version }}
228+
cache: true
229+
- name: Build (default features)
230+
run: cargo build
231+
- name: Build (no default features)
232+
run: cargo build --no-default-features
233+
- name: Build (std, no download)
234+
run: cargo build --no-default-features --features std
235+
- name: Build (all features)
236+
run: cargo build --all-features
237+
- name: Test (all features)
238+
run: cargo test --all-features
79239

80240
check-wasm:
81241
needs: prepare
@@ -97,13 +257,34 @@ jobs:
97257
uses: actions-rust-lang/setup-rust-toolchain@v1
98258
with:
99259
toolchain: ${{ needs.prepare.outputs.rust_version }}
100-
override: true
101260
cache: true
102261
target: "wasm32-unknown-unknown"
103262
- name: Check esplora
104263
working-directory: ./crates/esplora
105264
run: cargo check --target wasm32-unknown-unknown --no-default-features --features bdk_core/hashbrown,async
106265

266+
check-no-std:
267+
needs: prepare
268+
name: Check no-std
269+
runs-on: ubuntu-latest
270+
steps:
271+
- name: Checkout
272+
uses: actions/checkout@v6
273+
with:
274+
persist-credentials: false
275+
- uses: actions-rust-lang/setup-rust-toolchain@v1
276+
with:
277+
toolchain: ${{ needs.prepare.outputs.rust_version }}
278+
cache: true
279+
# TODO: `--target thumbv6m-none-eabi` should work but currently does not
280+
# target: thumbv6m-none-eabi
281+
- name: Check bdk_core (no-std, hashbrown)
282+
working-directory: ./crates/core
283+
run: cargo check --no-default-features --features hashbrown
284+
- name: Check bdk_chain (no-std, hashbrown + miniscript)
285+
working-directory: ./crates/chain
286+
run: cargo check --no-default-features --features hashbrown,miniscript
287+
107288
fmt:
108289
name: Rust fmt
109290
runs-on: ubuntu-latest
@@ -116,7 +297,6 @@ jobs:
116297
uses: actions-rust-lang/setup-rust-toolchain@v1
117298
with:
118299
toolchain: nightly
119-
override: true
120300
cache: true
121301
components: rustfmt
122302
- name: Check fmt
@@ -132,13 +312,13 @@ jobs:
132312
- uses: actions/checkout@v6
133313
with:
134314
persist-credentials: false
135-
- uses: actions-rust-lang/setup-rust-toolchain@v1
315+
- name: Install Rust toolchain
316+
uses: actions-rust-lang/setup-rust-toolchain@v1
136317
with:
137-
toolchain: ${{ needs.prepare.outputs.rust_version }}
138-
components: clippy
139-
override: true
140-
cache: true
141-
- name: Clippy
318+
toolchain: ${{ needs.prepare.outputs.rust_version }}
319+
cache: true
320+
components: clippy
321+
- name: Check clippy
142322
run: cargo clippy --all-features --all-targets -- -D warnings
143323

144324
check-docs:
@@ -154,7 +334,6 @@ jobs:
154334
uses: actions-rust-lang/setup-rust-toolchain@v1
155335
with:
156336
toolchain: ${{ needs.prepare.outputs.rust_version }}
157-
override: true
158337
cache: true
159338
- name: Check docs
160-
run: RUSTDOCFLAGS='-D warnings' cargo doc --workspace --no-deps
339+
run: RUSTDOCFLAGS='-D warnings' cargo doc --workspace --all-features --no-deps

0 commit comments

Comments
 (0)