Skip to content

Commit bd34d2b

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 bd34d2b

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.github/workflows/rust.yml

Lines changed: 0 additions & 1 deletion
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

Lines changed: 10 additions & 0 deletions
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,14 @@ 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 serde_json --precise 1.0.99
19+
cargo update -p serde --precise 1.0.156
20+
cargo update -p quote --precise 1.0.30
21+
cargo update -p proc-macro2 --precise 1.0.63
22+
fi
23+
1424
# Integration test.
1525
if [ -n "$BITCOINVERSION" ]; then
1626
wget https://bitcoincore.org/bin/bitcoin-core-$BITCOINVERSION/bitcoin-$BITCOINVERSION-x86_64-linux-gnu.tar.gz

0 commit comments

Comments
 (0)