Skip to content

Commit 31b6566

Browse files
committed
cirrus: add step to validate integrity of vendor
Signed-off-by: Aditya Rajan <[email protected]>
1 parent 2de4144 commit 31b6566

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

.cirrus.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,15 @@ validate_task:
9393
setup_script: *setup
9494
main_script: *main
9595

96+
verify_vendor_task:
97+
alias: "verify_vendor"
98+
depends_on:
99+
- "build"
100+
cargo_cache: *ro_cargo_cache
101+
targets_cache: *ro_targets_cache
102+
bin_cache: *ro_bin_cache
103+
setup_script: *setup
104+
main_script: *main
96105

97106
unit_task:
98107
alias: "unit"
@@ -144,6 +153,7 @@ success_task:
144153
depends_on:
145154
- "build"
146155
- "validate"
156+
- "verify_vendor"
147157
- "unit"
148158
- "integration"
149159
- "meta"

contrib/cirrus/runner.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ _run_validate() {
2828
make validate
2929
}
3030

31+
_run_verify_vendor() {
32+
# N/B: current repo. dir. contents produced by _run_build() above.
33+
if ! git diff --no-ext-diff --quiet --exit-code; then
34+
die "Found uncommited and necessary changes to vendoring, please fix, commit, and re-submit."
35+
fi
36+
}
37+
3138
_run_unit() {
3239
make unit
3340
}

0 commit comments

Comments
 (0)