Skip to content

Commit 1ffae14

Browse files
committed
Merge #172: Introduce ci/pin-msrv.sh script and msrv recipe
c353bb3 feat: introduce `ci/pin-msrv.sh` script and `just msrv` recipe (Luis Schwab) Pull request description: Closes #165. This PR introduces a `ci/pin-msrv.sh` script, `msrv` recipe, and updates CI to use the script for MSRV pinning. ACKs for top commit: oleonardolima: ACK c353bb3 Tree-SHA512: c97671f5d4105f09021af4d43fd24757433e3e895333b944049094531cf3d2da5188fcd10fe55ebe36c98b4be6d8393fdd164bedeeec764f97f30d80d2b3a4df
2 parents 3224994 + c353bb3 commit 1ffae14

File tree

4 files changed

+26
-17
lines changed

4 files changed

+26
-17
lines changed

.github/workflows/cont_integration.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,7 @@ jobs:
4949
run: rustup update
5050
- name: Pin dependencies for MSRV
5151
if: matrix.rust.version == '1.75.0'
52-
run: |
53-
cargo update -p minreq --precise "2.13.2"
54-
cargo update -p idna_adapter --precise "1.2.0"
55-
cargo update -p native-tls --precise "0.2.13"
56-
cargo update -p zerofrom --precise "0.1.5"
57-
cargo update -p litemap --precise "0.7.4"
52+
run: bash ci/pin-msrv.sh
5853
- name: Build
5954
run: cargo build --features ${{ matrix.features }} --no-default-features
6055
- name: Test

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,8 @@ Bitcoin Esplora API client library. Supports plaintext, TLS and Onion servers. B
1616

1717
This library should compile with any combination of features with Rust 1.75.0.
1818

19-
To build with the MSRV you will need to pin dependencies as follows:
19+
To build with the MSRV you will need to pin dependencies:
2020

2121
```shell
22-
cargo update -p minreq --precise "2.13.2"
23-
cargo update -p idna_adapter --precise "1.2.0"
24-
cargo update -p native-tls --precise "0.2.13"
25-
cargo update -p zerofrom --precise "0.1.5"
26-
cargo update -p litemap --precise "0.7.4"
22+
bash ci/pin-msrv.sh
2723
```

ci/pin-msrv.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
set -x
4+
set -euo pipefail
5+
6+
# Pin dependencies for MSRV (1.75.0)
7+
cargo update -p minreq --precise "2.13.2"
8+
cargo update -p idna_adapter --precise "1.2.0"
9+
cargo update -p native-tls --precise "0.2.13"
10+
cargo update -p zerofrom --precise "0.1.5"
11+
cargo update -p litemap --precise "0.7.4"

justfile

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
alias b := build
22
alias c := check
33
alias f := fmt
4-
alias t := test
4+
alias m := msrv
55
alias p := pre-push
6+
alias t := test
67

78
_default:
89
@just --list
@@ -11,7 +12,7 @@ _default:
1112
build:
1213
cargo build
1314

14-
# Check code: formatting, compilation, linting, doc comments, and commit signature
15+
# Check code formatting, compilation, linting, documentation and commit signature
1516
check:
1617
cargo +nightly fmt --all -- --check
1718
cargo check --all-features --all-targets
@@ -25,9 +26,15 @@ check:
2526
fmt:
2627
cargo +nightly fmt
2728

28-
# Run all tests on the workspace with all features
29-
test:
30-
cargo test --all-features -- --test-threads=1
29+
# Build and test using the MSRV toolchain (1.75.0)
30+
msrv:
31+
bash ci/pin-msrv.sh
32+
cargo +1.75.0 build --all-features
33+
cargo +1.75.0 test --all-features -- --test-threads=1
3134

3235
# Run pre-push suite: format, check, and test
3336
pre-push: fmt check test
37+
38+
# Run all tests on the workspace with all features
39+
test:
40+
cargo test --all-features -- --test-threads=1

0 commit comments

Comments
 (0)