|
1 | 1 | on:
|
2 | 2 | push:
|
3 |
| - branches: |
4 |
| - - main |
5 |
| - - master |
| 3 | + branches: [main, master] |
6 | 4 | pull_request:
|
7 |
| - branches: |
8 |
| - - main |
9 |
| - - master |
| 5 | + branches: [main, master] |
10 | 6 |
|
11 | 7 | name: R-CMD-check
|
12 | 8 |
|
13 | 9 | jobs:
|
14 | 10 | R-CMD-check:
|
15 | 11 | runs-on: ${{ matrix.config.os }}
|
16 | 12 |
|
17 |
| - name: ${{ matrix.config.os }} (${{ matrix.config.r }} / ${{ matrix.config.rust-version }}) |
| 13 | + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) |
18 | 14 |
|
19 | 15 | strategy:
|
20 | 16 | fail-fast: false
|
21 | 17 | matrix:
|
22 | 18 | config:
|
23 | 19 | - {os: windows-latest, r: 'release', rust-version: 'stable-msvc'}
|
24 |
| - - {os: macOS-latest, r: 'release', rust-version: 'stable'} |
25 |
| - - {os: ubuntu-20.04, r: 'release', rust-version: 'stable', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} |
26 |
| - - {os: ubuntu-20.04, r: 'devel', rust-version: 'stable', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} |
| 20 | + - {os: macOS-latest, r: 'release', rust-version: 'stable' } |
| 21 | + - {os: ubuntu-20.04, r: 'release', rust-version: 'stable' } |
| 22 | + - {os: ubuntu-20.04, r: 'devel', rust-version: 'stable' } |
27 | 23 |
|
28 | 24 | env:
|
29 |
| - R_REMOTES_NO_ERRORS_FROM_WARNINGS: true |
30 |
| - RSPM: ${{ matrix.config.rspm }} |
| 25 | + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} |
| 26 | + R_KEEP_PKG_SOURCE: yes |
31 | 27 |
|
32 | 28 | steps:
|
33 | 29 | - uses: actions/checkout@v2
|
34 |
| - |
| 30 | + |
| 31 | + - uses: r-lib/actions/setup-pandoc@v1 |
| 32 | + |
35 | 33 | - name: Set up Rust
|
36 | 34 | uses: actions-rs/toolchain@v1
|
37 | 35 | with:
|
38 | 36 | toolchain: ${{ matrix.config.rust-version }}
|
39 | 37 | default: true
|
40 | 38 |
|
41 |
| - - name: Set up R |
42 |
| - uses: r-lib/actions/setup-r@v1 |
43 |
| - with: |
44 |
| - r-version: ${{ matrix.config.r }} |
45 |
| - windows-path-include-mingw: false |
46 |
| - |
47 |
| - - name: Set up pandoc |
48 |
| - uses: r-lib/actions/setup-pandoc@v1 |
49 |
| - |
50 |
| - - name: Query dependencies |
51 |
| - run: | |
52 |
| - install.packages('remotes') |
53 |
| - saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) |
54 |
| - writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") |
55 |
| - shell: Rscript {0} |
56 |
| - |
57 |
| - - name: Cache R packages (not Windows) |
58 |
| - if: startsWith(runner.os, 'Windows') == false |
59 |
| - uses: actions/cache@v2 |
60 |
| - with: |
61 |
| - path: ${{ env.R_LIBS_USER }} |
62 |
| - key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} |
63 |
| - restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1- |
64 |
| - |
65 | 39 | - name: Configure Windows
|
66 | 40 | if: startsWith(runner.os, 'Windows')
|
67 | 41 | run: |
|
68 | 42 | rustup target add x86_64-pc-windows-gnu
|
69 | 43 | rustup target add i686-pc-windows-gnu
|
70 |
| - shell: pwsh |
71 |
| - |
72 |
| - - name: Configure Linux |
73 |
| - if: startsWith(runner.os, 'Linux') |
74 |
| - run: | |
75 |
| - while read -r cmd |
76 |
| - do |
77 |
| - eval sudo $cmd |
78 |
| - done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))') |
79 | 44 |
|
| 45 | + - uses: r-lib/actions/setup-r@v1 |
| 46 | + with: |
| 47 | + r-version: ${{ matrix.config.r }} |
| 48 | + http-user-agent: ${{ matrix.config.http-user-agent }} |
| 49 | + use-public-rspm: true |
80 | 50 |
|
81 |
| - - name: Install dependencies |
82 |
| - run: | |
83 |
| - remotes::install_deps(dependencies = TRUE) |
84 |
| - remotes::install_cran("rcmdcheck") |
85 |
| - shell: Rscript {0} |
86 |
| - |
87 |
| - - name: Check |
88 |
| - id: rcmd_check |
89 |
| - env: |
90 |
| - _R_CHECK_CRAN_INCOMING_REMOTE_: false |
91 |
| - run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran", "--force-multiarch"), error_on = "warning", check_dir = "check") |
92 |
| - shell: Rscript {0} |
93 |
| - |
94 |
| - - name: Upload check results |
95 |
| - if: failure() |
96 |
| - uses: actions/upload-artifact@main |
| 51 | + - uses: r-lib/actions/setup-r-dependencies@v1 |
97 | 52 | with:
|
98 |
| - name: ${{ runner.os }}-r${{ matrix.config.r }}-rust${{ matrix.config.rust-version }}-results |
99 |
| - path: check |
| 53 | + extra-packages: rcmdcheck |
| 54 | + |
| 55 | + - uses: r-lib/actions/check-r-package@v1 |
0 commit comments