build-cran-binaries/.crow/build-all-versions-arm64.yaml
pat-s 53da568749
All checks were successful
ci/crow/cron/process-updates-ubuntu-2204-amd64 Pipeline was successful
refactor: single source of truth for excluded packages (#79)
## Summary

`local/build-all.R` had a 75-name hardcoded `exclude <- c(...)` vector that had drifted from `local/excluded-packages.json` — `RcmdrPlugin.ROC` was in the R vector but missing from the JSON.

`.crow/weekly-rebuild-missing-*.yaml` already reads the JSON via `jsonlite::fromJSON(...)[["package"]]`. This brings `build-all.R` in line with that pattern.

Changes:

- **`local/excluded-packages.json`**: add the missing `RcmdrPlugin.ROC` entry (reason `"hang"`, matching siblings).
- **`local/build-all.R`**: replace the 16-line hardcoded vector with one `jsonlite::fromJSON(...)` call.
- **`.crow/build-all-versions-install-deps-{amd,arm}64.yaml`**: add `jsonlite` to the install-deps `pak::pak()` list so it's available in `/mnt/cache/R-pkgs` for the build step.
- **`.crow/build-all-versions-arm64.yaml`**: drop the dead base64-encoded `SKIP_PKGS` docs comment that nobody was passing as a `--var` anyway; replace with a one-line pointer to the JSON.

Reviewed-on: #79
2026-06-08 08:30:19 +00: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'