From b71e1f35b0ba0e8053fc21bb5f72e00251e3dd92 Mon Sep 17 00:00:00 2001 From: Benjamin Schwendinger Date: Tue, 28 Apr 2026 10:44:34 +0200 Subject: [PATCH 1/2] use more base R for github actions --- .github/workflows/R-CMD-check.yaml | 60 ++++-------------------------- 1 file changed, 7 insertions(+), 53 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 81b186288..5cc2d4119 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -27,16 +27,14 @@ jobs: # jobs (mainly test-coverage) to run on every commit in PRs so as to not slow down dev. # GHA does run these jobs concurrently but even so reducing the load seems like a good idea. - {os: windows-latest, r: 'devel'} - - {os: macos-15-intel, r: 'release'} - - {os: macos-15, r: 'release'} + - {os: macos-15-intel, r: 'release'} + - {os: macos-15, r: 'release'} # TODO(remotes>2.5.0): Use 24.04[noble?] - - {os: ubuntu-22.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest"} - # - {os: ubuntu-22.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest", http-user-agent: "R/4.1.0 (ubuntu-22.04) R (4.1.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" } + - {os: ubuntu-22.04, r: 'release'} + # - {os: ubuntu-22.04, r: 'devel'} # GLCI covers R-devel; no need to delay contributors in dev due to changes in R-devel in recent days env: - R_REMOTES_NO_ERRORS_FROM_WARNINGS: true - RSPM: ${{ matrix.config.rspm }} GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} _R_CHECK_RD_CHECKRD_MINLEVEL_: -Inf @@ -47,35 +45,6 @@ jobs: with: r-version: ${{ matrix.config.r }} - - - name: Query dependencies - run: | - install.packages('remotes') - saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) - writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") - shell: Rscript {0} - - - name: Restore R package cache - uses: actions/cache@v5 - with: - path: ${{ env.R_LIBS_USER }} - key: ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} - restore-keys: ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.github/R-version') }}-1- - - - name: Install system dependencies - if: runner.os == 'Linux' - run: | - while read -r cmd - do - eval sudo $cmd - done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "22.04"))') - - - name: Install R Package Build Dependencies on MacOS, from https://github.com/stan-dev/cmdstanr/pull/1072/files - if: runner.os == 'macOS' - uses: r-hub/actions/setup-r-sysreqs@v1 - with: - type: 'minimal' - - name: Install and configure OpenMP runtime if: runner.os == 'macOS' run: | @@ -90,23 +59,8 @@ jobs: fi fi # otherwise R-bundled runtime is fine - - name: Install dependencies - run: | - remotes::install_deps(dependencies = TRUE) - remotes::install_cran("rcmdcheck") - shell: Rscript {0} - - - name: Check - env: - _R_CHECK_CRAN_INCOMING_REMOTE_: false - run: | - options(crayon.enabled = TRUE) - rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check") - shell: Rscript {0} + - uses: yihui/actions/setup-r-dependencies@HEAD - - name: Upload check results - if: failure() - uses: actions/upload-artifact@main + - uses: yihui/actions/check-r-package@HEAD with: - name: ${{ runner.os }}-r${{ matrix.config.r }}-results - path: check + check-args: "--no-manual --as-cran" From 73873ccc0e43d28a2d44e93a3b2f098943acb0ad Mon Sep 17 00:00:00 2001 From: Benjamin Schwendinger Date: Tue, 28 Apr 2026 11:05:23 +0200 Subject: [PATCH 2/2] reinstate MacOS build dependencies --- .github/workflows/R-CMD-check.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 5cc2d4119..1da418cc8 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -45,6 +45,12 @@ jobs: with: r-version: ${{ matrix.config.r }} + - name: Install R Package Build Dependencies on MacOS, from https://github.com/stan-dev/cmdstanr/pull/1072/files + if: runner.os == 'macOS' + uses: r-hub/actions/setup-r-sysreqs@v1 + with: + type: 'minimal' + - name: Install and configure OpenMP runtime if: runner.os == 'macOS' run: |