Skip to content

Commit 78bbfbe

Browse files
ValuedMammaloleonardolima
authored andcommitted
ci: add pin-msrv.sh
- add ci/pin-msrv.sh, which pins the dependencies for 1.63.0 MSRV
1 parent f7c9bc5 commit 78bbfbe

File tree

3 files changed

+35
-41
lines changed

3 files changed

+35
-41
lines changed

.github/workflows/cont_integration.yml

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
build-test:
1919
needs: prepare
20-
name: Build and test
20+
name: Build & Test
2121
runs-on: ubuntu-latest
2222
strategy:
2323
matrix:
@@ -40,36 +40,20 @@ jobs:
4040
profile: minimal
4141
- name: Rust Cache
4242
uses: Swatinem/rust-cache@v2.7.5
43-
- name: Pin dependencies for MSRV
43+
- name: Pin dependencies for 1.75
44+
if: matrix.rust.version == '1.75.0'
4445
run: |
45-
if [ "${{matrix.rust.version}}" = '1.63.0' ]; then
46-
cargo update -p zstd-sys --precise "2.0.8+zstd.1.5.5"
47-
cargo update -p time --precise "0.3.20"
48-
cargo update -p home --precise "0.5.5"
49-
cargo update -p proptest --precise "1.2.0"
50-
cargo update -p url --precise "2.5.0"
51-
cargo update -p cc --precise "1.0.105"
52-
cargo update -p tokio --precise "1.38.1"
53-
cargo update -p tokio-util --precise "0.7.11"
54-
cargo update -p indexmap --precise "2.5.0"
55-
cargo update -p security-framework-sys --precise "2.11.1"
56-
cargo update -p csv --precise "1.3.0"
57-
cargo update -p unicode-width --precise "0.1.13"
58-
elif [ "${{matrix.rust.version}}" = '1.75.0' ]; then
59-
cargo update -p home --precise "0.5.9"
60-
fi
61-
- name: Build
46+
cargo update -p home --precise "0.5.9"
47+
- name: Pin dependencies for MSRV
48+
if: matrix.rust.version == '1.63.0'
49+
run: ./ci/pin-msrv.sh
50+
- name: Build + Test
6251
run: |
6352
if [ "${{matrix.rust.version}}" = '1.63.0' ]; then
6453
cargo build --workspace --exclude 'example_*' --exclude 'bdk_electrum' ${{ matrix.features }}
65-
else
66-
cargo build --workspace --exclude 'example_*' ${{ matrix.features }}
67-
fi
68-
- name: Test
69-
run: |
70-
if [ "${{matrix.rust.version}}" = '1.63.0' ]; then
7154
cargo test --workspace --exclude 'example_*' --exclude 'bdk_electrum' ${{ matrix.features }}
7255
else
56+
cargo build --workspace --exclude 'example_*' ${{ matrix.features }}
7357
cargo test --workspace --exclude 'example_*' ${{ matrix.features }}
7458
fi
7559
@@ -151,6 +135,7 @@ jobs:
151135

152136
clippy_check:
153137
needs: prepare
138+
name: Rust clippy
154139
runs-on: ubuntu-latest
155140
permissions:
156141
checks: write

README.md

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -73,22 +73,7 @@ The BDK library maintains a MSRV of 1.63.0. This includes the following crates
7373

7474
The MSRV of `bdk_electrum` is 1.75.0.
7575

76-
To build with the MSRV you will need to pin dependencies as follows:
77-
78-
```shell
79-
cargo update -p zstd-sys --precise "2.0.8+zstd.1.5.5"
80-
cargo update -p time --precise "0.3.20"
81-
cargo update -p home --precise "0.5.5"
82-
cargo update -p proptest --precise "1.2.0"
83-
cargo update -p url --precise "2.5.0"
84-
cargo update -p cc --precise "1.0.105"
85-
cargo update -p tokio --precise "1.38.1"
86-
cargo update -p tokio-util --precise "0.7.11"
87-
cargo update -p indexmap --precise "2.5.0"
88-
cargo update -p security-framework-sys --precise "2.11.1"
89-
cargo update -p csv --precise "1.3.0"
90-
cargo update -p unicode-width --precise "0.1.13"
91-
```
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
9277

9378
## License
9479

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 default 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"

0 commit comments

Comments
 (0)