Skip to content

Commit 9d7b4f4

Browse files
committed
Revert workflow file change
1 parent c582969 commit 9d7b4f4

1 file changed

Lines changed: 47 additions & 8 deletions

File tree

.github/workflows/R-CMD-check.yaml

Lines changed: 47 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,18 @@ 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-15-intel, r: 'release'}
31-
- {os: macos-15, r: 'release'}
30+
- {os: macos-15-intel, r: 'release'}
31+
- {os: macos-15, r: 'release'}
3232
# TODO(remotes>2.5.0): Use 24.04[noble?]
33-
- {os: ubuntu-22.04, r: 'release'}
34-
# - {os: ubuntu-22.04, r: 'devel'}
33+
- {os: ubuntu-22.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest"}
34+
# - {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" }
3535
# GLCI covers R-devel; no need to delay contributors in dev due to changes in R-devel in recent days
3636

3737
env:
38+
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
39+
RSPM: ${{ matrix.config.rspm }}
3840
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
3941
_R_CHECK_RD_CHECKRD_MINLEVEL_: -Inf
40-
_R_CHECK_RD_CONTENTS_VALUE_: 1
4142

4243
steps:
4344
- uses: actions/checkout@v6
@@ -46,6 +47,29 @@ jobs:
4647
with:
4748
r-version: ${{ matrix.config.r }}
4849

50+
51+
- name: Query dependencies
52+
run: |
53+
install.packages('remotes')
54+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
55+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
56+
shell: Rscript {0}
57+
58+
- name: Restore R package cache
59+
uses: actions/cache@v5
60+
with:
61+
path: ${{ env.R_LIBS_USER }}
62+
key: ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
63+
restore-keys: ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.github/R-version') }}-1-
64+
65+
- name: Install system dependencies
66+
if: runner.os == 'Linux'
67+
run: |
68+
while read -r cmd
69+
do
70+
eval sudo $cmd
71+
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "22.04"))')
72+
4973
- name: Install R Package Build Dependencies on MacOS, from https://github.com/stan-dev/cmdstanr/pull/1072/files
5074
if: runner.os == 'macOS'
5175
uses: r-hub/actions/setup-r-sysreqs@v1
@@ -66,8 +90,23 @@ jobs:
6690
fi
6791
fi # otherwise R-bundled runtime is fine
6892
69-
- uses: yihui/actions/setup-r-dependencies@HEAD
93+
- name: Install dependencies
94+
run: |
95+
remotes::install_deps(dependencies = TRUE)
96+
remotes::install_cran("rcmdcheck")
97+
shell: Rscript {0}
98+
99+
- name: Check
100+
env:
101+
_R_CHECK_CRAN_INCOMING_REMOTE_: false
102+
run: |
103+
options(crayon.enabled = TRUE)
104+
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
105+
shell: Rscript {0}
70106

71-
- uses: yihui/actions/check-r-package@HEAD
107+
- name: Upload check results
108+
if: failure()
109+
uses: actions/upload-artifact@main
72110
with:
73-
check-args: "--no-manual --as-cran"
111+
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
112+
path: check

0 commit comments

Comments
 (0)