Only force up-to-date lock files on edge
This commit is contained in:
parent
89e0584250
commit
a25ea8e774
|
@ -73,6 +73,7 @@ ARGS+=(
|
||||||
--env BUILDKITE_JOB_ID
|
--env BUILDKITE_JOB_ID
|
||||||
--env CI
|
--env CI
|
||||||
--env CI_BRANCH
|
--env CI_BRANCH
|
||||||
|
--env CI_BASE_BRANCH
|
||||||
--env CI_TAG
|
--env CI_TAG
|
||||||
--env CI_BUILD_ID
|
--env CI_BUILD_ID
|
||||||
--env CI_COMMIT
|
--env CI_COMMIT
|
||||||
|
|
|
@ -8,6 +8,7 @@ if [[ -n $CI ]]; then
|
||||||
export CI=1
|
export CI=1
|
||||||
if [[ -n $TRAVIS ]]; then
|
if [[ -n $TRAVIS ]]; then
|
||||||
export CI_BRANCH=$TRAVIS_BRANCH
|
export CI_BRANCH=$TRAVIS_BRANCH
|
||||||
|
export CI_BASE_BRANCH=$TRAVIS_BRANCH
|
||||||
export CI_BUILD_ID=$TRAVIS_BUILD_ID
|
export CI_BUILD_ID=$TRAVIS_BUILD_ID
|
||||||
export CI_COMMIT=$TRAVIS_COMMIT
|
export CI_COMMIT=$TRAVIS_COMMIT
|
||||||
export CI_JOB_ID=$TRAVIS_JOB_ID
|
export CI_JOB_ID=$TRAVIS_JOB_ID
|
||||||
|
@ -28,8 +29,10 @@ if [[ -n $CI ]]; then
|
||||||
# to how solana-ci-gate is used to trigger PR builds rather than using the
|
# to how solana-ci-gate is used to trigger PR builds rather than using the
|
||||||
# standard Buildkite PR trigger.
|
# standard Buildkite PR trigger.
|
||||||
if [[ $CI_BRANCH =~ pull/* ]]; then
|
if [[ $CI_BRANCH =~ pull/* ]]; then
|
||||||
|
export CI_BASE_BRANCH=$BUILDKITE_PULL_REQUEST_BASE_BRANCH
|
||||||
export CI_PULL_REQUEST=true
|
export CI_PULL_REQUEST=true
|
||||||
else
|
else
|
||||||
|
export CI_BASE_BRANCH=$BUILDKITE_BRANCH
|
||||||
export CI_PULL_REQUEST=
|
export CI_PULL_REQUEST=
|
||||||
fi
|
fi
|
||||||
export CI_OS_NAME=linux
|
export CI_OS_NAME=linux
|
||||||
|
|
|
@ -7,6 +7,7 @@ cd "$(dirname "$0")/.."
|
||||||
source ci/_
|
source ci/_
|
||||||
source ci/rust-version.sh stable
|
source ci/rust-version.sh stable
|
||||||
source ci/rust-version.sh nightly
|
source ci/rust-version.sh nightly
|
||||||
|
eval "$(ci/channel-info.sh)"
|
||||||
|
|
||||||
echo --- build environment
|
echo --- build environment
|
||||||
(
|
(
|
||||||
|
@ -28,15 +29,21 @@ echo --- build environment
|
||||||
export RUST_BACKTRACE=1
|
export RUST_BACKTRACE=1
|
||||||
export RUSTFLAGS="-D warnings"
|
export RUSTFLAGS="-D warnings"
|
||||||
|
|
||||||
# Exclude --benches as it's not available in rust stable yet
|
# Only force up-to-date lock files on edge
|
||||||
if _ scripts/cargo-for-all-lock-files.sh +"$rust_stable" check --locked --tests --bins --examples; then
|
if [[ $CI_BASE_BRANCH = "$EDGE_CHANNEL" ]]; then
|
||||||
true
|
# 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
|
else
|
||||||
check_status=$?
|
echo "Note: cargo-for-all-lock-files.sh skipped because $CI_BASE_BRANCH != $EDGE_CHANNEL"
|
||||||
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
|
fi
|
||||||
|
|
||||||
# Ensure nightly and --benches
|
# Ensure nightly and --benches
|
||||||
_ scripts/cargo-for-all-lock-files.sh +"$rust_nightly" check --locked --all-targets
|
_ scripts/cargo-for-all-lock-files.sh +"$rust_nightly" check --locked --all-targets
|
||||||
|
|
||||||
|
|
|
@ -10,13 +10,8 @@ source ci/_
|
||||||
set -x
|
set -x
|
||||||
# Look for failed mergify.io backports by searching leftover conflict markers
|
# Look for failed mergify.io backports by searching leftover conflict markers
|
||||||
# Also check for any trailing whitespaces!
|
# Also check for any trailing whitespaces!
|
||||||
if [[ -n $BUILDKITE_PULL_REQUEST_BASE_BRANCH ]]; then
|
git fetch origin "$CI_BASE_BRANCH"
|
||||||
base_branch=$BUILDKITE_PULL_REQUEST_BASE_BRANCH
|
git diff "$(git merge-base HEAD "origin/$CI_BASE_BRANCH")..HEAD" --check --oneline
|
||||||
else
|
|
||||||
base_branch=$BUILDKITE_BRANCH
|
|
||||||
fi
|
|
||||||
git fetch origin "$base_branch"
|
|
||||||
git diff "$(git merge-base HEAD "origin/$base_branch")..HEAD" --check --oneline
|
|
||||||
)
|
)
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
|
Loading…
Reference in New Issue