Skip to content

Commit 7664574

Browse files
committed
Merge #1803: ci: add secondary MSRV job of 1.75.0
c8b55da chore: fix punctuation and use `rustup override set` instead (Leonardo L.) 78bbfbe ci: add `pin-msrv.sh` (valued mammal) f7c9bc5 docs: update `README.md` with MSRV policy (valued mammal) 12eabd1 chore(cleanup): remove rustls from pinned deps (Leonardo Lima) e3faeb6 ci: add secondary MSRV job of 1.75.0 (Leonardo Lima) Pull request description: partially fixes #1750 <!-- You can erase any parts of this template not applicable to your Pull Request. --> ### Description <!-- Describe the purpose of this PR, what's being adding and/or fixed --> It adds a secondary MSRV version of `1.75.0` for the `bdk_electrum` crate, excluding it from the `1.63.0` MSRV dependency pinning and CI step. As it's the new CI will run without `bdk_electrum` for `1.63.0` MSRV step, will run another step for `1.75.0` MSRV and the latest stable. Currently,, the only affected crate is `electrum-client`, therefore `bdk-electrum`, as it relies directly on `rustls` which migrated to `1.71.0` MSRV. The `esplora-client` relies on `rustls` as a dependency of `minreq` or `reqwest`, but those crates didn't upgraded it's `rustls` versions yet. In a further PR it should also bump the `electrum-client` crate to it's latest version, which relies on `1.75.0` MSRV, see bitcoindevkit/rust-electrum-client#159. ### Notes to the reviewers <!-- In this section you can include notes directed to the reviewers, like explaining why some parts of the PR were done in a specific way --> It's open for discussion if this approach is the expected one, or another one would be better. ### Changelog notice <!-- Notice the release manager should include in the release tag message changelog --> <!-- See https://keepachangelog.com/en/1.0.0/ for examples --> - Add a secondary MSRV of `1.75.0` for `bdk_electrum`. ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) * [x] I ran `cargo fmt` and `cargo clippy` before committing #### New Features: * [ ] I've added tests for the new feature * [ ] I've added docs for the new feature #### Bugfixes: * [ ] This pull request breaks the existing API * [ ] I've added tests to reproduce the issue which are now passing * [ ] I'm linking the issue being fixed by this PR ACKs for top commit: notmandatory: ACK c8b55da Tree-SHA512: 186d82d6d295c688a608e1dd457e2718e0ae3ee92b7d1a0aad094711c3baeb70dccd581e3067e6305c1fc702c78f1704399f7472a5ae62824041ac68c384b770
2 parents 639f3d0 + c8b55da commit 7664574

File tree

4 files changed

+61
-39
lines changed

4 files changed

+61
-39
lines changed

.github/workflows/cont_integration.yml

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,18 @@ jobs:
1414
- name: "Read rust version"
1515
id: read_toolchain
1616
run: echo "rust_version=$(cat rust-version)" >> $GITHUB_OUTPUT
17-
17+
1818
build-test:
1919
needs: prepare
20-
name: Build and test
20+
name: Build & Test
2121
runs-on: ubuntu-latest
2222
strategy:
2323
matrix:
2424
rust:
2525
- version: ${{ needs.prepare.outputs.rust_version }}
2626
clippy: true
27-
- version: 1.63.0 # MSRV
27+
- version: 1.63.0 # Overall MSRV
28+
- version: 1.75.0 # Specific MSRV for `bdk_electrum`
2829
features:
2930
- --no-default-features --features miniscript/no-std
3031
- --all-features
@@ -39,26 +40,22 @@ jobs:
3940
profile: minimal
4041
- name: Rust Cache
4142
uses: Swatinem/rust-cache@v2.7.5
43+
- name: Pin dependencies for 1.75
44+
if: matrix.rust.version == '1.75.0'
45+
run: |
46+
cargo update -p home --precise "0.5.9"
4247
- name: Pin dependencies for MSRV
4348
if: matrix.rust.version == '1.63.0'
49+
run: ./ci/pin-msrv.sh
50+
- name: Build + Test
4451
run: |
45-
cargo update -p zstd-sys --precise "2.0.8+zstd.1.5.5"
46-
cargo update -p time --precise "0.3.20"
47-
cargo update -p home --precise "0.5.5"
48-
cargo update -p proptest --precise "1.2.0"
49-
cargo update -p url --precise "2.5.0"
50-
cargo update -p cc --precise "1.0.105"
51-
cargo update -p tokio --precise "1.38.1"
52-
cargo update -p tokio-util --precise "0.7.11"
53-
cargo update -p indexmap --precise "2.5.0"
54-
cargo update -p security-framework-sys --precise "2.11.1"
55-
cargo update -p csv --precise "1.3.0"
56-
cargo update -p unicode-width --precise "0.1.13"
57-
cargo update -p rustls@0.23.21 --precise "0.23.19"
58-
- name: Build
59-
run: cargo build --workspace --exclude 'example_*' ${{ matrix.features }}
60-
- name: Test
61-
run: cargo test --workspace --exclude 'example_*' ${{ matrix.features }}
52+
if [ "${{matrix.rust.version}}" = '1.63.0' ]; then
53+
cargo build --workspace --exclude 'example_*' --exclude 'bdk_electrum' ${{ matrix.features }}
54+
cargo test --workspace --exclude 'example_*' --exclude 'bdk_electrum' ${{ matrix.features }}
55+
else
56+
cargo build --workspace --exclude 'example_*' ${{ matrix.features }}
57+
cargo test --workspace --exclude 'example_*' ${{ matrix.features }}
58+
fi
6259
6360
check-no-std:
6461
needs: prepare
@@ -138,6 +135,7 @@ jobs:
138135

139136
clippy_check:
140137
needs: prepare
138+
name: Rust clippy
141139
runs-on: ubuntu-latest
142140
permissions:
143141
checks: write

README.md

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -63,25 +63,17 @@ Fully working examples of how to use these components are in `/example-crates`:
6363
[`bdk_chain`]: https://docs.rs/bdk-chain/
6464

6565
## Minimum Supported Rust Version (MSRV)
66-
This library should compile with any combination of features with Rust 1.63.0.
67-
68-
To build with the MSRV you will need to pin dependencies as follows:
69-
70-
```shell
71-
cargo update -p zstd-sys --precise "2.0.8+zstd.1.5.5"
72-
cargo update -p time --precise "0.3.20"
73-
cargo update -p home --precise "0.5.5"
74-
cargo update -p proptest --precise "1.2.0"
75-
cargo update -p url --precise "2.5.0"
76-
cargo update -p cc --precise "1.0.105"
77-
cargo update -p tokio --precise "1.38.1"
78-
cargo update -p tokio-util --precise "0.7.11"
79-
cargo update -p indexmap --precise "2.5.0"
80-
cargo update -p security-framework-sys --precise "2.11.1"
81-
cargo update -p csv --precise "1.3.0"
82-
cargo update -p unicode-width --precise "0.1.13"
83-
cargo update -p rustls@0.23.21 --precise "0.23.19"
84-
```
66+
The BDK library maintains a MSRV of 1.63.0. This includes the following crates:
67+
68+
- `bdk_core`
69+
- `bdk_chain`
70+
- `bdk_bitcoind_rpc`.
71+
- `bdk_esplora`.
72+
- `bdk_wallet`.
73+
74+
The MSRV of `bdk_electrum` is 1.75.0.
75+
76+
To build with the MSRV of 1.63.0 you will need to pin dependencies by running the [`pin-msrv.sh`](./ci/pin-msrv.sh) script.
8577

8678
## License
8779

ci/pin-msrv.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
3+
set -x
4+
set -euo pipefail
5+
6+
# Pin dependencies for MSRV
7+
8+
# To pin deps, switch toolchain to MSRV and execute the below updates
9+
10+
# cargo clean
11+
# rustup override set 1.63.0
12+
13+
cargo update -p zstd-sys --precise "2.0.8+zstd.1.5.5"
14+
cargo update -p time --precise "0.3.20"
15+
cargo update -p home --precise "0.5.5"
16+
cargo update -p proptest --precise "1.2.0"
17+
cargo update -p url --precise "2.5.0"
18+
cargo update -p cc --precise "1.0.105"
19+
cargo update -p tokio --precise "1.38.1"
20+
cargo update -p tokio-util --precise "0.7.11"
21+
cargo update -p indexmap --precise "2.5.0"
22+
cargo update -p security-framework-sys --precise "2.11.1"
23+
cargo update -p csv --precise "1.3.0"
24+
cargo update -p unicode-width --precise "0.1.13"

crates/electrum/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,13 @@
33
BDK Electrum extends [`electrum-client`] to update [`bdk_chain`] structures
44
from an Electrum server.
55

6+
## Minimum Supported Rust Version (MSRV)
7+
This crate has a MSRV of 1.75.0.
8+
9+
To build with MSRV you will need to pin dependencies as follows:
10+
```shell
11+
cargo update -p home --precise "0.5.9"
12+
```
13+
614
[`electrum-client`]: https://docs.rs/electrum-client/
715
[`bdk_chain`]: https://docs.rs/bdk-chain/

0 commit comments

Comments
 (0)