Skip snap build for PRs if nothing under snap/ is modified
Additionally relegate push snap build to a secondary CI pipeline
This commit is contained in:
parent
5671da4a0a
commit
71af03dc98
|
@ -0,0 +1,4 @@
|
||||||
|
steps:
|
||||||
|
- command: "ci/snap.sh"
|
||||||
|
timeout_in_minutes: 30
|
||||||
|
name: "snap [public]"
|
|
@ -18,14 +18,16 @@ steps:
|
||||||
limit: 2
|
limit: 2
|
||||||
agents:
|
agents:
|
||||||
- "queue=cuda"
|
- "queue=cuda"
|
||||||
- command: "ci/snap.sh [public]"
|
- command: "ci/pr-snap.sh"
|
||||||
timeout_in_minutes: 30
|
timeout_in_minutes: 30
|
||||||
name: "snap [public]"
|
name: "snap [public]"
|
||||||
- wait
|
- wait
|
||||||
- command: "ci/publish-crate.sh [public]"
|
- command: "ci/publish-crate.sh"
|
||||||
timeout_in_minutes: 20
|
timeout_in_minutes: 20
|
||||||
name: "publish crate"
|
name: "publish crate [public]"
|
||||||
- command: "ci/hoover.sh [public]"
|
- command: "ci/hoover.sh"
|
||||||
timeout_in_minutes: 20
|
timeout_in_minutes: 20
|
||||||
name: "clean agent"
|
name: "clean agent [public]"
|
||||||
|
- trigger: "solana-snap"
|
||||||
|
branches: "master"
|
||||||
|
async: true
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash -e
|
||||||
|
#
|
||||||
|
# The standard BUILDKITE_PULL_REQUEST environment variable is always "false" due
|
||||||
|
# to how solana-ci-gate is used to trigger PR builds rather than using the
|
||||||
|
# standard Buildkite PR trigger.
|
||||||
|
#
|
||||||
|
|
||||||
|
[[ $BUILDKITE_BRANCH =~ pull/* ]]
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/bash -e
|
||||||
|
#
|
||||||
|
# Only run snap.sh for pull requests that modify files under /snap
|
||||||
|
#
|
||||||
|
|
||||||
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
|
if ./is-pr.sh; then
|
||||||
|
affected_files="$(buildkite-agent meta-data get affected_files)"
|
||||||
|
echo "Affected files in this PR: $affected_files"
|
||||||
|
if [[ ! ":$affected_files:" =~ :snap/ ]]; then
|
||||||
|
echo "Skipping snap build as no files under /snap were modified"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
exec ./snap.sh
|
||||||
|
else
|
||||||
|
echo "Skipping snap build as this is not a pull request"
|
||||||
|
fi
|
|
@ -3,7 +3,7 @@
|
||||||
cd "$(dirname "$0")/.."
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
DRYRUN=
|
DRYRUN=
|
||||||
if [[ -z $BUILDKITE_BRANCH || $BUILDKITE_BRANCH =~ pull/* ]]; then
|
if [[ -z $BUILDKITE_BRANCH ]] || ./ci/is-pr.sh; then
|
||||||
DRYRUN="echo"
|
DRYRUN="echo"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue