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 :
55 pull_request :
@@ -16,64 +16,32 @@ jobs:
1616 fail-fast : false
1717 matrix :
1818 config :
19+ - {os: macOS-latest, r: 'release'}
20+ - {os: windows-latest, r: '3.6'}
1921 - {os: windows-latest, r: 'release'}
20- - {os: macOS-latest, r: 'release'}
21- - {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
22- - {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" }
22+ - {os: windows-2022, r: 'devel'}
23+ - {os: windows-2022, r: 'devel-ucrt'}
24+ - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
25+ - {os: ubuntu-latest, r: 'release'}
26+ - {os: ubuntu-latest, r: 'oldrel-1'}
2327
2428 env :
25- R_REMOTES_NO_ERRORS_FROM_WARNINGS : true
26- RSPM : ${{ matrix.config.rspm }}
2729 GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
30+ R_KEEP_PKG_SOURCE : yes
2831
2932 steps :
3033 - uses : actions/checkout@v2
3134
35+ - uses : r-lib/actions/setup-pandoc@v1
36+
3237 - uses : r-lib/actions/setup-r@v1
3338 with :
3439 r-version : ${{ matrix.config.r }}
40+ http-user-agent : ${{ matrix.config.http-user-agent }}
41+ use-public-rspm : true
3542
36- - uses : r-lib/actions/setup-pandoc@v1
37-
38- - name : Query dependencies
39- run : |
40- install.packages('remotes')
41- saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
42- writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
43- shell : Rscript {0}
44-
45- - name : Restore R package cache
46- uses : actions/cache@v2
43+ - uses : r-lib/actions/setup-r-dependencies@v1
4744 with :
48- path : ${{ env.R_LIBS_USER }}
49- key : ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
50- restore-keys : ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
45+ extra-packages : rcmdcheck
5146
52- - name : Install system dependencies
53- if : runner.os == 'Linux'
54- run : |
55- while read -r cmd
56- do
57- eval sudo $cmd
58- done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
59-
60- - name : Install dependencies
61- run : |
62- remotes::install_deps(dependencies = TRUE)
63- remotes::install_cran("rcmdcheck")
64- shell : Rscript {0}
65-
66- - name : Check
67- env :
68- _R_CHECK_CRAN_INCOMING_REMOTE_ : false
69- run : |
70- options(crayon.enabled = TRUE)
71- rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
72- shell : Rscript {0}
73-
74- - name : Upload check results
75- if : failure()
76- uses : actions/upload-artifact@main
77- with :
78- name : ${{ runner.os }}-r${{ matrix.config.r }}-results
79- path : check
47+ - uses : r-lib/actions/check-r-package@v1
0 commit comments