From b4fe70d3d816af7115fb09e6a687ca8291f84944 Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Tue, 18 Dec 2018 18:01:34 -0800 Subject: [PATCH] Skip bench of no .rs files are modified in a PR --- ci/test-bench.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ci/test-bench.sh b/ci/test-bench.sh index 79b616e3e..908bc60c0 100755 --- a/ci/test-bench.sh +++ b/ci/test-bench.sh @@ -3,6 +3,22 @@ set -e cd "$(dirname "$0")/.." +annotate() { + ${BUILDKITE:-false} && { + buildkite-agent annotate "$@" + } +} + +ci/affects-files.sh \ + .rs: \ + ci/test-bench.sh: \ +|| { + annotate --style info --context coverage-info \ + "Bench skipped as no .rs files were modified" + exit 0 +} + + source ci/_ source ci/upload-ci-artifact.sh