1- # Workflow derived from https://github.com/r-lib/actions/tree/master /examples
1+ # Workflow derived from https://github.com/r-lib/actions/tree/v2 /examples
22# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
33#
44# NOTE: This workflow is overkill for most R packages and
1212
1313name : R-CMD-check
1414
15- # Increment this version when we want to clear cache
16- env :
17- cache-version : v6
18-
1915jobs :
2016 R-CMD-check :
2117 runs-on : ${{ matrix.config.os }}
@@ -26,78 +22,53 @@ jobs:
2622 fail-fast : false
2723 matrix :
2824 config :
29- - {os: windows-latest, r: '4.1', vdiffr: true, xref: true}
30- - {os: macOS-latest, r: '4.1', vdiffr: true, xref: true}
31- - {os: ubuntu-18.04, r: 'devel', vdiffr: false, xref: true}
32- - {os: ubuntu-18.04, r: '4.1', vdiffr: true, xref: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
33- - {os: ubuntu-18.04, r: '4.0', vdiffr: false, xref: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
34- - {os: ubuntu-18.04, r: '3.6', vdiffr: false, xref: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
35- - {os: ubuntu-18.04, r: '3.5', vdiffr: false, xref: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
36- - {os: ubuntu-18.04, r: '3.4', vdiffr: false, xref: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
37- - {os: ubuntu-18.04, r: '3.3', vdiffr: false, xref: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
25+ - {os: macOS-latest, r: 'release'}
26+
27+ - {os: windows-latest, r: 'release'}
28+ # Use 3.6 to trigger usage of RTools35
29+ - {os: windows-latest, r: '3.6'}
30+
31+ # Use latest ubuntu to make it easier to install sf dependencies
32+ - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
33+ - {os: ubuntu-latest, r: 'release'}
34+ - {os: ubuntu-latest, r: 'oldrel-1'}
35+ - {os: ubuntu-latest, r: 'oldrel-2'}
36+ - {os: ubuntu-latest, r: 'oldrel-3'}
37+ - {os: ubuntu-latest, r: 'oldrel-4'}
3838
3939 env :
40- R_REMOTES_NO_ERRORS_FROM_WARNINGS : true
41- RSPM : ${{ matrix.config.rspm }}
42- # don't treat missing suggested packages as error
40+ GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
41+ R_KEEP_PKG_SOURCE : yes
4342 _R_CHECK_FORCE_SUGGESTS_ : false
4443 # Some packages might unavailable on the older versions, so let's ignore xref warnings
45- _R_CHECK_RD_XREFS_ : ${{ matrix.config.xref }}
44+ _R_CHECK_RD_XREFS_ : false
4645 # Runs vdiffr test only on the latest version of R
47- VDIFFR_RUN_TESTS : ${{ matrix.config.vdiffr }}
46+ VDIFFR_RUN_TESTS : ${{ matrix.config.r == 'release' }}
4847 VDIFFR_LOG_PATH : " ../vdiffr.Rout.fail"
4948
5049 steps :
5150 - uses : actions/checkout@v2
5251
53- - uses : r-lib/actions/setup-r@master
52+ - uses : r-lib/actions/setup-pandoc@v2
53+
54+ - uses : r-lib/actions/setup-r@v2
5455 with :
5556 r-version : ${{ matrix.config.r }}
5657 http-user-agent : ${{ matrix.config.http-user-agent }}
58+ use-public-rspm : true
5759
58- - uses : r-lib/actions/setup-pandoc@master
59-
60- - name : Query dependencies
61- run : |
62- install.packages('remotes')
63- saveRDS(remotes::dev_package_deps(dependencies = TRUE), "depends.Rds", version = 2)
64- shell : Rscript {0}
65-
66- - name : Cache R packages
67- if : runner.os != 'Windows'
68- uses : actions/cache@v1
60+ - uses : r-lib/actions/setup-r-dependencies@v2
6961 with :
70- path : ${{ env.R_LIBS_USER }}
71- key : ${{ env.cache-version }}-${{ runner.os }}-r-${{ matrix.config.r }}-${{ hashFiles('depends.Rds') }}
72- restore-keys : ${{ env.cache-version }}-${{ runner.os }}-r-${{ matrix.config.r }}-
73-
74- - name : Install system dependencies on Linux
75- if : runner.os == 'Linux'
76- run : |
77- while read -r cmd
78- do
79- eval sudo $cmd
80- done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "18.04"))')
81- - name : Install system dependencies on macOS
82- if : runner.os == 'macOS'
83- run : |
84- # XQuartz is needed by vdiffr
85- brew install xquartz
86- # Use only binary packages
87- echo 'options(pkgType = "binary")' >> ~/.Rprofile
88- - name : Install dependencies
89- run : |
90- remotes::install_deps(dependencies = TRUE)
91- remotes::install_cran("rcmdcheck")
92- shell : Rscript {0}
93-
94- - name : Check
95- run : rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "warning", check_dir = "check")
96- shell : Rscript {0}
62+ extra-packages : >
63+ any::rcmdcheck,
64+ maps=?ignore-before-r=3.5.0,
65+ Hmisc=?ignore-before-r=3.6.0,
66+ mapproj=?ignore-before-r=3.5.0,
67+ multcomp=?ignore-before-r=3.5.0,
68+ quantreg=?ignore-before-r=3.5.0,
69+ interp=?ignore-before-r=3.5.0
70+ needs : check
9771
98- - name : Upload check results
99- if : failure()
100- uses : actions/upload-artifact@master
72+ - uses : r-lib/actions/check-r-package@v2
10173 with :
102- name : ${{ runner.os }}-r${{ matrix.config.r }}-results
103- path : check
74+ upload-snapshots : true
0 commit comments