From a82fd890600e60ae4a50a1f0a2ed9ff6ccd2f954 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Fri, 4 Dec 2020 14:55:54 +0100 Subject: [PATCH] ci: Run git gc before creating Git cache tarball Since the job which creates the cache tarball starts from the previous cache, the cache kept accumulating cruft and growing bigger. This cuts the size of the tarball in half (from almost 600M to under 300M), which can translate to significant time savings when downloading it on some runners. v2: * Use git gc --aggressive (Eric Anholt) Reviewed-by: Andres Gomez Reviewed-by: Eric Anholt Part-of: --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index aef531c2a67..655a769e7a5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -479,6 +479,8 @@ make git archive: tags: - packet.net script: + # Compactify the .git directory + - git gc --aggressive # compress the current folder - tar -cvzf ../$CI_PROJECT_NAME.tar.gz .