Skip to content

Commit 62b35e8

Browse files
committed
CI: Pin dependencies for MSRV
Loads of deps break MSRV at the moment because the Rust ecosystem is upgrading to edition 2021 left, right, and centre without bumping crate versions. Pin various crates in CI for MSRV test run, do it in the CI script instead of in the github action.
1 parent 7bd815f commit 62b35e8

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/workflows/rust.yml

-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ jobs:
2727
profile: minimal
2828
toolchain: ${{ matrix.rust }}
2929
override: true
30-
- run: cargo update -p serde --precise 1.0.152
3130
- name: Running test script
3231
env: ${{ matrix.env }}
3332
run: ./contrib/test.sh

contrib/test.sh

+11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11

22
set -xe
33

4+
MSRV="1\.41"
5+
46
# Just echo all the relevant env vars to help debug Travis.
57
echo "RUSTFMTCHECK: \"$RUSTFMTCHECK\""
68
echo "BITCOINVERSION: \"$BITCOINVERSION\""
@@ -11,6 +13,15 @@ if [ -n "$RUSTFMTCHECK" ]; then
1113
cargo fmt --all -- --check
1214
fi
1315

16+
# Test pinned versions (these are from rust-bitcoin pinning for 1.48).
17+
if cargo --version | grep ${MSRV}; then
18+
cargo update -p log --precise 0.4.18
19+
cargo update -p serde_json --precise 1.0.99
20+
cargo update -p serde --precise 1.0.156
21+
cargo update -p quote --precise 1.0.30
22+
cargo update -p proc-macro2 --precise 1.0.63
23+
fi
24+
1425
# Integration test.
1526
if [ -n "$BITCOINVERSION" ]; then
1627
wget https://bitcoincore.org/bin/bitcoin-core-$BITCOINVERSION/bitcoin-$BITCOINVERSION-x86_64-linux-gnu.tar.gz

0 commit comments

Comments
 (0)