Only force up-to-date lock files on edge

This commit is contained in:
Michael Vines
2020-06-18 10:04:37 -07:00
committed by mergify[bot]
parent 89e0584250
commit a25ea8e774
4 changed files with 20 additions and 14 deletions

View File

@ -7,6 +7,7 @@ cd "$(dirname "$0")/.."
source ci/_
source ci/rust-version.sh stable
source ci/rust-version.sh nightly
eval "$(ci/channel-info.sh)"
echo --- build environment
(
@ -28,15 +29,21 @@ echo --- build environment
export RUST_BACKTRACE=1
export RUSTFLAGS="-D warnings"
# Exclude --benches as it's not available in rust stable yet
if _ scripts/cargo-for-all-lock-files.sh +"$rust_stable" check --locked --tests --bins --examples; then
true
# Only force up-to-date lock files on edge
if [[ $CI_BASE_BRANCH = "$EDGE_CHANNEL" ]]; then
# Exclude --benches as it's not available in rust stable yet
if _ scripts/cargo-for-all-lock-files.sh +"$rust_stable" check --locked --tests --bins --examples; then
true
else
check_status=$?
echo "Some Cargo.lock might be outdated; update them (or just be a compilation error?)"
echo "protip: you can use ./scripts/cargo-for-all-lock-files.sh [check|update] ..."
exit "$check_status"
fi
else
check_status=$?
echo "Some Cargo.lock might be outdated; update them (or just be a compilation error?)"
echo "protip: you can use ./scripts/cargo-for-all-lock-files.sh [check|update] ..."
exit "$check_status"
echo "Note: cargo-for-all-lock-files.sh skipped because $CI_BASE_BRANCH != $EDGE_CHANNEL"
fi
# Ensure nightly and --benches
_ scripts/cargo-for-all-lock-files.sh +"$rust_nightly" check --locked --all-targets