summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorEd Santiago <santiago@redhat.com>2022-03-22 12:15:29 -0600
committerEd Santiago <santiago@redhat.com>2022-03-22 13:17:10 -0600
commit88d4db009eea8ab49788ecc6625e7117f0c96165 (patch)
tree70625a59ad4f4d7c833dfd3b892548c0db2bcf43 /contrib
parentc840f64e419813f389d88e16294ce916aaf31957 (diff)
downloadpodman-88d4db009eea8ab49788ecc6625e7117f0c96165.tar.gz
podman-88d4db009eea8ab49788ecc6625e7117f0c96165.tar.bz2
podman-88d4db009eea8ab49788ecc6625e7117f0c96165.zip
Binary growth check, part 2 of 2
Add a CI check to prevent unwanted bloat in binary images, by building a baseline (pre-PR) binary then comparing file sizes post-PR. Part 1 (#13518) added a new script that runs multiple 'make's, comparing image sizes against an original, and failing loudly if growth is too big. An override mechanism is defined. This is part 2 of 2: adding the CI rule. We couldn't do that in part 1, because the rule would call a script that didn't exist in the pre-PR commit. Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/cirrus/runner.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/contrib/cirrus/runner.sh b/contrib/cirrus/runner.sh
index 1bff07203..f33c6af29 100755
--- a/contrib/cirrus/runner.sh
+++ b/contrib/cirrus/runner.sh
@@ -228,7 +228,17 @@ function _run_altbuild() {
case "$ALT_NAME" in
*Each*)
git fetch origin
- make build-all-new-commits GIT_BASE_BRANCH=origin/$DEST_BRANCH
+ # The check-size script, introduced 2022-03-22 in #13518,
+ # runs 'make' (the original purpose of this check) against
+ # each commit, then checks image sizes to make sure that
+ # none have grown beyond a given limit. That of course
+ # requires a baseline, which is why we use '^' to start
+ # with the *parent* commit of this PR, not the first commit.
+ context_dir=$(mktemp -d --tmpdir make-size-check.XXXXXXX)
+ make build-all-new-commits \
+ GIT_BASE_BRANCH=origin/"${DEST_BRANCH}^" \
+ MAKE="hack/make-and-check-size $context_dir"
+ rm -rf $context_dir
;;
*Windows*)
make podman-remote-release-windows_amd64.zip