From 229201aa567049da0f6fab768396c5d6fa0690a8 Mon Sep 17 00:00:00 2001 From: Grant McDermott Date: Thu, 18 Jun 2026 13:23:27 -0700 Subject: [PATCH 1/5] ci: switch workflows to r-ci/r2u for fast binary installs 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. --- .github/workflows/R-CMD-check.yaml | 43 ++++++++++++------------------ .github/workflows/revdep.yaml | 30 +++++++-------------- 2 files changed, 27 insertions(+), 46 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index bc245f4da..21421951c 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -1,5 +1,6 @@ -# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples -# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +# Workflow derived from https://eddelbuettel.github.io/r-ci/ +# Uses r-ci + r2u for fast (binary) package installation. R-devel coverage is +# provided via the rocker/drd container (itself built FROM rocker/r2u). on: push: branches: [main, master] @@ -9,41 +10,31 @@ on: name: ci jobs: - R-CMD-check: - runs-on: ${{ matrix.config.os }} + ci: + runs-on: ${{ matrix.os }} + container: ${{ matrix.container }} - name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + name: ${{ matrix.name }} strategy: fail-fast: false matrix: - config: - # - {os: macos-latest, r: 'release'} - # - {os: windows-latest, r: 'release'} - - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} - - {os: ubuntu-latest, r: 'release'} - # - {os: ubuntu-latest, r: 'oldrel-1'} + include: + - { name: r-release, os: ubuntu-latest } + - { name: r-devel, os: ubuntu-latest, container: rocker/drd } env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} R_KEEP_PKG_SOURCE: yes steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: r-lib/actions/setup-pandoc@v2 + - name: Setup + uses: eddelbuettel/github-actions/r-ci@master - - uses: r-lib/actions/setup-r@v2 - with: - r-version: ${{ matrix.config.r }} - http-user-agent: ${{ matrix.config.http-user-agent }} - use-public-rspm: true + - name: Dependencies + run: ./run.sh install_all - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - extra-packages: any::rcmdcheck - needs: check - - - uses: r-lib/actions/check-r-package@v2 - with: - upload-snapshots: true + - name: Test + run: ./run.sh run_tests diff --git a/.github/workflows/revdep.yaml b/.github/workflows/revdep.yaml index d5c9dc9c1..13b6482ba 100644 --- a/.github/workflows/revdep.yaml +++ b/.github/workflows/revdep.yaml @@ -8,13 +8,12 @@ name: revdep jobs: matrix: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} name: Collect revdeps env: R_REMOTES_NO_ERRORS_FROM_WARNINGS: true - RSPM: https://packagemanager.rstudio.com/cran/__linux__/bionic/latest GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} # prevent rgl issues because no X11 display is available RGL_USE_NULL: true @@ -24,7 +23,7 @@ jobs: curl -s --header "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/rate_limit shell: bash - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - id: set-matrix run: | @@ -40,7 +39,7 @@ jobs: shell: Rscript {0} check-matrix: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 needs: matrix steps: - name: Install json2yaml @@ -56,14 +55,13 @@ jobs: R-CMD-check: needs: matrix - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 name: ${{ matrix.package }} strategy: fail-fast: false matrix: ${{fromJson(needs.matrix.outputs.matrix)}} env: R_REMOTES_NO_ERRORS_FROM_WARNINGS: true - RSPM: https://packagemanager.rstudio.com/cran/__linux__/bionic/latest GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} # prevent rgl issues because no X11 display is available RGL_USE_NULL: true @@ -73,12 +71,12 @@ jobs: curl -s --header "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/rate_limit shell: bash - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - name: Use RSPM - run: | - mkdir -p /home/runner/work/_temp/Library - echo 'local({release <- system2("lsb_release", "-sc", stdout = TRUE); options(repos=c(CRAN = paste0("https://packagemanager.rstudio.com/all/__linux__/", release, "/latest")), HTTPUserAgent = sprintf("R/%s R (%s)", getRversion(), paste(getRversion(), R.version$platform, R.version$arch, R.version$os)))}); .libPaths("/home/runner/work/_temp/Library")' | sudo tee /etc/R/Rprofile.site + # r2u: installs CRAN packages as apt binaries and auto-resolves their + # system (OS) dependencies, so no manual system_requirements() step is + # needed. Replaces the old hand-written /etc/R/Rprofile.site mirror hack. + - uses: eddelbuettel/github-actions/r2u-setup@master - name: Install remotes run: | @@ -88,14 +86,6 @@ jobs: - uses: r-lib/actions/setup-pandoc@v2 - - name: Install system dependencies - if: runner.os == 'Linux' - run: | - sudo apt-get update -y - Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "22.04")); package <- "${{ matrix.package }}"; deps <- tools::package_dependencies(package, which = "Suggests")[[1]]; lapply(c(package, deps), function(x) { writeLines(remotes::system_requirements("ubuntu", "22.04", package = x)) })' | sort | uniq > .github/deps.sh - cat .github/deps.sh - sudo sh < .github/deps.sh - - name: Install package run: | package <- "${{ matrix.package }}" @@ -173,7 +163,7 @@ jobs: - name: Upload check results if: failure() - uses: actions/upload-artifact@main + uses: actions/upload-artifact@v4 with: name: ${{ matrix.package }}-results path: revdep/${{ matrix.package }} From 42eb6b219d7490c755d73dc97a634eaf93345889 Mon Sep 17 00:00:00 2001 From: Grant McDermott Date: Thu, 18 Jun 2026 14:23:16 -0700 Subject: [PATCH 2/5] ci: run r-release in rocker/r2u container 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. --- .github/workflows/R-CMD-check.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 21421951c..28d6d8296 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -1,6 +1,8 @@ # Workflow derived from https://eddelbuettel.github.io/r-ci/ -# Uses r-ci + r2u for fast (binary) package installation. R-devel coverage is -# provided via the rocker/drd container (itself built FROM rocker/r2u). +# Uses r-ci + r2u for fast (binary) package installation. Both jobs run in +# containers that already bundle r2u (rocker/r2u for release, rocker/drd for +# devel, the latter built FROM rocker/r2u), so neither pays the bare-runner +# r2u mirror-setup cost (which can stall if the upstream r2u mirror is down). on: push: branches: [main, master] @@ -20,7 +22,7 @@ jobs: fail-fast: false matrix: include: - - { name: r-release, os: ubuntu-latest } + - { name: r-release, os: ubuntu-latest, container: rocker/r2u } - { name: r-devel, os: ubuntu-latest, container: rocker/drd } env: From 48569c49a782a8bc40285c239c73e9e9eb0a4142 Mon Sep 17 00:00:00 2001 From: Grant McDermott Date: Thu, 18 Jun 2026 14:25:20 -0700 Subject: [PATCH 3/5] ci: use rocker/r2u4ci for r-release job 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. --- .github/workflows/R-CMD-check.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 28d6d8296..edaff5c68 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -1,7 +1,8 @@ # Workflow derived from https://eddelbuettel.github.io/r-ci/ # Uses r-ci + r2u for fast (binary) package installation. Both jobs run in -# containers that already bundle r2u (rocker/r2u for release, rocker/drd for -# devel, the latter built FROM rocker/r2u), so neither pays the bare-runner +# containers that already bundle r2u (rocker/r2u4ci for release -- the +# CI-flavoured image recommended by r-ci, with curl etc. preinstalled -- and +# rocker/drd for devel, built FROM rocker/r2u), so neither pays the bare-runner # r2u mirror-setup cost (which can stall if the upstream r2u mirror is down). on: push: @@ -22,7 +23,7 @@ jobs: fail-fast: false matrix: include: - - { name: r-release, os: ubuntu-latest, container: rocker/r2u } + - { name: r-release, os: ubuntu-latest, container: rocker/r2u4ci } - { name: r-devel, os: ubuntu-latest, container: rocker/drd } env: From c29efe2c19e8d06a7a20a8aa52f9ac5589c079a2 Mon Sep 17 00:00:00 2001 From: Grant McDermott Date: Thu, 18 Jun 2026 15:11:01 -0700 Subject: [PATCH 4/5] ci: add 20-minute timeout to altdoc job 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. --- .github/workflows/altdoc.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/altdoc.yaml b/.github/workflows/altdoc.yaml index f8cef5e13..f57e8d008 100644 --- a/.github/workflows/altdoc.yaml +++ b/.github/workflows/altdoc.yaml @@ -14,6 +14,9 @@ name: altdoc jobs: altdoc: runs-on: ubuntu-latest + # Fail fast (and retryably) if the bare-runner r2u bootstrap stalls on a + # flaky upstream mirror, rather than burning a full-length run. + timeout-minutes: 20 # Only restrict concurrency for non-PR jobs concurrency: group: altdoc-${{ github.event_name != 'pull_request' || github.run_id }} From 936d3889ff54c524fdb947dca0cd8bd962a144de Mon Sep 17 00:00:00 2001 From: Grant McDermott Date: Thu, 18 Jun 2026 15:19:37 -0700 Subject: [PATCH 5/5] ci: bump actions/checkout v4 -> v6 Matches the github-pages-deploy-action README example and clears the cosmetic 'Node.js 20 is deprecated' annotation (v6 runs on Node 24). --- .github/workflows/R-CMD-check.yaml | 2 +- .github/workflows/altdoc.yaml | 2 +- .github/workflows/revdep.yaml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index edaff5c68..0fd35af76 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -31,7 +31,7 @@ jobs: R_KEEP_PKG_SOURCE: yes steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Setup uses: eddelbuettel/github-actions/r-ci@master diff --git a/.github/workflows/altdoc.yaml b/.github/workflows/altdoc.yaml index f57e8d008..c66dd93e0 100644 --- a/.github/workflows/altdoc.yaml +++ b/.github/workflows/altdoc.yaml @@ -25,7 +25,7 @@ jobs: permissions: contents: write steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: quarto-dev/quarto-actions/setup@v2 diff --git a/.github/workflows/revdep.yaml b/.github/workflows/revdep.yaml index 13b6482ba..eb2ff7c24 100644 --- a/.github/workflows/revdep.yaml +++ b/.github/workflows/revdep.yaml @@ -23,7 +23,7 @@ jobs: curl -s --header "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/rate_limit shell: bash - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - id: set-matrix run: | @@ -71,7 +71,7 @@ jobs: curl -s --header "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/rate_limit shell: bash - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 # r2u: installs CRAN packages as apt binaries and auto-resolves their # system (OS) dependencies, so no manual system_requirements() step is