|
6 | 6 | R-CMD-check: |
7 | 7 | if: "! contains(github.event.head_commit.message, '[ci skip]')" |
8 | 8 |
|
| 9 | + timeout-minutes: 30 |
| 10 | + |
9 | 11 | runs-on: ${{ matrix.config.os }} |
10 | 12 |
|
11 | | - name: ${{ matrix.config.os }} (${{ matrix.config.r }}) |
| 13 | + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) ${{ matrix.config.label }} |
12 | 14 |
|
13 | 15 | strategy: |
14 | 16 | fail-fast: false |
15 | 17 | matrix: |
16 | 18 | config: |
17 | | - - {os: windows-latest, r: 'devel'} |
18 | | -#2020-09-23# - {os: windows-latest, r: 'release'} |
19 | | - - {os: macOS-latest, r: 'devel'} |
20 | | - - {os: macOS-latest, r: 'release'} |
21 | | - - {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"} |
22 | | - - {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"} |
23 | | - - {os: ubuntu-20.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"} |
24 | | - - {os: ubuntu-20.04, r: '3.5', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"} |
25 | | - - {os: ubuntu-20.04, r: '3.4', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"} |
26 | | - - {os: ubuntu-20.04, r: '3.3', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"} |
27 | | - |
| 19 | + - {os: windows-latest, r: 'devel' } |
| 20 | + - {os: windows-latest, r: 'release' } |
| 21 | + - {os: windows-latest, r: 'oldrel' } |
| 22 | + - {os: macOS-latest, r: 'devel' } |
| 23 | + - {os: macOS-latest, r: 'release' } |
| 24 | + - {os: macOS-latest, r: 'oldrel' } |
| 25 | + - {os: ubuntu-20.04, r: 'devel' } |
| 26 | + - {os: ubuntu-20.04, r: 'release' } |
| 27 | + - {os: ubuntu-20.04, r: 'oldrel' } |
| 28 | + - {os: ubuntu-20.04, r: 'oldrel-1' } |
| 29 | + - {os: ubuntu-20.04, r: 'oldrel-2' } |
| 30 | + - {os: ubuntu-20.04, r: '3.4' } |
| 31 | + - {os: ubuntu-20.04, r: 'release' , language: ko, label: ko } |
| 32 | + - {os: ubuntu-20.04, r: 'release' , language: zh_CN, label: zh_CN } |
| 33 | + - {os: ubuntu-20.04, r: 'release' , language: zh_TW, label: zh_TW } |
28 | 34 | env: |
29 | | - R_REMOTES_NO_ERRORS_FROM_WARNINGS: true |
30 | | - R_FUTURE_RNG_ONMISUSE: error |
31 | | - RSPM: ${{ matrix.config.rspm }} |
32 | 35 | GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} |
33 | | - |
| 36 | + R_KEEP_PKG_SOURCE: yes |
| 37 | + R_REMOTES_NO_ERRORS_FROM_WARNINGS: true |
| 38 | + ## R CMD check |
| 39 | + _R_CHECK_CRAN_INCOMING_: false |
| 40 | + _R_CHECK_LENGTH_1_CONDITION_: true |
| 41 | + _R_CHECK_LENGTH_1_LOGIC2_: true |
| 42 | + _R_CHECK_MATRIX_DATA_: true |
| 43 | + _R_CHECK_SUGGESTS_ONLY_: true |
| 44 | + _R_CHECK_THINGS_IN_TEMP_DIR_: true |
| 45 | + RCMDCHECK_ERROR_ON: note |
| 46 | + ## Test in other locale (optional) |
| 47 | + LANGUAGE: ${{ matrix.config.language }} |
| 48 | + |
34 | 49 | steps: |
35 | | - - uses: actions/checkout@v2 |
| 50 | + - uses: actions/checkout@v3 |
| 51 | + |
| 52 | + - uses: r-lib/actions/setup-pandoc@v2 |
36 | 53 |
|
37 | | - - uses: r-lib/actions/setup-r@master |
| 54 | + - uses: r-lib/actions/setup-r@v2 |
38 | 55 | with: |
39 | 56 | r-version: ${{ matrix.config.r }} |
40 | | - |
41 | | - - uses: r-lib/actions/setup-pandoc@master |
42 | | - |
43 | | - - name: Query dependencies |
44 | | - run: | |
45 | | - install.packages('remotes') |
46 | | - saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) |
47 | | - writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") |
48 | | - shell: Rscript {0} |
49 | | - |
50 | | - - name: Cache R packages |
51 | | - if: runner.os != 'Windows' |
52 | | - uses: actions/cache@v1 |
| 57 | + http-user-agent: ${{ matrix.config.http-user-agent }} |
| 58 | + use-public-rspm: true |
| 59 | + |
| 60 | + - uses: r-lib/actions/setup-r-dependencies@v2 |
53 | 61 | with: |
54 | | - path: ${{ env.R_LIBS_USER }} |
55 | | - key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} |
56 | | - restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1- |
| 62 | + extra-packages: any::rcmdcheck |
| 63 | + needs: check |
57 | 64 |
|
58 | | - - name: Install system dependencies |
59 | | - if: runner.os == 'Linux' |
60 | | - env: |
61 | | - RHUB_PLATFORM: linux-x86_64-ubuntu-gcc |
| 65 | + - name: Install package itself (special case) |
62 | 66 | run: | |
63 | | - Rscript -e "remotes::install_github('r-hub/sysreqs')" |
64 | | - sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))") |
65 | | - sudo -s eval "$sysreqs" |
66 | | -
|
67 | | - - name: Install dependencies |
68 | | - run: | |
69 | | - remotes::install_deps(dependencies = TRUE) |
70 | | - remotes::install_cran("rcmdcheck") |
71 | | - install.packages(".", repos=NULL, type="source") ## needed by parallel workers |
| 67 | + install.packages(".", repos = NULL, type = "source") ## self vignette engine |
72 | 68 | shell: Rscript {0} |
73 | 69 |
|
74 | 70 | - name: Session info |
75 | 71 | run: | |
76 | 72 | options(width = 100) |
| 73 | + capabilities() |
| 74 | + parallelly::availableCores(which = "all") |
77 | 75 | pkgs <- installed.packages()[, "Package"] |
78 | 76 | sessioninfo::session_info(pkgs, include_base = TRUE) |
| 77 | + ## Verify LANGUAGE settings by generating a translatable error |
| 78 | + cat(sprintf("LANGUAGE=%s\n", sQuote(Sys.getenv("LANGUAGE")))) |
| 79 | + cat(sprintf("locales: %s\n", sQuote(Sys.getlocale()))) |
| 80 | + tryCatch(log("a"), error = conditionMessage) |
79 | 81 | shell: Rscript {0} |
80 | 82 |
|
81 | 83 | - name: Check |
82 | | - env: |
83 | | - _R_CHECK_CRAN_INCOMING_REMOTE_: false |
84 | | - run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check") |
| 84 | + run: | |
| 85 | + rcmdcheck::rcmdcheck( |
| 86 | + args = c("--no-manual", "--as-cran"), |
| 87 | + check_dir = "check" |
| 88 | + ) |
85 | 89 | shell: Rscript {0} |
86 | 90 |
|
87 | 91 | - name: Upload check results |
88 | 92 | if: failure() |
89 | | - uses: actions/upload-artifact@master |
| 93 | + uses: actions/upload-artifact@v3 |
90 | 94 | with: |
91 | 95 | name: ${{ runner.os }}-r${{ matrix.config.r }}-results |
92 | 96 | path: check |
0 commit comments