@@ -14,29 +14,40 @@ jobs:
14
14
R-CMD-check :
15
15
runs-on : ${{ matrix.config.os }}
16
16
17
- name : ${{ matrix.config.os }} (${{ matrix.config.r }})
17
+ name : ${{ matrix.config.os }} (${{ matrix.config.r }} / ${{ matrix.config.rust-version }} )
18
18
19
19
strategy :
20
20
fail-fast : false
21
21
matrix :
22
22
config :
23
- - {os: windows-latest, r: 'release'}
24
- - {os: macOS-latest, r: 'release'}
25
- - {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
26
- - {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
23
+ - {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"}
27
27
28
28
env :
29
29
R_REMOTES_NO_ERRORS_FROM_WARNINGS : true
30
30
RSPM : ${{ matrix.config.rspm }}
31
31
32
32
steps :
33
33
- uses : actions/checkout@v2
34
+
35
+ - name : Set up Rust
36
+ uses : actions-rs/toolchain@v1
37
+ with :
38
+ toolchain : ${{ matrix.config.rust-version }}
39
+ default : true
34
40
35
- - uses : r-lib/actions/setup-r@v1
41
+ # Uses @master branch to address rtools path issue
42
+ # https://github.com/r-lib/actions/issues/228
43
+ - name : Set up R
44
+ uses : r-lib/actions/setup-r@master
36
45
with :
37
46
r-version : ${{ matrix.config.r }}
47
+ windows-path-include-mingw : false
38
48
39
- - uses : r-lib/actions/setup-pandoc@v1
49
+ - name : Set up pandoc
50
+ uses : r-lib/actions/setup-pandoc@v1
40
51
41
52
- name : Query dependencies
42
53
run : |
@@ -45,37 +56,49 @@ jobs:
45
56
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
46
57
shell : Rscript {0}
47
58
48
- - name : Cache R packages
49
- if : runner.os != 'Windows'
59
+ - name : Cache R packages (not Windows)
60
+ if : startsWith( runner.os, 'Windows') == false
50
61
uses : actions/cache@v2
51
62
with :
52
63
path : ${{ env.R_LIBS_USER }}
53
64
key : ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
54
65
restore-keys : ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
55
66
56
- - name : Install system dependencies
57
- if : runner.os == 'Linux'
67
+ - name : Configure Windows
68
+ if : startsWith(runner.os, 'Windows')
69
+ run : |
70
+ rustup target add x86_64-pc-windows-gnu
71
+ rustup target add i686-pc-windows-gnu
72
+ echo "C:\msys64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
73
+ echo "C:\msys64\mingw32\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
74
+ shell : pwsh
75
+
76
+ - name : Configure Linux
77
+ if : startsWith(runner.os, 'Linux')
58
78
run : |
59
79
while read -r cmd
60
80
do
61
81
eval sudo $cmd
62
82
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
63
83
84
+
64
85
- name : Install dependencies
65
86
run : |
66
87
remotes::install_deps(dependencies = TRUE)
67
88
remotes::install_cran("rcmdcheck")
68
89
shell : Rscript {0}
69
90
70
91
- name : Check
92
+ id : rcmd_check
71
93
env :
72
94
_R_CHECK_CRAN_INCOMING_REMOTE_ : false
73
- run : rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
95
+ run : rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran", "--force-multiarch" ), error_on = "warning", check_dir = "check")
74
96
shell : Rscript {0}
75
97
76
98
- name : Upload check results
77
99
if : failure()
78
100
uses : actions/upload-artifact@main
79
101
with :
80
- name : ${{ runner.os }}-r${{ matrix.config.r }}-results
102
+ name : ${{ runner.os }}-r${{ matrix.config.r }}-rust${{ matrix.config.rust-version }}- results
81
103
path : check
104
+
0 commit comments