diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-05-15 09:48:23 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-05-15 11:10:19 +0200 |
commit | 9853283156cdfaa3bb6556d36a3a0c98a6bca244 (patch) | |
tree | 473e7b2627ae625f6c6fcd75a656d0cca31dbbef | |
parent | 293cab52182dc54fb282d221faaab8cc8b48d496 (diff) |
ci: Tar the cache to efficiently handle hard links.
- GitLab uses zip to cache build artifacts. Zip, however, does not
preserve hard links, leading to unnecessary inflation of archive
size and CPU time spent on compression.
- See https://gitlab.com/gitlab-org/gitlab-ce/issues/37444
-rw-r--r-- | .gitlab-ci.yml | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 86af0902..aae72f5d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,6 +2,7 @@ image: registry.gitlab.com/sequoia-pgp/build-docker-image:latest test: script: + - if [ -f cache.tar ]; then du -sh cache.tar ; tar xf cache.tar ; rm cache.tar ; fi - if [ -d target ]; then find target | wc --lines; du -sh target; fi - if [ -d cargo ]; then find cargo | wc --lines; du -sh cargo; fi - rustc --version @@ -11,11 +12,12 @@ test: - cargo clean -p buffered-reader -p sequoia-rfc2822 -p sequoia-openpgp -p sequoia-openpgp-ffi -p sequoia-core -p sequoia-ffi -p sequoia-ffi-macros -p sequoia-ipc -p sequoia-net -p sequoia-store -p sequoia-tool -p sequoia-sqv -p sequoia-guide - du -sh target - du -sh cargo + - tar cf cache.tar target cargo cache: + key: tarred-cache paths: - - target/ - - cargo/ + - cache.tar variables: CARGO_HOME: $CI_PROJECT_DIR/cargo |