fix(ci): clear stale pkgcache metadata at start of build-all runs

This commit is contained in:
Patrick Schratz 2026-07-03 09:26:13 +02:00
commit c338ce2f10
Signed by: pat-s
GPG key ID: 3C6318841EF78925

View file

@ -4,19 +4,19 @@
# they are merged with build-all-versions' identical declarations.
variables:
target_arch:
description: "Architecture to build."
description: 'Architecture to build.'
options:
- amd64
- arm64
default: amd64
OS:
description: "Base OS image name (e.g. alpine, redhat, ubuntu)."
description: 'Base OS image name (e.g. alpine, redhat, ubuntu).'
default: alpine
OS_VERSION:
description: "OS version / image tag (e.g. 3.24, 9, jammy, noble)."
default: "3.24"
description: 'OS version / image tag (e.g. 3.24, 9, jammy, noble).'
default: '3.24'
R_VERSION:
description: "Primary R version under /opt/R."
description: 'Primary R version under /opt/R.'
options:
- 4.5.3
- 4.4.3
@ -60,6 +60,10 @@ steps:
commands:
# one-time full wipe to fix corrupted .so files from previous failed builds
# - rm -rf /mnt/cache/R-pkgs
# Clear churny pkgcache metadata left by a prior crashed run (the "patched"
# repo mints a new hash per PACKAGES change -> unbounded pkgs-*.rds/patched-*).
# Keep pkg/ downloads and the stable CRAN/BioC/INLA repo dirs.
- rm -rf /mnt/cache/pkgcache/R/pkgcache/_metadata/patched-* /mnt/cache/pkgcache/R/pkgcache/_metadata/pkgs-*.rds || true
- mkdir -p /mnt/cache/pkgcache /mnt/cache/R-pkgs /mnt/cache/ccache /mnt/cache/packages
- git clone -q https://pat-s:$$REPO_RO_TOKEN@git.devxy.io/devxy/build-cran-binaries.git .
- git clone -q https://codefloe.com/rpkgs/bincraft.git /tmp/bincraft