Skip to content

Commit

Permalink
ci: add pin-msrv.sh
Browse files Browse the repository at this point in the history
- add ci/pin-msrv.sh, which pins the dependencies for 1.63.0 MSRV
  • Loading branch information
ValuedMammal authored and oleonardolima committed Jan 21, 2025
1 parent f7c9bc5 commit 78bbfbe
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 41 deletions.
35 changes: 10 additions & 25 deletions .github/workflows/cont_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

build-test:
needs: prepare
name: Build and test
name: Build & Test
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -40,36 +40,20 @@ jobs:
profile: minimal
- name: Rust Cache
uses: Swatinem/[email protected]
- name: Pin dependencies for MSRV
- name: Pin dependencies for 1.75
if: matrix.rust.version == '1.75.0'
run: |
if [ "${{matrix.rust.version}}" = '1.63.0' ]; then
cargo update -p zstd-sys --precise "2.0.8+zstd.1.5.5"
cargo update -p time --precise "0.3.20"
cargo update -p home --precise "0.5.5"
cargo update -p proptest --precise "1.2.0"
cargo update -p url --precise "2.5.0"
cargo update -p cc --precise "1.0.105"
cargo update -p tokio --precise "1.38.1"
cargo update -p tokio-util --precise "0.7.11"
cargo update -p indexmap --precise "2.5.0"
cargo update -p security-framework-sys --precise "2.11.1"
cargo update -p csv --precise "1.3.0"
cargo update -p unicode-width --precise "0.1.13"
elif [ "${{matrix.rust.version}}" = '1.75.0' ]; then
cargo update -p home --precise "0.5.9"
fi
- name: Build
cargo update -p home --precise "0.5.9"
- name: Pin dependencies for MSRV
if: matrix.rust.version == '1.63.0'
run: ./ci/pin-msrv.sh
- name: Build + Test
run: |
if [ "${{matrix.rust.version}}" = '1.63.0' ]; then
cargo build --workspace --exclude 'example_*' --exclude 'bdk_electrum' ${{ matrix.features }}
else
cargo build --workspace --exclude 'example_*' ${{ matrix.features }}
fi
- name: Test
run: |
if [ "${{matrix.rust.version}}" = '1.63.0' ]; then
cargo test --workspace --exclude 'example_*' --exclude 'bdk_electrum' ${{ matrix.features }}
else
cargo build --workspace --exclude 'example_*' ${{ matrix.features }}
cargo test --workspace --exclude 'example_*' ${{ matrix.features }}
fi
Expand Down Expand Up @@ -151,6 +135,7 @@ jobs:

clippy_check:
needs: prepare
name: Rust clippy
runs-on: ubuntu-latest
permissions:
checks: write
Expand Down
17 changes: 1 addition & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,22 +73,7 @@ The BDK library maintains a MSRV of 1.63.0. This includes the following crates

The MSRV of `bdk_electrum` is 1.75.0.

To build with the MSRV you will need to pin dependencies as follows:

```shell
cargo update -p zstd-sys --precise "2.0.8+zstd.1.5.5"
cargo update -p time --precise "0.3.20"
cargo update -p home --precise "0.5.5"
cargo update -p proptest --precise "1.2.0"
cargo update -p url --precise "2.5.0"
cargo update -p cc --precise "1.0.105"
cargo update -p tokio --precise "1.38.1"
cargo update -p tokio-util --precise "0.7.11"
cargo update -p indexmap --precise "2.5.0"
cargo update -p security-framework-sys --precise "2.11.1"
cargo update -p csv --precise "1.3.0"
cargo update -p unicode-width --precise "0.1.13"
```
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

## License

Expand Down
24 changes: 24 additions & 0 deletions ci/pin-msrv.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

set -x
set -euo pipefail

# Pin dependencies for MSRV

# To pin deps, switch toolchain to MSRV and execute the below updates

# cargo clean
# rustup default 1.63.0

cargo update -p zstd-sys --precise "2.0.8+zstd.1.5.5"
cargo update -p time --precise "0.3.20"
cargo update -p home --precise "0.5.5"
cargo update -p proptest --precise "1.2.0"
cargo update -p url --precise "2.5.0"
cargo update -p cc --precise "1.0.105"
cargo update -p tokio --precise "1.38.1"
cargo update -p tokio-util --precise "0.7.11"
cargo update -p indexmap --precise "2.5.0"
cargo update -p security-framework-sys --precise "2.11.1"
cargo update -p csv --precise "1.3.0"
cargo update -p unicode-width --precise "0.1.13"

0 comments on commit 78bbfbe

Please sign in to comment.