1-
1+ # For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
2+ # https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
23on :
34 push :
45 branches :
6+ - main
57 - master
68 pull_request :
79 branches :
10+ - main
811 - master
912
1013name : R-CMD-check
@@ -13,67 +16,76 @@ jobs:
1316 R-CMD-check :
1417 runs-on : ${{ matrix.config.os }}
1518
16- name : ${{ matrix.config.os }} (R ${{ matrix.config.r }})
19+ name : ${{ matrix.config.os }} (${{ matrix.config.r }})
1720
1821 strategy :
1922 fail-fast : false
2023 matrix :
2124 config :
22- - {os: windows-latest, r: '3.6 '}
23- - {os: macOS -latest, r: '3.6 '}
24- - {os: windows -latest, r: '4.0 '}
25- - {os: macOS-latest , r: '4.0' }
26- - {os: ubuntu-16 .04, r: '4.0 ', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial /latest"}
27- - {os: ubuntu-18 .04, r: '4.0 ', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic /latest"}
28- - {os: ubuntu-18 .04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic /latest"}
25+ - {os: windows-latest, r: 'oldrel '}
26+ - {os: windows -latest, r: 'release '}
27+ - {os: macOS -latest, r: 'release '}
28+ - {os: ubuntu-16.04 , r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest" }
29+ - {os: ubuntu-18 .04, r: 'release ', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic /latest"}
30+ - {os: ubuntu-20 .04, r: 'release ', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal /latest"}
31+ - {os: ubuntu-20 .04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal /latest"}
2932
3033 env :
3134 R_REMOTES_NO_ERRORS_FROM_WARNINGS : true
3235 RSPM : ${{ matrix.config.rspm }}
3336
3437 steps :
35- - uses : actions/checkout@v1
38+ - uses : actions/checkout@v2
3639
37- - uses : r-lib/actions/setup-r@master
40+ - uses : r-lib/actions/setup-r@v1
3841 with :
3942 r-version : ${{ matrix.config.r }}
4043
41- - uses : r-lib/actions/setup-pandoc@master
44+ - uses : r-lib/actions/setup-pandoc@v1
4245
4346 - name : Query dependencies
4447 run : |
4548 install.packages('remotes')
46- saveRDS(remotes::dev_package_deps(dependencies = TRUE), "depends.Rds", version = 2)
49+ saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
50+ writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
4751 shell : Rscript {0}
4852
4953 - name : Cache R packages
5054 if : runner.os != 'Windows'
51- uses : actions/cache@v1
55+ uses : actions/cache@v2
5256 with :
5357 path : ${{ env.R_LIBS_USER }}
54- key : ${{ matrix.config. os }}-r- ${{ matrix.config.r }}-${{ hashFiles('depends.Rds') }}
55- restore-keys : ${{ matrix.config. os }}-r- ${{ matrix.config.r }}-
58+ key : ${{ runner. os }}-${{ hashFiles('.github/R-version') }}-1- ${{ hashFiles('.github/ depends.Rds') }}
59+ restore-keys : ${{ runner. os }}-${{ hashFiles('.github/R-version') }}-1 -
5660
57- - name : Install system dependencies (MacOS)
61+ - name : Install s2 system dependencies (MacOS)
5862 if : runner.os == 'MacOS'
5963 run : |
60646165
62- - name : Install system dependencies (Linux)
66+ - name : Install s2 system dependencies (Linux)
6367 if : runner.os == 'Linux'
6468 run : |
6569 sudo apt install libssl-dev
70+
71+ - name : Install system dependencies
72+ if : runner.os == 'Linux'
73+ run : |
74+ while read -r cmd
75+ do
76+ eval sudo $cmd
77+ done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
78+
6679 - name : Install dependencies
6780 run : |
68- library(remotes)
69- deps <- readRDS("depends.Rds")
70- deps[["installed"]] <- vapply(deps[["package"]], remotes:::local_sha, character(1))
71- update(deps)
81+ remotes::install_deps(dependencies = TRUE)
7282 remotes::install_cran("rcmdcheck")
7383 shell : Rscript {0}
7484
7585 - name : Check
76- run : rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "warning", check_dir = "check")
86+ env :
87+ _R_CHECK_CRAN_INCOMING_REMOTE_ : false
88+ run : rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
7789 shell : Rscript {0}
7890
7991 - name : Show install output
88100
89101 - name : Upload check results
90102 if : failure()
91- uses : actions/upload-artifact@master
103+ uses : actions/upload-artifact@main
92104 with :
93- name : ${{ matrix.config .os }}-r${{ matrix.config.r }}-results
105+ name : ${{ runner .os }}-r${{ matrix.config.r }}-results
94106 path : check
0 commit comments