-
Notifications
You must be signed in to change notification settings - Fork 28
72 lines (58 loc) · 2.39 KB
/
R-CMD-check.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
name: R-CMD-check
jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
name: R-CMD-Check ${{ matrix.config.os }} (${{ matrix.config.r }} - ${{ matrix.config.rust-version }})
strategy:
fail-fast: false
matrix:
config:
- {os: windows-latest, r: 'release', rust-version: 'stable-msvc', rust-target: 'x86_64-pc-windows-gnu' }
- {os: windows-latest, r: 'devel', rust-version: 'stable-msvc', rust-target: 'x86_64-pc-windows-gnu' }
- {os: windows-latest, r: 'oldrel', rust-version: 'stable-msvc', rust-target: 'x86_64-pc-windows-gnu', rtools-version: '43' }
- {os: macOS-latest, r: 'release', rust-version: 'stable' }
- {os: ubuntu-latest, r: 'release', rust-version: 'stable' }
- {os: ubuntu-latest, r: 'devel', rust-version: 'stable' }
- {os: ubuntu-latest, r: 'oldrel', rust-version: 'stable' }
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
REXTENDR_SKIP_DEV_TESTS: TRUE # TODO: Remove this when extendr/libR-sys issue is resolved
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.config.rust-version }}
targets: ${{ matrix.config.rust-target }}
- uses: baptiste0928/cargo-install@v2
if: matrix.config.r == 'release'
with:
crate: cargo-license
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
rtools-version: ${{ matrix.config.rtools-version }}
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 2
extra-packages: rcmdcheck
# TODO: allow warnings on oldrel (cf., https://stat.ethz.ch/pipermail/r-package-devel/2023q2/009229.html)
- name: Check R version
id: error-on
run: |
output <- Sys.getenv("GITHUB_OUTPUT")
if (.Platform$OS.type == "windows" && getRversion() < "4.3.0") {
cat('level=error', file = output, append = TRUE)
} else {
cat('level=warning', file = output, append = TRUE)
}
shell: Rscript {0}
- uses: r-lib/actions/check-r-package@v2
with:
error-on: '"${{ steps.error-on.outputs.level }}"'