build-cran-binaries/.crow/archive-missed-packages.yaml
pat-s d558e27c11
Some checks failed
ci/crow/cron/process-updates-ubuntu-2204-amd64 Pipeline was successful
ci/crow/cron/process-updates-ubuntu-2204-arm64 Pipeline failed
feat: R-minor-sensitive binary builds (full + iterative) (#84)
## Summary

Builds R-minor-sensitive CRAN packages once per installed R minor version (into per-minor S3 slots `…/contrib/<x.y>/`) and everything else once into the generic slot, driven by bincraft 4.2.0's ABI classifier. Both the full and iterative pipelines are covered.

## What's in here

**Detection / precompute**

- `local/r-minor-helpers.R` — pure `classify_from_metadata()` (NeedsCompilation / risky `LinkingTo`) + `parse_build_args()`, with unit tests.
- `local/packages-to-build.R` — adds a per-package `r_minor_sensitive` flag: cheap CRAN-metadata rules first, source download + `bincraft::needs_per_minor_recompile()` only for the ambiguous compiled subset (fail-safe to sensitive). Classified once per package, applied to all versions.

**Full build**

- `local/build-all.R` — passes the per-row `is_r_minor_sensitive` flag; new `--sensitive-only` mode builds just the risky subset.
- `.crow/build-all-versions-{amd64,arm64}.yaml` — install-deps persists the sensitive subset; build step runs a sensitive-only pass under each non-primary `/opt/R/*` minor; new step uploads the generic index plus a per-minor index for each minor.

**Iterative build**

- All 14 `.crow/process-updates-*.yaml` — primary pass uses `r_minor_detection = 'classifier'`; a sensitive-only multi-R pass builds risky updates under each other minor; per-minor index upload added.

**Tooling / housekeeping**

- Pins bincraft `v4.1.1` → `v4.2.0` across all workflows; removes the superseded standalone `build-r-minor-sensitive-packages.yaml`.
- Adds prek/pre-commit hooks (prettier, markdownlint, editorconfig-checker, yamllint, air) and applies them repo-wide; excludes the verbatim GPL `LICENSE.md` and auxiliary shell scripts.
- Design + implementation docs under `docs/superpowers/`.

## Requires before merge

- A `v4.2.0` git tag must be pushed on the bincraft repo (codefloe.com/rpkgs/bincraft) — the workflow install steps pin `@v4.2.0`. The full-build install-deps clones `main`, so it is unaffected.

Reviewed-on: #84
2026-06-14 08:04:40 +00:00

81 lines
2.2 KiB
YAML

### Required extra vars
# woodpecker-cli pipeline create --var task=archive-missed-packages --branch=main --log-level=info 7
when:
- event: manual
evaluate: 'task == "archive-missed-packages"'
- event: cron
cron: archive-missed-packages
matrix:
include:
- CODENAME: jammy
ARCH: amd64
- CODENAME: jammy
ARCH: arm64
- CODENAME: noble
ARCH: amd64
- CODENAME: noble
ARCH: arm64
- CODENAME: redhat-8
ARCH: amd64
- CODENAME: redhat-8
ARCH: arm64
- CODENAME: redhat-9
ARCH: amd64
- CODENAME: redhat-9
ARCH: arm64
- CODENAME: redhat-10
ARCH: amd64
- CODENAME: redhat-10
ARCH: arm64
- CODENAME: alpine321
ARCH: amd64
- CODENAME: alpine321
ARCH: arm64
- CODENAME: alpine322
ARCH: amd64
- CODENAME: alpine322
ARCH: arm64
- CODENAME: alpine323
ARCH: amd64
- CODENAME: alpine323
ARCH: arm64
steps:
- name: 'Archive missed packages'
image: reg.devxy.io/rpkgs/build-env-alpine:3.24
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
R_VERSION: 4.5.3
commands:
- /opt/R/$R_VERSION/bin/R -q -e 'if (!requireNamespace("bincraft", quietly = TRUE) || packageVersion("bincraft") != "4.2.0") pak::pak("git::https://codefloe.com/rpkgs/bincraft.git@v4.2.0", dependencies = TRUE)'
- /opt/R/$R_VERSION/bin/R -q -e 'packageVersion("bincraft")'
- /opt/R/$R_VERSION/bin/R -q -e 'bincraft::process_unarchived_pkgs(Sys.getenv("CODENAME"), Sys.getenv("ARCH"), workers = 2L)'
backend_options:
kubernetes:
resources:
requests:
memory: 1Gi
cpu: 2000m
limits:
memory: 1200Mi
cpu: 2000m
tolerations:
- key: 'CI'
operator: 'Equal'
value: 'true'
effect: 'NoSchedule'