73
73
74
74
- uses : r-lib/actions/setup-pandoc@master
75
75
76
+ - name : Install sys deps for Ubuntu
77
+ if : runner.os == 'Linux'
78
+ run : sudo apt update && sudo apt install -y libgit2-dev libcurl4-openssl-dev
79
+
76
80
# set date/week for use in cache creation
77
81
# https://github.community/t5/GitHub-Actions/How-to-set-and-access-a-Workflow-variable/m-p/42970
78
82
# - cache R packages daily
@@ -82,31 +86,17 @@ jobs:
82
86
id : date
83
87
run : echo "date=$(date '+%d-%m')" >> $GITHUB_OUTPUT
84
88
85
- - name : " [Cache] Cache R packages "
89
+ - name : " [Cache] Restore R package cache "
86
90
if : runner.os != 'Windows'
87
- uses : pat-s/always-upload- cache@v1.2.0
91
+ uses : actions/ cache/restore@v3
88
92
with :
89
93
path : ${{ env.R_LIBS_USER }}
90
94
key : ${{ runner.os }}-r-${{ matrix.config.r }}-${{steps.date.outputs.date}}
91
- restore-keys : ${{ runner.os }}-r-${{ matrix.config.r }}-${{steps.date.outputs.date}}
92
-
93
- # install ccache and write config file
94
- - name : " [Linux] ccache"
95
- if : runner.os == 'Linux'
96
- run : |
97
- sudo apt install ccache libcurl4-openssl-dev
98
- mkdir -p ~/.R && echo -e 'CC=ccache gcc -std=gnu99\nCXX=ccache g++\nFC=ccache gfortran\nF77=ccache gfortran' > $HOME/.R/Makevars
99
95
100
96
- name : " [Custom block] Test custom user block"
101
97
run : |
102
98
echo 'test'
103
99
104
- # for some strange Windows reason this step and the next one need to be decoupled
105
- - name : " [Stage] Prepare"
106
- run : |
107
- Rscript -e "if (!requireNamespace('remotes')) install.packages('remotes', type = 'source')"
108
- Rscript -e "if (getRversion() < '3.2' && !requireNamespace('curl')) install.packages('curl', type = 'source')"
109
-
110
100
- name : " [Stage] Install"
111
101
if : matrix.config.os != 'macOS-latest' || matrix.config.r != 'devel'
112
102
run : Rscript -e "remotes::install_github('ropensci/tic')" -e "print(tic::dsl_load())" -e "tic::prepare_all_stages()" -e "tic::before_install()" -e "tic::install()"
@@ -118,6 +108,13 @@ jobs:
118
108
echo -e 'options(Ncpus = 4, pkgType = "source", repos = structure(c(CRAN = "https://cloud.r-project.org/")))' > $HOME/.Rprofile
119
109
Rscript -e "remotes::install_github('ropensci/tic')" -e "print(tic::dsl_load())" -e "tic::prepare_all_stages()" -e "tic::before_install()" -e "tic::install()"
120
110
111
+ - name : " [Cache] Save R package cache"
112
+ if : runner.os != 'Windows' && always()
113
+ uses : actions/cache/save@v3
114
+ with :
115
+ path : ${{ env.R_LIBS_USER }}
116
+ key : ${{ runner.os }}-r-${{ matrix.config.r }}-${{steps.date.outputs.date}}
117
+
121
118
- name : " [Stage] Script"
122
119
run : Rscript -e 'tic::script()'
123
120
@@ -131,7 +128,7 @@ jobs:
131
128
132
129
- name : " [Stage] Upload R CMD check artifacts"
133
130
if : failure()
134
- uses : actions/upload-artifact@v3
131
+ uses : actions/upload-artifact@v4
135
132
with :
136
133
name : ${{ runner.os }}-r${{ matrix.config.r }}-results
137
134
path : check
0 commit comments