@@ -10,112 +10,78 @@ name: GitHub Actions CI
10
10
11
11
# # change if caches needs to be refreshed
12
12
env :
13
- cache-version : v1
13
+ cache-version : v3
14
14
15
15
jobs :
16
16
R-CMD-check :
17
17
runs-on : ${{ matrix.config.os }}
18
+
18
19
name : ${{ matrix.config.os }} (${{ matrix.config.r }})
20
+
19
21
strategy :
20
22
fail-fast : false
21
23
matrix :
22
24
config :
23
- - {os: windows-latest, r: 'release', not_cran: 'true', rspm: "https://packagemanager.rstudio.com/all/latest"}
24
- - {os: macos-11, r: 'release', not_cran: 'true', rspm: "https://packagemanager.rstudio.com/all/latest"}
25
- - {os: macos-10.15, r: 'oldrel', not_cran: 'true', rspm: "https://packagemanager.rstudio.com/all/latest"}
26
- - {os: ubuntu-20.04, r: 'devel', not_cran: 'true', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
27
- - {os: ubuntu-20.04, r: 'release', not_cran: 'true', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
28
- - {os: ubuntu-20.04, r: 'oldrel', not_cran: 'true', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
25
+ - {os: windows-latest, r: 'oldrel', not_cran: 'true'}
26
+ - {os: windows-latest, r: 'release', not_cran: 'true'}
27
+ - {os: windows-latest, r: 'devel', not_cran: 'true'}
28
+ # - {os: windows-2019, r: 'oldrel', not_cran: 'true'}
29
+ - {os: macos-12, r: 'release', not_cran: 'true'}
30
+ # - {os: macos-11, r: 'oldrel', not_cran: 'true'}
31
+ - {os: ubuntu-latest, r: 'devel', not_cran: 'true'}
32
+ - {os: ubuntu-latest, r: 'release', not_cran: 'true'} # OK
33
+ - {os: ubuntu-latest, r: 'oldrel', not_cran: 'true'}
29
34
env :
30
- R_REMOTES_NO_ERRORS_FROM_WARNINGS : false
31
- RSPM : ${{ matrix.config.rspm }}
32
35
_R_CHECK_FORCE_SUGGESTS_ : true
33
36
GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
34
37
35
38
steps :
36
- - uses : actions/checkout@v2
37
-
38
- - uses : r-lib/actions/setup-r@v1
39
- with :
40
- r-version : ${{ matrix.config.r }}
41
- http-user-agent : ${{ matrix.config.http-user-agent }}
42
-
43
- - uses : r-lib/actions/setup-pandoc@v1
39
+ - if : runner.os == 'macOS'
40
+ run : brew install jags curl
44
41
45
- - name : Install remotes
42
+ - name : Install JAGS on Windows (R release)
43
+ if : (runner.os == 'windows') && (matrix.config.r != 'oldrel')
46
44
run : |
47
- install.packages('remotes')
48
- saveRDS(remotes::dev_package_deps(dependencies = TRUE), "depends.Rds", version = 2)
49
- shell : Rscript {0}
45
+ curl --progress-bar -s -o 'C:\JAGS-4.3.1.exe' -L 'https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Windows/JAGS-4.3.1.exe'
46
+ C:\JAGS-4.3.1.exe /S
50
47
51
- - name : Cache R packages
52
- if : runner.os != 'Windows'
53
- uses : actions/cache@v1
54
- with :
55
- path : ${{ env.R_LIBS_USER }}
56
- key : ${{ env.cache-version }}-${{ runner.os }}-r-${{ matrix.config.r }}-${{ hashFiles('depends.Rds') }}
57
- restore-keys : ${{ env.cache-version }}-${{ runner.os }}-r-${{ matrix.config.r }}-
58
-
59
- - name : Install system dependencies
60
- if : runner.os == 'Linux'
48
+ - name : Install JAGS on Windows (R oldrel)
49
+ if : (runner.os == 'windows') && (matrix.config.r == 'oldrel')
61
50
run : |
62
- while read -r cmd
63
- do
64
- eval sudo $cmd
65
- done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
51
+ curl --progress-bar -s -o 'C:\JAGS-4.3.0.exe' -L 'https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Windows/JAGS-4.3.0.exe'
52
+ C:\JAGS-4.3.0.exe /S
66
53
67
- - name : Install ghostscript (Linux)
68
- if : runner.os == 'Linux'
69
- run : |
70
- sudo apt-get install -y ghostscript
71
- sudo apt-get install -y curl
54
+ - uses : actions/checkout@v2
72
55
73
- - name : Install jags (macOS)
74
- if : runner.os == 'macOS'
75
- run : brew install jags curl
56
+ - uses : r-lib/actions/setup-pandoc@v2
76
57
77
- - name : Install jags (Windows)
78
- if : runner.os == 'windows'
79
- run : |
80
- curl --progress-bar -s -o 'C:\JAGS-4.3.1.exe' -L 'https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Windows/JAGS-4.3.1.exe'
81
- C:\JAGS-4.3.1.exe /S
58
+ - uses : r-lib/actions/setup-r@v2
59
+ with :
60
+ r-version : ${{ matrix.config.r }}
61
+ http-user-agent : ${{ matrix.config.http-user-agent }}
62
+ use-public-rspm : true
82
63
83
- - name : Install dependencies
84
- run : |
85
- remotes::install_deps(dependencies = TRUE)
86
- remotes::install_cran("rcmdcheck")
87
- remotes::install_cran("covr")
88
- shell : Rscript {0}
64
+ - uses : r-lib/actions/setup-r-dependencies@v2
65
+ with :
66
+ extra-packages : |
67
+ any::rcmdcheck
68
+ any::XML
69
+ any::covr
70
+ needs : check
89
71
90
- - name : Show session info
72
+ - name : Show session info before test
91
73
run : |
92
- options(width = 100)
93
- pkgs <- installed.packages()[, "Package"]
94
- sessioninfo::session_info(pkgs, include_base = TRUE)
74
+ print(utils::sessionInfo())
95
75
shell : Rscript {0}
96
76
97
- - name : Remove depends.Rds
77
+ - name : Show session curl info
98
78
run : |
99
- unlink("depends.Rds" )
79
+ print(curl::curl_version() )
100
80
shell : Rscript {0}
101
81
102
- - name : Check package
103
- env :
104
- _R_CHECK_CRAN_INCOMING_ : false
105
- run : rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
106
- shell : Rscript {0}
107
-
108
- - name : Show testthat output
109
- if : always()
110
- run : find check -name 'testthat.Rout*' -exec cat '{}' \; || true
111
- shell : bash
112
-
113
- - name : Upload check results
114
- if : failure()
115
- uses : actions/upload-artifact@main
82
+ - uses : r-lib/actions/check-r-package@v2
116
83
with :
117
- name : ${{ runner.os }}-r${{ matrix.config.r }}-results
118
- path : check
84
+ upload-snapshots : true
119
85
120
86
- name : Test coverage
121
87
run : |
0 commit comments