From ffc8aeccd2afd71150e91ee403e0a23e592e4c9c Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Mon, 16 Oct 2023 09:57:54 +1100 Subject: [PATCH] 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. --- .github/workflows/rust.yml | 1 - contrib/test.sh | 11 +++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 5c41512e..227c6400 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -27,7 +27,6 @@ jobs: profile: minimal toolchain: ${{ matrix.rust }} override: true - - run: cargo update -p serde --precise 1.0.152 - name: Running test script env: ${{ matrix.env }} run: ./contrib/test.sh diff --git a/contrib/test.sh b/contrib/test.sh index 9c0e908f..1230849b 100755 --- a/contrib/test.sh +++ b/contrib/test.sh @@ -1,6 +1,8 @@ set -xe +MSRV="1\.41" + # Just echo all the relevant env vars to help debug Travis. echo "RUSTFMTCHECK: \"$RUSTFMTCHECK\"" echo "BITCOINVERSION: \"$BITCOINVERSION\"" @@ -11,6 +13,15 @@ if [ -n "$RUSTFMTCHECK" ]; then cargo fmt --all -- --check fi +# Test pinned versions (these are from rust-bitcoin pinning for 1.48). +if cargo --version | grep ${MSRV}; then + cargo update -p log --precise 0.4.18 + cargo update -p serde_json --precise 1.0.99 + cargo update -p serde --precise 1.0.156 + cargo update -p quote --precise 1.0.30 + cargo update -p proc-macro2 --precise 1.0.63 +fi + # Integration test. if [ -n "$BITCOINVERSION" ]; then wget https://bitcoincore.org/bin/bitcoin-core-$BITCOINVERSION/bitcoin-$BITCOINVERSION-x86_64-linux-gnu.tar.gz