17
17
name : R-CMD-check
18
18
19
19
jobs :
20
+
21
+ rversions :
22
+ name : R Versions
23
+ runs-on : ubuntu-latest
24
+ outputs :
25
+ devel : ${{ steps.devel.outputs.installed-r-version }}
26
+ release : ${{ steps.release.outputs.installed-r-version }}
27
+ oldrel1 : ${{ steps.oldrel1.outputs.installed-r-version }}
28
+ oldrel2 : ${{ steps.oldrel2.outputs.installed-r-version }}
29
+ oldrel3 : ${{ steps.oldrel3.outputs.installed-r-version }}
30
+ oldrel4 : ${{ steps.oldrel4.outputs.installed-r-version }}
31
+ steps :
32
+ - { name: devel, uses: r-lib/actions/setup-r@master, id: devel, with: { r-version: devel, install-r: false }}
33
+ - { name: release, uses: r-lib/actions/setup-r@master, id: release, with: { r-version: release, install-r: false }}
34
+ - { name: oldrel/1, uses: r-lib/actions/setup-r@master, id: oldrel1, with: { r-version: oldrel/1, install-r: false }}
35
+ - { name: oldrel/2, uses: r-lib/actions/setup-r@master, id: oldrel2, with: { r-version: oldrel/2, install-r: false }}
36
+ - { name: oldrel/3, uses: r-lib/actions/setup-r@master, id: oldrel3, with: { r-version: oldrel/3, install-r: false }}
37
+ - { name: oldrel/4, uses: r-lib/actions/setup-r@master, id: oldrel4, with: { r-version: oldrel/4, install-r: false }}
38
+
39
+
20
40
R-CMD-check :
21
41
runs-on : ${{ matrix.config.os }}
22
42
23
43
name : ${{ matrix.config.os }} (${{ matrix.config.r }})
24
44
45
+ needs :
46
+ - rversions
25
47
strategy :
26
48
fail-fast : false
27
49
matrix :
28
50
config :
29
- - {os: macOS-latest, r: 'devel'}
30
- - {os: macOS-latest, r: 'release'}
31
- - {os: windows-latest, r: 'release'}
51
+ - {os: macOS-latest, r: '${{ needs.rversions.outputs. devel }} '}
52
+ - {os: macOS-latest, r: '${{ needs.rversions.outputs. release }} '}
53
+ - {os: windows-latest, r: '${{ needs.rversions.outputs. release }} '}
32
54
- {os: windows-latest, r: '3.6'}
33
- - {os: ubuntu-16 .04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial /latest", http-user-agent: "R/4.0.0 (ubuntu-16.04) R (4.0.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions " }
34
- - {os: ubuntu-16 .04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial /latest"}
35
- - {os: ubuntu-16 .04, r: 'oldrel ', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial /latest"}
36
- - {os: ubuntu-16 .04, r: '3.5 ', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial /latest"}
37
- - {os: ubuntu-16 .04, r: '3.4 ', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial /latest"}
38
- - {os: ubuntu-16 .04, r: '3.3 ', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial /latest"}
55
+ - {os: ubuntu-20 .04, r: '${{ needs.rversions.outputs. devel }} ', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal /latest", http-user-agent: "release " }
56
+ - {os: ubuntu-20 .04, r: '${{ needs.rversions.outputs. release }} ', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal /latest"}
57
+ - {os: ubuntu-20 .04, r: '${{ needs.rversions.outputs.oldrel1 }} ', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal /latest"}
58
+ - {os: ubuntu-20 .04, r: '${{ needs.rversions.outputs.oldrel2 }} ', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal /latest"}
59
+ - {os: ubuntu-20 .04, r: '${{ needs.rversions.outputs.oldrel3 }} ', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal /latest"}
60
+ - {os: ubuntu-20 .04, r: '${{ needs.rversions.outputs.oldrel4 }} ', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal /latest"}
39
61
40
62
env :
41
- R_REMOTES_NO_ERRORS_FROM_WARNINGS : true
42
63
RSPM : ${{ matrix.config.rspm }}
43
64
GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
44
65
@@ -56,19 +77,24 @@ jobs:
56
77
- name : Install pak and query dependencies
57
78
run : |
58
79
install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/")
59
- saveRDS(pak::pkg_deps_tree ("local::.", dependencies = TRUE), ".github/r-depends.rds")
80
+ saveRDS(pak::pkg_deps ("local::.", dependencies = TRUE), ".github/r-depends.rds")
60
81
shell : Rscript {0}
61
82
62
- - name : Cache R packages
83
+ - name : Restore R package cache
63
84
uses : actions/cache@v2
64
85
with :
65
- path : ${{ env.R_LIBS_USER }}
66
- key : ${{ runner.os }}-${{ steps.install-r.outputs.installed-r-version }}-1-${{ hashFiles('.github/r-depends.rds') }}
67
- restore-keys : ${{ runner.os }}-${{ steps.install-r.outputs.installed-r-version }}-1-
86
+ path : |
87
+ ${{ env.R_LIBS_USER }}/*
88
+ !${{ env.R_LIBS_USER }}/pak
89
+ key : ${{ matrix.config.os }}-${{ steps.install-r.outputs.installed-r-version }}-1-${{ hashFiles('.github/r-depends.rds') }}
90
+ restore-keys : ${{ matrix.config.os }}-${{ steps.install-r.outputs.installed-r-version }}-1-
68
91
69
92
- name : Install system dependencies
70
93
if : runner.os == 'Linux'
71
- run : Rscript -e 'pak::local_system_requirements(execute = TRUE)'
94
+ run : |
95
+ pak::local_system_requirements(execute = TRUE)
96
+ pak::pkg_system_requirements("rcmdcheck", execute = TRUE)
97
+ shell : Rscript {0}
72
98
73
99
- name : Install dependencies
74
100
run : |
86
112
- name : Check
87
113
env :
88
114
_R_CHECK_CRAN_INCOMING_ : false
89
- run : rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
115
+ run : |
116
+ options(crayon.enabled = TRUE)
117
+ rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
90
118
shell : Rscript {0}
91
119
92
120
- name : Show testthat output
@@ -98,13 +126,10 @@ jobs:
98
126
if : failure()
99
127
uses : actions/upload-artifact@main
100
128
with :
101
- name : ${{ runner .os }}-r${{ matrix.config.r }}-results
129
+ name : ${{ matrix.config .os }}-r${{ matrix.config.r }}-results
102
130
path : check
103
131
104
- - name : Fix path for Windows caching
105
- if : runner.os == 'Windows'
106
- # This is needed because if you use the default tar at this stage,
107
- # C:/Rtools/bin/tar.exe, it will say that it can't find gzip.exe. So
108
- # we'll just set the path so that the original tar that would be
109
- # found, will be found.
132
+ - name : Don't use tar from old Rtools to store the cache
133
+ if : ${{ runner.os == 'Windows' && startsWith(steps.install-r.outputs.installed-r-version, '3.6' ) }}
134
+ shell : bash
110
135
run : echo "C:/Program Files/Git/usr/bin" >> $GITHUB_PATH
0 commit comments