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
1+ # Workflow derived from https:// github.com/r-lib/ actions/tree/master/examples
2+ # Need help debugging build failures? Start at https://github. com/r-lib/ actions#where-to-find-help
33on :
44 push :
5- branches :
6- - main
7- - master
5+ branches : [main, master]
86 pull_request :
9- branches :
10- - main
11- - master
7+ branches : [main, master]
128
139name : R-CMD-check
1410
@@ -22,72 +18,30 @@ jobs:
2218 fail-fast : false
2319 matrix :
2420 config :
21+ - {os: macOS-latest, r: 'release'}
2522 - {os: windows-latest, r: 'release'}
2623 - {os: windows-latest, r: 'devel'}
27- - {os: macOS -latest, r : 'release'}
28- - {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest" }
29- - {os: ubuntu-20.04 , r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest", http-user-agent: "R/4.1.0 (ubuntu-20.04) R (4.1.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
24+ - {os: ubuntu -latest, r: 'devel', http-user-agent : 'release'}
25+ - {os: ubuntu-latest, r: 'release'}
26+ - {os: ubuntu-latest , r: 'oldrel-1' }
3027
3128 env :
32- R_REMOTES_NO_ERRORS_FROM_WARNINGS : true
33- RSPM : ${{ matrix.config.rspm }}
3429 GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
30+ R_KEEP_PKG_SOURCE : yes
3531
3632 steps :
3733 - uses : actions/checkout@v2
3834
35+ - uses : r-lib/actions/setup-pandoc@v1
36+
3937 - uses : r-lib/actions/setup-r@v1
4038 with :
4139 r-version : ${{ matrix.config.r }}
40+ http-user-agent : ${{ matrix.config.http-user-agent }}
41+ use-public-rspm : true
4242
43- - uses : r-lib/actions/setup-pandoc@v1
44-
45- - name : Query dependencies
46- run : |
47- install.packages('remotes')
48- saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
49- writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
50- shell : Rscript {0}
51-
52- - name : Restore R package cache
53- uses : actions/cache@v2
43+ - uses : r-lib/actions/setup-r-dependencies@v1
5444 with :
55- path : ${{ env.R_LIBS_USER }}
56- key : ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
57- restore-keys : ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
45+ extra-packages : rcmdcheck
5846
59- - name : Install system dependencies
60- if : runner.os == 'Linux'
61- run : |
62- while read -r cmd
63- do
64- eval sudo $cmd
65- done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
66-
67- - name : Install dependencies
68- run : |
69- remotes::install_deps(dependencies = TRUE)
70- remotes::install_cran("rcmdcheck")
71- shell : Rscript {0}
72-
73- - name : Check
74- env :
75- _R_CHECK_CRAN_INCOMING_REMOTE_ : false
76- run : |
77- options(crayon.enabled = TRUE)
78- print(R.version)
79- args <- if (.Platform$OS.type == "windows" & grepl("unstable", R.version$status)) {
80- c("--no-manual", "--as-cran", "--no-multiarch")
81- } else {
82- c("--no-manual", "--as-cran")
83- }
84- print(args)
85- rcmdcheck::rcmdcheck(args = args, error_on = "warning", check_dir = "check")
86- shell : Rscript {0}
87-
88- - name : Upload check results
89- if : failure()
90- uses : actions/upload-artifact@main
91- with :
92- name : ${{ runner.os }}-r${{ matrix.config.r }}-results
93- path : check
47+ - uses : r-lib/actions/check-r-package@v1
0 commit comments