From 200a8af7a786c4d07a09c81fd1223cb351bf5337 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Thu, 16 Apr 2020 15:18:45 +0100 Subject: [PATCH] ci: cache packages in arch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filipe LaĆ­ns --- .circleci/config.yml | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c56f0f84..d953d8ea 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -119,9 +119,27 @@ fedora_settings: &fedora_settings environment: *build_dependencies +arch_prep_cache: &arch_prep_cache + <<: *default_settings + steps: + - run: + name: Initializing Arch Linux pacman cache + command: pacman -Syu --noconfirm --noprogressbar --needed --downloadonly base-devel git tree ${ARCH_DEP_BUILD} ${ARCH_DEP_TEST} + - persist_to_workspace: + root: /var/cache/ + paths: + - pacman/pkg/* + environment: + *build_dependencies + +arch_fetch_cache: &arch_fetch_cache + attach_workspace: + at: /var/cache/ + arch_settings: &arch_settings <<: *default_settings steps: + - *arch_fetch_cache - run: name: Prepare environment command: mkdir -p /etc/dbus-1/system.d @@ -230,6 +248,10 @@ jobs: <<: *fedora_settings docker: - image: fedora:31 + arch_cache: + <<: *arch_prep_cache + docker: + - image: archlinux arch: <<: *arch_settings docker: @@ -253,8 +275,11 @@ workflows: compile_and_test: jobs: - fedora_cache + - arch_cache - ubuntu_19_10 - - arch + - arch: + requires: + - arch_cache - fedora_31: requires: - fedora_cache