To avoid lots of copy and paste lets deal with artefacts in a
template. This way we can filter out most of the pre-binary object and
library files we no longer need as we have the final binaries.
build-system-alpine also saved .git-submodule-status so for simplicity
we bring that into the template as well.
As an example the build-system-ubuntu artefacts before this patch
where around 1.3 GB, after dropping the object files it comes to 970
MB.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
.gitlab-ci.d/buildtest-template.yml | 16 ++++++
.gitlab-ci.d/buildtest.yml | 81 +++++++++++------------------
2 files changed, 46 insertions(+), 51 deletions(-)
diff --git a/.gitlab-ci.d/buildtest-template.yml
b/.gitlab-ci.d/buildtest-template.yml
index cb96b55c3f..a6cfe9be97 100644
--- a/.gitlab-ci.d/buildtest-template.yml
+++ b/.gitlab-ci.d/buildtest-template.yml
@@ -25,6 +25,22 @@
make -j"$JOBS" $MAKE_CHECK_ARGS ;
fi
+# We jump some hoops in common_test_job_template to avoid
+# rebuilding all the object files we skip in the artifacts
+.native_build_artifact_template:
+ artifacts:
+ expire_in: 2 days
+ paths:
+ - build
+ - .git-submodule-status
+ exclude:
+ - build/**/*.p
+ - build/**/*.a.p
+ - build/**/*.fa.p
+ - build/**/*.c.o
+ - build/**/*.c.o.d
+ - build/**/*.fa