From 6280ea1b6e548e9dc07e5a43106825509ae80eeb Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sun, 14 Jun 2020 04:46:09 -0700 Subject: [PATCH] Check the whole range of commits in the topic branch (bp #10560) (#10563) automerge --- ci/buildkite.yml | 3 +++ ci/test-checks.sh | 5 ----- ci/test-sanity.sh | 27 +++++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 5 deletions(-) create mode 100755 ci/test-sanity.sh diff --git a/ci/buildkite.yml b/ci/buildkite.yml index 333da2a6c4..a0a5415a4d 100644 --- a/ci/buildkite.yml +++ b/ci/buildkite.yml @@ -5,6 +5,9 @@ # Release tags use buildkite-release.yml instead steps: + - command: "ci/test-sanity.sh" + name: "sanity" + timeout_in_minutes: 5 - command: ". ci/rust-version.sh; ci/docker-run.sh $$rust_nightly_docker_image ci/test-checks.sh" name: "checks" timeout_in_minutes: 20 diff --git a/ci/test-checks.sh b/ci/test-checks.sh index 5b5890985f..8ed5ac1b34 100755 --- a/ci/test-checks.sh +++ b/ci/test-checks.sh @@ -10,9 +10,6 @@ source ci/rust-version.sh nightly export RUST_BACKTRACE=1 export RUSTFLAGS="-D warnings" -# Look for failed mergify.io backports -_ git show HEAD --check --oneline - _ cargo +"$rust_stable" fmt --all -- --check # Clippy gets stuck for unknown reasons if sdk-c is included in the build, so check it separately. @@ -23,10 +20,8 @@ _ cargo +"$rust_stable" clippy --manifest-path sdk-c/Cargo.toml -- --deny=warnin _ cargo +"$rust_stable" audit --version _ cargo +"$rust_stable" audit --ignore RUSTSEC-2020-0002 --ignore RUSTSEC-2020-0008 -_ ci/nits.sh _ ci/order-crates-for-publishing.py _ docs/build.sh -_ ci/check-ssh-keys.sh { cd programs/bpf diff --git a/ci/test-sanity.sh b/ci/test-sanity.sh new file mode 100755 index 0000000000..00ce062eb1 --- /dev/null +++ b/ci/test-sanity.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash +set -e + +cd "$(dirname "$0")/.." + +source ci/_ + +( + echo --- git show --check + set -x + # Look for failed mergify.io backports by searching leftover conflict markers + # Also check for any trailing whitespaces! + if [[ -n $BUILDKITE_PULL_REQUEST_BASE_BRANCH ]]; then + base_branch=$BUILDKITE_PULL_REQUEST_BASE_BRANCH + else + base_branch=$BUILDKITE_BRANCH + fi + git fetch origin "$base_branch" + git show "$(git merge-base HEAD "origin/$base_branch")..HEAD" --check --oneline +) + +echo + +_ ci/nits.sh +_ ci/check-ssh-keys.sh + +echo --- ok