Skip to content

Commit 76d73fc

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

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

.cirrus.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,16 @@ build_task:
8686

8787
validate_task:
8888
alias: "validate"
89+
depends_on:
90+
- "build"
91+
cargo_cache: *ro_cargo_cache
92+
targets_cache: *ro_targets_cache
93+
bin_cache: *ro_bin_cache
94+
setup_script: *setup
95+
main_script: *main
96+
97+
verify_vendor_task:
98+
alias: "verify_vendor"
8999
depends_on:
90100
- "build"
91101
# From this point forward, all cache's become read-only - meaning
@@ -106,7 +116,6 @@ validate_task:
106116
setup_script: *setup
107117
main_script: *main
108118

109-
110119
unit_task:
111120
alias: "unit"
112121
depends_on:
@@ -159,6 +168,7 @@ success_task:
159168
depends_on:
160169
- "build"
161170
- "validate"
171+
- "verify_vendor"
162172
- "unit"
163173
- "integration"
164174
- "meta"

contrib/cirrus/runner.sh

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

31+
_run_verify_vendor() {
32+
if git diff --no-ext-diff --quiet --exit-code;
33+
then
34+
echo No tampering with vendor...;
35+
else
36+
return 1;
37+
fi;
38+
}
39+
3140
_run_unit() {
3241
make unit
3342
}

0 commit comments

Comments
 (0)