@@ -27,17 +27,17 @@ jobs:
2727 # jobs (mainly test-coverage) to run on every commit in PRs so as to not slow down dev.
2828 # GHA does run these jobs concurrently but even so reducing the load seems like a good idea.
2929 - {os: windows-latest, r: 'devel'}
30- # - {os: macOS-latest, r: 'release'} # test-coverage.yaml uses macOS
30+ - {os: macos-15-intel, r: 'release'}
31+ - {os: macos-15, r: 'release'}
3132 # TODO(remotes>2.5.0): Use 24.04[noble?]
32- - {os: ubuntu-22.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest" }
33- # - {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" }
33+ - {os: ubuntu-22.04, r: 'release'}
34+ # - {os: ubuntu-22.04, r: 'devel'}
3435 # GLCI covers R-devel; no need to delay contributors in dev due to changes in R-devel in recent days
3536
3637 env :
37- R_REMOTES_NO_ERRORS_FROM_WARNINGS : true
38- RSPM : ${{ matrix.config.rspm }}
3938 GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
4039 _R_CHECK_RD_CHECKRD_MINLEVEL_ : -Inf
40+ _R_CHECK_RD_CONTENTS_VALUE_ : 1
4141
4242 steps :
4343 - uses : actions/checkout@v6
@@ -46,46 +46,28 @@ jobs:
4646 with :
4747 r-version : ${{ matrix.config.r }}
4848
49-
50- - name : Query dependencies
51- run : |
52- install.packages('remotes')
53- saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
54- writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
55- shell : Rscript {0}
56-
57- - name : Restore R package cache
58- uses : actions/cache@v5
49+ - name : Install R Package Build Dependencies on MacOS, from https://github.com/stan-dev/cmdstanr/pull/1072/files
50+ if : runner.os == 'macOS'
51+ uses : r-hub/actions/setup-r-sysreqs@v1
5952 with :
60- path : ${{ env.R_LIBS_USER }}
61- key : ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
62- restore-keys : ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
53+ type : ' minimal'
6354
64- - name : Install system dependencies
65- if : runner.os == 'Linux '
55+ - name : Install and configure OpenMP runtime
56+ if : runner.os == 'macOS '
6657 run : |
67- while read -r cmd
68- do
69- eval sudo $cmd
70- done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "22.04"))')
58+ if clang --version | grep 'clang version 17'; then
59+ openmp_tarball=openmp-19.1.5-darwin20-Release.tar.gz
60+ if curl --fail --location --retry 3 --retry-all-errors --connect-timeout 20 --max-time 180 \
61+ -O "https://mac.r-project.org/openmp/${openmp_tarball}"; then
62+ sudo tar fvxz "${openmp_tarball}" -C /
63+ rm -f "${openmp_tarball}"
64+ else
65+ echo "Warning: failed to fetch OpenMP runtime from https://mac.r-project.org/openmp/; continuing without it"
66+ fi
67+ fi # otherwise R-bundled runtime is fine
7168
72- - name : Install dependencies
73- run : |
74- remotes::install_deps(dependencies = TRUE)
75- remotes::install_cran("rcmdcheck")
76- shell : Rscript {0}
77-
78- - name : Check
79- env :
80- _R_CHECK_CRAN_INCOMING_REMOTE_ : false
81- run : |
82- options(crayon.enabled = TRUE)
83- rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
84- shell : Rscript {0}
69+ - uses : yihui/actions/setup-r-dependencies@HEAD
8570
86- - name : Upload check results
87- if : failure()
88- uses : actions/upload-artifact@main
71+ - uses : yihui/actions/check-r-package@HEAD
8972 with :
90- name : ${{ runner.os }}-r${{ matrix.config.r }}-results
91- path : check
73+ check-args : " --no-manual --as-cran"
0 commit comments