diff --git a/.github/workflows/cont_integration.yml b/.github/workflows/cont_integration.yml index a7ee31c..5dc6e63 100644 --- a/.github/workflows/cont_integration.yml +++ b/.github/workflows/cont_integration.yml @@ -49,12 +49,7 @@ jobs: run: rustup update - name: Pin dependencies for MSRV if: matrix.rust.version == '1.75.0' - run: | - cargo update -p minreq --precise "2.13.2" - cargo update -p idna_adapter --precise "1.2.0" - cargo update -p native-tls --precise "0.2.13" - cargo update -p zerofrom --precise "0.1.5" - cargo update -p litemap --precise "0.7.4" + run: ./ci/pin-msrv.sh - name: Build run: cargo build --features ${{ matrix.features }} --no-default-features - name: Test diff --git a/README.md b/README.md index 61d0acc..66ac255 100644 --- a/README.md +++ b/README.md @@ -16,12 +16,4 @@ Bitcoin Esplora API client library. Supports plaintext, TLS and Onion servers. B This library should compile with any combination of features with Rust 1.75.0. -To build with the MSRV you will need to pin dependencies as follows: - -```shell -cargo update -p minreq --precise "2.13.2" -cargo update -p idna_adapter --precise "1.2.0" -cargo update -p native-tls --precise "0.2.13" -cargo update -p zerofrom --precise "0.1.5" -cargo update -p litemap --precise "0.7.4" -``` +To build with the MSRV of 1.75.0 you may need to pin dependencies by running the [`pin-msrv.sh`](./ci/pin-msrv.sh) script. diff --git a/ci/pin-msrv.sh b/ci/pin-msrv.sh new file mode 100755 index 0000000..378c744 --- /dev/null +++ b/ci/pin-msrv.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env 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 override set 1.75.0 + +cargo update -p minreq --precise "2.13.2" +cargo update -p home --precise "0.5.9" +cargo update -p native-tls --precise "0.2.13" +cargo update -p idna_adapter --precise "1.2.0" +cargo update -p zerofrom --precise "0.1.5" +cargo update -p litemap --precise "0.7.4" diff --git a/justfile b/justfile index eebb3e5..d47acea 100644 --- a/justfile +++ b/justfile @@ -3,6 +3,7 @@ alias c := check alias f := fmt alias t := test alias p := pre-push +alias m := msrv _default: @just --list @@ -31,3 +32,7 @@ test: # Run pre-push suite: format, check, and test pre-push: fmt check test + +# set the rust version to the msrv and pin dependencies +msrv: + ./ci/pin-msrv.sh