7373
7474 - uses : r-lib/actions/setup-pandoc@master
7575
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+
7680 # set date/week for use in cache creation
7781 # https://github.community/t5/GitHub-Actions/How-to-set-and-access-a-Workflow-variable/m-p/42970
7882 # - cache R packages daily
@@ -82,31 +86,17 @@ jobs:
8286 id : date
8387 run : echo "date=$(date '+%d-%m')" >> $GITHUB_OUTPUT
8488
85- - name : " [Cache] Cache R packages "
89+ - name : " [Cache] Restore R package cache "
8690 if : runner.os != 'Windows'
87- uses : pat-s/always-upload- cache@v1.2.0
91+ uses : actions/ cache/restore@v3
8892 with :
8993 path : ${{ env.R_LIBS_USER }}
9094 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
9995
10096 - name : " [Custom block] Test custom user block"
10197 run : |
10298 echo 'test'
10399
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-
110100 - name : " [Stage] Install"
111101 if : matrix.config.os != 'macOS-latest' || matrix.config.r != 'devel'
112102 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:
118108 echo -e 'options(Ncpus = 4, pkgType = "source", repos = structure(c(CRAN = "https://cloud.r-project.org/")))' > $HOME/.Rprofile
119109 Rscript -e "remotes::install_github('ropensci/tic')" -e "print(tic::dsl_load())" -e "tic::prepare_all_stages()" -e "tic::before_install()" -e "tic::install()"
120110
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+
121118 - name : " [Stage] Script"
122119 run : Rscript -e 'tic::script()'
123120
@@ -131,7 +128,7 @@ jobs:
131128
132129 - name : " [Stage] Upload R CMD check artifacts"
133130 if : failure()
134- uses : actions/upload-artifact@v3
131+ uses : actions/upload-artifact@v4
135132 with :
136133 name : ${{ runner.os }}-r${{ matrix.config.r }}-results
137134 path : check
0 commit comments