2022-07-21 22:06:51 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -ex
|
2019-01-24 16:37:55 +00:00
|
|
|
|
2023-03-23 00:52:58 +00:00
|
|
|
CRATES="bitcoin hashes internals fuzz"
|
2022-09-14 11:09:57 +00:00
|
|
|
DEPS="recent minimal"
|
2023-08-09 19:23:00 +00:00
|
|
|
MSRV="1\.48\.0"
|
|
|
|
|
|
|
|
# Test pinned versions.
|
|
|
|
if cargo --version | grep ${MSRV}; then
|
|
|
|
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
|
|
|
|
cargo update -p serde_test --precise 1.0.175
|
|
|
|
|
|
|
|
cargo update -p bitcoin:0.30.1 --precise 0.30.0
|
|
|
|
|
|
|
|
# Build MSRV with pinned versions.
|
|
|
|
cargo check --all-features --all-targets
|
|
|
|
fi
|
2021-06-09 10:34:44 +00:00
|
|
|
|
2022-09-14 11:09:57 +00:00
|
|
|
for dep in $DEPS
|
2019-01-24 16:37:55 +00:00
|
|
|
do
|
2023-08-12 09:07:15 +00:00
|
|
|
cp "Cargo-$dep.lock" Cargo.lock
|
|
|
|
for crate in ${CRATES}
|
|
|
|
do
|
|
|
|
(
|
|
|
|
cd "$crate"
|
|
|
|
./contrib/test.sh
|
|
|
|
)
|
|
|
|
done
|
|
|
|
if [ "$dep" = recent ];
|
|
|
|
then
|
|
|
|
# We always test committed dependencies but we want to warn if they could've been updated
|
|
|
|
cargo update
|
|
|
|
if diff Cargo-recent.lock Cargo.lock;
|
|
|
|
then
|
|
|
|
echo Dependencies are up to date
|
|
|
|
else
|
|
|
|
echo "::warning file=Cargo-recent.lock::Dependencies could be updated"
|
|
|
|
fi
|
|
|
|
fi
|
2022-09-07 23:32:08 +00:00
|
|
|
done
|
2020-09-10 17:55:47 +00:00
|
|
|
|
2022-09-07 23:32:08 +00:00
|
|
|
exit 0
|