ci: build last four minor R versions instead of only the latest #6

Merged
pat-s merged 1 commit from t3code/2a207854 into main 2026-06-12 17:16:44 +00:00
Owner

Summary

The crow build pipeline previously built only the single latest stable R version (from the brew formula).
It now builds the latest patch release of each of the last four minor R versions and uploads any that are missing from S3, so older supported minors stay available rather than only the newest stable.

  • Get R versions to build: derive the four versions from posit's versions.json (the same source upstream's test/get_r_versions.py uses) via jq — keep only x.y.z releases, take the latest patch per minor, then the top four minors (e.g. 4.6.0, 4.5.3, 4.4.3, 4.3.3).
  • Check which R versions already exist in s3: iterate the four versions against the S3 listing for the platform/arch.
  • Build: build only the versions that are missing. In steady state nothing builds; when a new minor lands, only that one is built.

awk fix

The existence check used an awk regex ($0 ~ ver), so the unescaped dots in a version made 4.4.3 spuriously match 4.3.3 (the substring 4/4.3 satisfies the pattern).
Harmless with a single version, but across four adjacent versions it would wrongly skip builds.
Switched to literal substring matching via awk index($0, ver).

## Summary The crow build pipeline previously built only the single latest stable R version (from the brew formula). It now builds the latest patch release of each of the **last four minor R versions** and uploads any that are missing from S3, so older supported minors stay available rather than only the newest stable. - **Get R versions to build**: derive the four versions from posit's `versions.json` (the same source upstream's `test/get_r_versions.py` uses) via jq — keep only `x.y.z` releases, take the latest patch per minor, then the top four minors (e.g. `4.6.0, 4.5.3, 4.4.3, 4.3.3`). - **Check which R versions already exist in s3**: iterate the four versions against the S3 listing for the platform/arch. - **Build**: build only the versions that are missing. In steady state nothing builds; when a new minor lands, only that one is built. ## awk fix The existence check used an awk regex (`$0 ~ ver`), so the unescaped dots in a version made `4.4.3` spuriously match `4.3.3` (the substring `4/4.3` satisfies the pattern). Harmless with a single version, but across four adjacent versions it would wrongly skip builds. Switched to literal substring matching via awk `index($0, ver)`.
Derive the latest patch release of each of the last four minor R versions
from posit's versions.json and build any that are missing from S3,
so older supported minors stay available rather than only the newest stable.

Replace the awk regex existence check with a literal index() match;
the unescaped version dots made e.g. 4.4.3 spuriously match 4.3.3.
pat-s merged commit 56c75e2df0 into main 2026-06-12 17:16:44 +00:00
pat-s deleted branch t3code/2a207854 2026-06-12 17:16:44 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
devxy/r-builds!6
No description provided.