diff options
author | Filipe Laíns <lains@archlinux.org> | 2020-05-21 01:38:41 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2020-06-11 02:30:15 +0200 |
commit | e348ba38814c9cc7c1c9892d0451096234dc39ab (patch) | |
tree | 34299ed481521babaf04159d9790ad9f55e8d536 | |
parent | 40bbaead44db8fcdef7087f4b05820bf90dee090 (diff) | |
download | pacman-e348ba38814c9cc7c1c9892d0451096234dc39ab.tar.gz pacman-e348ba38814c9cc7c1c9892d0451096234dc39ab.tar.xz |
ci: cache packages
Results in ~40s saved in each job.
Signed-off-by: Filipe Laíns <lains@archlinux.org>
-rw-r--r-- | .gitlab-ci.yml | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 65b8c729..e889c498 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,12 +1,19 @@ variables: MAKEFLAGS: "-j10" VERBOSE: 1 + PACMAN_OPTS: --needed --noconfirm --cachedir .pkg-cache + +cache: + key: pkgs-v1 + paths: + # For some reason Gitlab CI only supports storing cache/artifacts in a path relative to the build directory + - .pkg-cache .arch-test: image: archlinux/base before_script: - > - pacman -Syu --needed --noconfirm + pacman -Syu $PACMAN_OPTS base-devel git gpgme libarchive curl python @@ -30,14 +37,14 @@ arch-debug: arch-docs: extends: .arch-test script: - - pacman -Syu --needed --noconfirm asciidoc + - pacman -Syu $PACMAN_OPTS asciidoc - meson -Ddoc=enabled build - ninja -C build arch-clang: extends: .arch-test script: - - pacman -Syu --needed --noconfirm clang + - pacman -Syu $PACMAN_OPTS clang - CC=clang meson build - ninja -C build - fakechroot meson test -C build @@ -80,6 +87,7 @@ arch-no-nls: debian: image: debian:bullseye + cache: {} before_script: - apt update - > @@ -95,6 +103,7 @@ debian: fedora: image: fedora + cache: {} before_script: - > dnf -y install |