From: Jan Vesely Date: Wed, 29 Apr 2020 05:08:15 +0000 (-0400) Subject: gitlab-ci: Manage pacman cache X-Git-Tag: archive/raspbian/1%0.1.106-3+rpi1^2~15^2~9^2~19 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7cfad8dbc895889cf72e1fc3e742c199247555ae;p=babl.git gitlab-ci: Manage pacman cache Drop unused packages from download cache. Signed-off-by: Jan Vesely --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 31fbf88..6da021f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,12 +5,14 @@ cache: .build: stage: build image: archlinux/base:latest + variables: + PACMAN_CACHE: $CI_PROJECT_DIR/_pacman_cache artifacts: when: always paths: - _build/meson-logs before_script: - - pacman -Syu --noconfirm --needed --cachedir `pwd`/_pacman_cache + - pacman -Syu --noconfirm --needed --cachedir $PACMAN_CACHE base-devel git gobject-introspection @@ -28,6 +30,10 @@ cache: ${EXTRA_OPTIONS} - ninja -C _build - ninja -C _build test + after_script: + # Remove all cached packages but the latest version + - pacman -S --noconfirm --cachedir $PACMAN_CACHE pacman-contrib + - paccache -r -k1 --cachedir $PACMAN_CACHE latest-lcms: extends: .build