ci: switch workflows to r-ci/r2u for fast binary installs - #633
Merged
Conversation
Unify the CI toolchain on r2u (apt-binary package installs) for speed and consistency, eliminating the hardcoded distro endpoints that caused a recent ~68-minute stall in the revdep workflow. - R-CMD-check.yaml: replace r-lib/actions/* with eddelbuettel/github-actions/r-ci. R-release runs on r2u; R-devel coverage is retained via the rocker/drd container (built FROM rocker/r2u, so devel installs also use binaries). - revdep.yaml: surgical toolchain swap only. Add r2u-setup and drop the vestigial RSPM env vars, the hand-written /etc/R/Rprofile.site mirror hack (old packagemanager.rstudio.com host), and the manual system_requirements step (r2u auto-resolves OS deps via apt). The old-vs-new compare logic is unchanged. Also bump checkout@v4, upload-artifact@v4, ubuntu-24.04.
The bare-runner r-release job stalled ~15m and failed in setup when the upstream r2u mirror (r2u.stat.illinois.edu) was unreachable, so apt could not locate r-cran-bspm. Run release in the rocker/r2u container (mirroring the r-devel rocker/drd job, which passed): both images bundle r2u, so neither contacts the r2u mirror at setup time.
The minimal rocker/r2u image lacks curl, so the r-ci action's bootstrap (curl run.sh) failed with exit 127. rocker/r2u4ci is the CI-flavoured image recommended by r-ci, bundling r2u plus the CI tooling (curl etc.) the action needs.
The bare-runner r2u bootstrap can stall on a flaky upstream mirror (a recent run took ~41 min). Cap the job so it fails fast and is obviously retryable instead of burning a full-length run.
Matches the github-pages-deploy-action README example and clears the cosmetic 'Node.js 20 is deprecated' annotation (v6 runs on Node 24).
There was a problem hiding this comment.
Pull request overview
This PR modernizes the repository’s GitHub Actions CI by standardizing on the r-ci/r2u toolchain for faster, more consistent dependency installation, and by tightening up workflow behavior (timeouts, action versions, runner images).
Changes:
- Reworked
R-CMD-check.yamlto useeddelbuettel/github-actions/r-ciand run checks inside r2u-enabled containers for faster binary installs. - Updated
revdep.yamlto use r2u setup and removed the legacy RSPM/mirror hack plus the manual system requirements installation step. - Added a fail-fast timeout to
altdoc.yamland updatedactions/checkoutusage across workflows.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| .github/workflows/revdep.yaml | Switches revdep job setup to r2u and updates runner/action versions while removing legacy mirror/toolchain steps. |
| .github/workflows/R-CMD-check.yaml | Migrates CI to r-ci + containerized r2u images and replaces r-lib/actions steps with r-ci script invocations. |
| .github/workflows/altdoc.yaml | Adds a timeout to prevent long stalls and updates checkout action version. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced Jun 19, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A recent
revdeprun stalled for ~68 min, and a lateraltdocrun took ~41 min — but on investigation these were almost certainly a temporary upstream blip (a flaky package mirror / GitHub runner network), not a structural problem with our config. Both the GitHub Actions status and the r2u mirror were healthy again shortly after.Rather than just wait it out, we took it as an opportune moment to modernize and standardize the CI components that had drifted: dated action versions, a hardcoded/legacy package-mirror endpoint, and three workflows each setting up R a different way. The result is faster, more consistent, and less exposed to this class of hiccup going forward.
Headline result: the
cijobs now complete in ~1–1.5 min each.Changes
r-lib/actions/*witheddelbuettel/github-actions/r-ci, running both jobs in r2u-bundled containers (apt-binary installs; no bare-runner mirror-setup cost):r-release→container: rocker/r2u4ci(CI-flavoured r2u image; bundles curl/sudo/etc. the r-ci action needs).r-devel→container: rocker/drd(builtFROM rocker/r2u, so devel installs are binaries too). R-devel coverage retained. tinyplot is zero-dependency pure base R, so the r2u-built-for-release / devel ABI caveat doesn't apply to its own check.eddelbuettel/github-actions/r2u-setup; drop the vestigialRSPMenv vars, the hand-written/etc/R/Rprofile.sitemirror hack (legacypackagemanager.rstudio.comhost), and the manualsystem_requirementsstep (r2u auto-resolves OS deps via apt). Old-vs-new compare logic unchanged.timeout-minutes: 20. Left on the bare runner deliberately — its slow run traced to the same transient mirror blip, not a structural issue. The timeout makes any future stall fail fast and retryable instead of burning a full-length run.actions/checkout@v6(clears the Node 20 deprecation warning; matches the deploy action's README),actions/upload-artifact@v4(was a floating@main),ubuntu-24.04.Testing
ci(R-CMD-check): bothr-release(~1m10s) andr-devel(~1m32s) pass, installing via r2u in-container.altdoc: passes (deploy step correctly skipped on PR events).revdeponly triggers onrevdep*branches, so it is not exercised by this PR — to be validated separately via a throwawayrevdep-citestbranch (matrix collects revdeps; r2u installs them as binaries; old-vs-new compare runs).Notes / follow-ups
r2u-setup, so it retains some exposure to upstream r2u-mirror flakiness; containerize later if it proves recurrent.container: rocker/r2u4cionly if stalls recur on separate days (would also needgit+rsyncinstalled for the gh-pages deploy, which a PR can't validate).