Skip to content

Commit eb1f222

Browse files
committed
cirrus: add step to validate integrity of vendor
Signed-off-by: Aditya Rajan <[email protected]>
1 parent 81159c1 commit eb1f222

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

.cirrus.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,6 @@ validate_task:
9191
# From this point forward, all cache's become read-only - meaning
9292
# any changes made in this task aren't re-uploaded to the cache.
9393
# This avoids some flapping between tasks, along with the upload time.
94-
pkg_cache: &ro_pkg_cache # TODO: Remove when packages included in static VM images
95-
<<: *pkg_cache
96-
reupload_on_changes: false
9794
cargo_cache: &ro_cargo_cache
9895
<<: *cargo_cache
9996
reupload_on_changes: false
@@ -106,15 +103,20 @@ validate_task:
106103
setup_script: *setup
107104
main_script: *main
108105

106+
verify_vendor_task:
107+
alias: "verify_vendor"
108+
depends_on:
109+
- "build"
110+
cargo_cache: *ro_cargo_cache
111+
targets_cache: *ro_targets_cache
112+
bin_cache: *ro_bin_cache
113+
setup_script: *setup
114+
main_script: *main
109115

110116
unit_task:
111117
alias: "unit"
112118
depends_on:
113119
- "validate"
114-
pkg_cache: *ro_pkg_cache # TODO: Remove when packages included in static VM images
115-
cargo_cache: *ro_cargo_cache
116-
targets_cache: *ro_targets_cache
117-
bin_cache: *ro_bin_cache
118120
setup_script: *setup
119121
main_script: *main
120122

@@ -159,6 +161,7 @@ success_task:
159161
depends_on:
160162
- "build"
161163
- "validate"
164+
- "verify_vendor"
162165
- "unit"
163166
- "integration"
164167
- "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)