build-cran-binaries/.crow/build-all-versions-arm64.yaml
pat-s 98a661faef
refactor: single source of truth for excluded packages
local/build-all.R had a 75-name hardcoded vector that drifted from
local/excluded-packages.json (RcmdrPlugin.ROC was in the R vector
but missing from the JSON). weekly-rebuild-missing-* already reads
the JSON, so this aligns build-all.R with that pattern.

- Add the missing RcmdrPlugin.ROC entry to excluded-packages.json
- Replace the hardcoded vector in build-all.R with
  jsonlite::fromJSON("local/excluded-packages.json")[["package"]]
- Pull jsonlite into the install-deps step so it's available in
  /mnt/cache/R-pkgs for the build step
- Drop the dead base64 SKIP_PKGS docs comment from
  build-all-versions-arm64.yaml; point to the JSON instead
2026-05-28 15:51:00 +02:00

112 lines
3.7 KiB
YAML

### Required extra vars
# ARCH (amd64)
# OS (alpine)
# OS_VERSION (3.22)
# R_VERSION (4.5.3)
# Skip list lives in local/excluded-packages.json (read by local/build-all.R).
# crow pipeline create --var ARCH=arm64 --var OS=alpine --var OS_VERSION=3.22 --var R_VERSION=4.5 --var task=build-all-arm64 --var K8S_INSTANCE_TYPE=cax41 --branch=main --log-level=info 7
# crow pipeline create --var ARCH=arm64 --var OS=alpine --var OS_VERSION=3.23 --var R_VERSION=4.5 --var task=build-all-arm64 --var K8S_INSTANCE_TYPE=cax41 --branch=main --log-level=info 5
# crow pipeline create --var ARCH=arm64 --var OS=redhat --var OS_VERSION=10 --var R_VERSION=4.5.3 --var task=build-all-arm64 --branch=main --log-level=info 5
when:
- event: manual
evaluate: 'task == "build-all-arm64"'
skip_clone: true
labels:
agent: gaia
matrix:
include:
# - SPLIT_INTO: 5
# SPLIT_INDEX: 1
# BACKEND: kubernetes
# - SPLIT_INTO: 5
# SPLIT_INDEX: 2
# BACKEND: kubernetes
# - SPLIT_INTO: 5
# SPLIT_INDEX: 3
# BACKEND: kubernetes
# - SPLIT_INTO: 5
# SPLIT_INDEX: 4
# BACKEND: kubernetes
# - SPLIT_INTO: 5
# SPLIT_INDEX: 5
# BACKEND: kubernetes
- SPLIT_INTO: 4
SPLIT_INDEX: 1
BACKEND: docker
- SPLIT_INTO: 4
SPLIT_INDEX: 2
BACKEND: docker
- SPLIT_INTO: 4
SPLIT_INDEX: 3
BACKEND: docker
- SPLIT_INTO: 4
SPLIT_INDEX: 4
BACKEND: docker
# - SPLIT_INTO: 5
# SPLIT_INDEX: 5
# BACKEND: docker
depends_on:
- build-all-versions-install-deps-arm64
steps:
- name: 'Build binaries'
image: "reg.devxy.io/rpkgs/build-env-${OS}:${OS_VERSION}"
pull: true
environment:
RED_HAT_DEV_PW:
from_secret: RED_HAT_DEV_PW
B2_S3_ACCESS_KEY:
from_secret: B2_S3_ACCESS_KEY
B2_S3_SECRET_KEY:
from_secret: B2_S3_SECRET_KEY
PGPASS:
from_secret: PGPASS
REPO_RO_TOKEN:
from_secret: REPO_RO_TOKEN
GITHUB_PAT:
from_secret: GITHUB_PAT
# normal env vars
GIT_USER: pat-s
# set the location of the 'pkgcache' cache dir which persists the R package dependencies needed to install the packages themselves
R_PKG_CACHE_DIR: /mnt/cache/pkgcache
R_LIBS_USER: /mnt/cache/R-pkgs
CCACHE_DIR: /mnt/cache/ccache
NCPUS: 2
volumes:
- ${ARCH}-binaries-r-dep-cache-${OS}-${OS_VERSION//./}:/mnt/cache
commands:
- git clone -q https://pat-s:$$REPO_RO_TOKEN@git.devxy.io/devxy/build-cran-binaries.git .
- mkdir -p /mnt/cache/pkgcache /mnt/cache/R-pkgs /mnt/cache/ccache /mnt/cache/packages
- XVFB=$(command -v xwfb-run 2>/dev/null || command -v xvfb-run); XVFB_ARGS=""; if command -v xwfb-run >/dev/null 2>&1; then dnf install -y -q weston 2>/dev/null; XVFB_ARGS="-c weston"; fi
- $XVFB $XVFB_ARGS -n $SPLIT_INDEX -- /opt/R/$R_VERSION/bin/Rscript local/build-all.R $SPLIT_INTO $SPLIT_INDEX $NCPUS 2>&1
# archive missed packages
- /opt/R/$R_VERSION/bin/R -q -e "bincraft::process_unarchived_pkgs(paste(Sys.getenv('OS'), Sys.getenv('OS_VERSION')), Sys.getenv('ARCH'), workers = $NCPUS)"
backend_options:
docker:
resources:
requests:
memory: 5Gi
cpu: 1000m
limits:
memory: 20Gi
cpu: 2000m
kubernetes:
resources:
requests:
memory: 5Gi
cpu: 1000m
limits:
memory: 20Gi
cpu: 2000m
nodeSelector:
kubernetes.io/arch: ${ARCH}
node.kubernetes.io/instance-type: ${K8S_INSTANCE_TYPE}
tolerations:
- key: 'CI'
operator: 'Equal'
value: 'true'
effect: 'NoSchedule'