Skip to content

Commit e9f7369

Browse files
committed
fixup! fixup! CI: Cache packages
1 parent f0ff190 commit e9f7369

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

.github/workflows/build.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,24 +66,25 @@ jobs:
6666
case "${{ matrix.os }}" in
6767
debian:*|ubuntu:*)
6868
PKG_CACHE_DIR="/var/cache/apt"
69-
INSTALL_CMD="apt update && apt install -y"
69+
INSTALL_CMD="apt update && apt -o APT::Clean-Installed=0 install -y"
7070
PACKAGES="git libc6-dev cmake libcurl4-openssl-dev libjansson-dev libsodium-dev pkgconf"
7171
PACKAGES_API="libmicrohttpd-dev"
7272
CLEANUP_CACHE_CMD="rm -rfv ${PKG_CACHE_DIR}/archives/{partial,lock}"
7373
;;
7474
almalinux:*|amazonlinux:*|fedora:*|oraclelinux:*)
7575
PKG_CACHE_DIR="/var/cache/dnf"
76-
INSTALL_CMD="dnf install -y"
77-
[[ "${{ matrix.os }}" =~ ^almalinux: ]] && INSTALL_CMD="dnf install -y dnf-plugins-core && dnf config-manager --set-enabled crb && $INSTALL_CMD"
78-
[[ "${{ matrix.os }}" =~ ^oraclelinux: ]] && INSTALL_CMD="dnf install -y dnf-plugins-core && dnf config-manager --set-enabled ol9_codeready_builder && $INSTALL_CMD"
79-
[[ "${{ matrix.os }}" =~ ^(alma|oracle)linux: ]] && INSTALL_CMD="dnf install -y epel-release && $INSTALL_CMD"
76+
DNF_INSTALL="dnf --setopt=keepcache=True install -y"
77+
INSTALL_CMD="$DNF_INSTALL"
78+
[[ "${{ matrix.os }}" =~ ^almalinux: ]] && INSTALL_CMD="$DNF_INSTALL dnf-plugins-core && dnf config-manager --set-enabled crb && $INSTALL_CMD"
79+
[[ "${{ matrix.os }}" =~ ^oraclelinux: ]] && INSTALL_CMD="$DNF_INSTALL dnf-plugins-core && dnf config-manager --set-enabled ol9_codeready_builder && $INSTALL_CMD"
80+
[[ "${{ matrix.os }}" =~ ^(alma|oracle)linux: ]] && INSTALL_CMD="$DNF_INSTALL epel-release && $INSTALL_CMD"
8081
PACKAGES="git cmake libcurl-devel jansson-devel libsodium-devel pkgconf"
8182
PACKAGES_API="libmicrohttpd-devel"
8283
[[ "${{ matrix.config.cmake_args }}" =~ clang|gcc ]] || PACKAGES="$PACKAGES gcc"
8384
;;
8485
alpine:*)
8586
PKG_CACHE_DIR="/var/cache/apk"
86-
INSTALL_CMD="apk add"
87+
INSTALL_CMD="ln -s /var/cache/apk /etc/apk/cache && apk add"
8788
PACKAGES="git build-base cmake argp-standalone curl-dev jansson-dev libsodium-dev"
8889
PACKAGES_API="libmicrohttpd-dev"
8990
;;

0 commit comments

Comments
 (0)