1- # Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2- # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3- # Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
4- # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
1+ # Derived from https://github.com/r-lib/actions/tree/v2/examples
2+ # Help debugging: https://github.com/r-lib/actions#where-to-find-help
53on :
64 push :
75 branches : [main, master]
@@ -12,80 +10,72 @@ name: R-CMD-check
1210
1311jobs :
1412 R-CMD-check :
15- runs-on : ${{ matrix.config. os }}
13+ runs-on : ${{ matrix.os }}
1614
17- name : ${{ matrix.config. os }} (${{ matrix.config. r }}, Julia ${{ matrix.config. julia }})
15+ name : " ${{ matrix.os }} (R- ${{ matrix.r }}, Julia- ${{ matrix.julia }})"
1816
1917 strategy :
2018 fail-fast : false
2119 matrix :
22- config :
23- - {os: macos-latest, r: 'release', julia: '1.9'}
24- - {os: macos-latest, r: 'devel', julia: '1.9', http-user-agent: 'release'}
25- - {os: macos-latest, r: 'oldrel-1', julia: '1.9'}
26- - {os: ubuntu-latest, r: 'devel', julia: '1.9', http-user-agent: 'release'}
27- - {os: ubuntu-latest, r: 'release', julia: '1.9'}
28- - {os: ubuntu-latest, r: 'oldrel-1', julia: '1.9'}
29- - {os: windows-latest, r: 'devel', julia: '1.9', http-user-agent: 'release'}
30- - {os: windows-latest, r: 'release', julia: '1.9'}
31- - {os: windows-latest, r: 'oldrel-1', julia: '1.9'}
20+ os : [ubuntu-latest, macos-latest, windows-latest]
21+ r : ['release', 'devel', 'oldrel-1']
22+ julia : ['1.9']
23+ include :
24+ - os : windows-latest
25+ r : ' devel'
26+ http-user-agent : ' release'
27+ - os : ubuntu-latest
28+ r : ' devel'
29+ http-user-agent : ' release'
30+ - os : macos-latest
31+ r : ' devel'
32+ http-user-agent : ' release'
3233
3334 env :
3435 GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
3536 R_KEEP_PKG_SOURCE : yes
36- R_LIBS_USER : C:\Temp\Library
3737 RSPM : https://packagemanager.posit.co/cran/latest
3838 RENV_CONFIG_REPOS_OVERRIDE : https://packagemanager.posit.co/cran/latest
3939 TZ : UTC
4040 _R_CHECK_SYSTEM_CLOCK_ : FALSE
4141 NOT_CRAN : true
4242
4343 steps :
44- - uses : actions/checkout@v3
44+ - uses : actions/checkout@v4
4545
4646 - uses : r-lib/actions/setup-pandoc@v2
4747
4848 - uses : r-lib/actions/setup-r@v2
4949 with :
50- r-version : ${{ matrix.config. r }}
51- http-user-agent : ${{ matrix.config. http-user-agent }}
50+ r-version : ${{ matrix.r }}
51+ http-user-agent : ${{ matrix.http-user-agent }}
5252 use-public-rspm : true
53-
54- - name : Cache R packages and Julia packages
55- uses : actions/cache@v3
56- with :
57- path : |
58- ${{ env.R_LIBS_USER }}/*
59- !${{ env.R_LIBS_USER }}/pak
60- ~/.julia/artifacts/
61- ~/.julia/packages/
62- key : ${{ matrix.config.r }}-${{ matrix.config.julia }}-${{ hashFiles('DESCRIPTION') }}
63-
53+
6454 - uses : julia-actions/setup-julia@v1
6555 with :
66- version : ${{ matrix.config.julia }}
67-
68- - name : Add dsBaseClient repository
56+ version : ${{ matrix.julia }}
57+
58+ - name : Cache R & Julia packages
59+ uses : actions/cache@v4
60+ with :
61+ path : |
62+ ~/.local/share/R/*
63+ ~/R/*
64+ ~/.julia/packages
65+ ~/.julia/artifacts
66+ key : ${{ runner.os }}-R${{ matrix.r }}-Julia${{ matrix.julia }}-${{ hashFiles('DESCRIPTION') }}
67+
68+ - name : Install Julia dependencies
6969 run : |
70- install.packages("JuliaConnectoR")
71- strings1 <- c('"Random"', '"Distributions"',
72- '"ForwardDiff"', '"Optim"', '"StatsBase"',
73- '"LineSearches"', '"LinearAlgebra"')
74- strings2 <- c("Random", "Distributions",
75- "ForwardDiff", "Optim", "StatsBase",
76- "LineSearches", "LinearAlgebra")
77- for (i in 1:length(strings1)){
78- if (!JuliaConnectoR::juliaEval(paste0(strings1[i], ' in keys(Pkg.project().dependencies)'))){
79- JuliaConnectoR::juliaEval("using Pkg")
80- JuliaConnectoR::juliaEval(paste0('Pkg.add("', strings2[i], '")') )
81- }
82- }
83- shell : Rscript {0}
70+ julia -e '
71+ using Pkg
72+ Pkg.add(["Random", "Distributions", "ForwardDiff", "Optim", "StatsBase",
73+ "LineSearches", "LinearAlgebra", "FreqTables", "DataFrames"])
74+ '
8475
8576 - uses : r-lib/actions/setup-r-dependencies@v2
8677 with :
8778 extra-packages : any::rcmdcheck
88- needs : check
8979
9080 - uses : r-lib/actions/check-r-package@v2
9181 with :
0 commit comments