Skip to content

ci: switch workflows to r-ci/r2u for fast binary installs - #633

Merged
grantmcdermott merged 5 commits into
mainfrom
ci-workflow-updates
Jun 18, 2026
Merged

ci: switch workflows to r-ci/r2u for fast binary installs#633
grantmcdermott merged 5 commits into
mainfrom
ci-workflow-updates

Conversation

@grantmcdermott

@grantmcdermott grantmcdermott commented Jun 18, 2026

Copy link
Copy Markdown
Owner

Why

A recent revdep run stalled for ~68 min, and a later altdoc run 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 ci jobs now complete in ~1–1.5 min each.

Changes

  • R-CMD-check.yaml: replace r-lib/actions/* with eddelbuettel/github-actions/r-ci, running both jobs in r2u-bundled containers (apt-binary installs; no bare-runner mirror-setup cost):
    • r-releasecontainer: rocker/r2u4ci (CI-flavoured r2u image; bundles curl/sudo/etc. the r-ci action needs).
    • r-develcontainer: rocker/drd (built FROM 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.
  • revdep.yaml: surgical toolchain swap only. Add eddelbuettel/github-actions/r2u-setup; drop the vestigial RSPM env vars, the hand-written /etc/R/Rprofile.site mirror hack (legacy packagemanager.rstudio.com host), and the manual system_requirements step (r2u auto-resolves OS deps via apt). Old-vs-new compare logic unchanged.
  • altdoc.yaml: add 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.
  • Housekeeping / standardization: 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): both r-release (~1m10s) and r-devel (~1m32s) pass, installing via r2u in-container.
  • altdoc: passes (deploy step correctly skipped on PR events).
  • revdep only triggers on revdep* branches, so it is not exercised by this PR — to be validated separately via a throwaway revdep-citest branch (matrix collects revdeps; r2u installs them as binaries; old-vs-new compare runs).

Notes / follow-ups

  • revdep still uses a bare-runner r2u-setup, so it retains some exposure to upstream r2u-mirror flakiness; containerize later if it proves recurrent.
  • altdoc likewise remains bare-runner by choice (see above); revisit container: rocker/r2u4ci only if stalls recur on separate days (would also need git + rsync installed for the gh-pages deploy, which a PR can't validate).

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).

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yaml to use eddelbuettel/github-actions/r-ci and run checks inside r2u-enabled containers for faster binary installs.
  • Updated revdep.yaml to use r2u setup and removed the legacy RSPM/mirror hack plus the manual system requirements installation step.
  • Added a fail-fast timeout to altdoc.yaml and updated actions/checkout usage 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.

Comment thread .github/workflows/R-CMD-check.yaml
Comment thread .github/workflows/revdep.yaml
@grantmcdermott
grantmcdermott merged commit 1423761 into main Jun 18, 2026
4 of 5 checks passed
@grantmcdermott
grantmcdermott deleted the ci-workflow-updates branch June 18, 2026 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants