8
8
9
9
name : R-CMD-check
10
10
11
+ # Increment this version when we want to clear cache
12
+ env :
13
+ cache-version : v1
14
+
11
15
jobs :
12
16
R-CMD-check :
13
17
runs-on : ${{ matrix.config.os }}
45
49
46
50
- uses : r-lib/actions/setup-pandoc@master
47
51
48
- - name : Install XQuartz on macOS
49
- if : runner.os == 'macOS'
50
- run : brew cask install xquartz
51
-
52
- # To install vdiffr, these three libraries/tools are needed:
53
- # - freetype (already installed, needed by systemfonts)
54
- # - cairo (not installed, needed by gdtools)
55
- # - pkg-config (not installed, needed to set proper build settings)
56
- - name : Install pkg-config and cairo on devel macOS
57
- if : runner.os == 'macOS' && matrix.config.r == 'devel'
58
- run : brew install pkg-config cairo
59
-
60
52
- name : Query dependencies
61
53
run : |
62
54
install.packages('remotes')
@@ -68,10 +60,10 @@ jobs:
68
60
uses : actions/cache@v1
69
61
with :
70
62
path : ${{ env.R_LIBS_USER }}
71
- key : ${{ runner.os }}-r-${{ matrix.config.r }}-${{ hashFiles('depends.Rds') }}
72
- restore-keys : ${{ runner.os }}-r-${{ matrix.config.r }}-
63
+ key : ${{ env.cache-version }}-${{ runner.os }}-r-${{ matrix.config.r }}-${{ hashFiles('depends.Rds') }}
64
+ restore-keys : ${{ env.cache-version }}-${{ runner.os }}-r-${{ matrix.config.r }}-
73
65
74
- - name : Install system dependencies
66
+ - name : Install system dependencies on Linux
75
67
if : runner.os == 'Linux'
76
68
env :
77
69
RHUB_PLATFORM : linux-x86_64-ubuntu-gcc
80
72
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
81
73
sudo -s eval "$sysreqs"
82
74
75
+ - name : Install system dependencies on macOS
76
+ if : runner.os == 'macOS'
77
+ run : |
78
+ # XQuartz is needed by vdiffr
79
+ brew cask install xquartz
80
+
81
+ # To install vdiffr, these three libraries/tools are needed in addition to XQuartz
82
+ # - freetype (already installed, needed by systemfonts)
83
+ # - cairo (not installed, needed by gdtools)
84
+ # - pkg-config (not installed, needed to set proper build settings)
85
+ brew install pkg-config cairo
86
+
87
+ # Since sf dependencies are a bit heavy, install them only when they are needed
88
+ SF_NEEDS_UPDATED=$(Rscript -e 'if (!"sf" %in% installed.packages()[,"Package"] || "sf" %in% old.packages()[,"Package"]) cat("yes")')
89
+ if [ "${SF_NEEDS_UPDATED}" == "yes" ]; then
90
+ brew install udunits gdal
91
+ fi
92
+
93
+ # TODO: Remove this when https://github.com/r-lib/xml2/issues/296 is fixed on CRAN
94
+ - name : Install the dev version of xml2 as a workaround
95
+ if : runner.os == 'macOS' && matrix.config.r == 'devel'
96
+ run : |
97
+ remotes::install_github('r-lib/xml2')
98
+ shell : Rscript {0}
99
+
83
100
- name : Install dependencies
84
101
run : |
85
102
remotes::install_deps(dependencies = TRUE)
96
113
with :
97
114
name : ${{ runner.os }}-r${{ matrix.config.r }}-results
98
115
path : check
99
-
100
- # TODO: uncomment this when we fix the failure of covr::codecov()
101
- # - name: Test coverage
102
- # if: matrix.config.os == 'macOS-latest' && matrix.config.r == '3.6'
103
- # run: covr::codecov()
104
- # shell: Rscript {0}
0 commit comments