39
39
run_pkgdown : ' false'
40
40
has_RUnit : ' false'
41
41
cache-version : ' cache-v1'
42
+ run_docker : ' false'
42
43
43
44
jobs :
44
45
build-check :
51
52
fail-fast : false
52
53
matrix :
53
54
config :
54
- - { os: ubuntu-latest, r: '4.0', bioc: '3.12', cont: "bioconductor/bioconductor_docker:RELEASE_3_12", rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest" }
55
- - { os: macOS-latest, r: '4.0', bioc: '3.12'}
56
- - { os: windows-latest, r: '4.0', bioc: '3.12'}
55
+ - { os: ubuntu-latest, r: '4.4', bioc: '3.20', cont: "bioconductor/bioconductor_docker:devel", rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest" }
56
+ - { os: macOS-latest, r: '4.4', bioc: '3.20'}
57
+ - { os: windows-latest, r: '4.4', bioc: '3.20'}
58
+ # # Check https://github.com/r-lib/actions/tree/master/examples
59
+ # # for examples using the http-user-agent
57
60
env :
58
61
R_REMOTES_NO_ERRORS_FROM_WARNINGS : true
59
62
RSPM : ${{ matrix.config.rspm }}
@@ -76,48 +79,49 @@ jobs:
76
79
# # https://github.com/r-lib/actions/blob/master/examples/check-standard.yaml
77
80
# # If they update their steps, we will also need to update ours.
78
81
- name : Checkout Repository
79
- uses : actions/checkout@v2
82
+ uses : actions/checkout@v3
80
83
81
84
# # R is already included in the Bioconductor docker images
82
85
- name : Setup R from r-lib
83
86
if : runner.os != 'Linux'
84
- uses : r-lib/actions/setup-r@master
87
+ uses : r-lib/actions/setup-r@v2
85
88
with :
86
89
r-version : ${{ matrix.config.r }}
90
+ http-user-agent : ${{ matrix.config.http-user-agent }}
87
91
88
92
# # pandoc is already included in the Bioconductor docker images
89
93
- name : Setup pandoc from r-lib
90
94
if : runner.os != 'Linux'
91
- uses : r-lib/actions/setup-pandoc@master
95
+ uses : r-lib/actions/setup-pandoc@v2
92
96
93
97
- name : Query dependencies
94
98
run : |
95
99
install.packages('remotes')
96
100
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
97
101
shell : Rscript {0}
98
102
99
- - name : Cache R packages
103
+ - name : Restore R package cache
100
104
if : " !contains(github.event.head_commit.message, '/nocache') && runner.os != 'Linux'"
101
- uses : actions/cache@v2
105
+ uses : actions/cache@v3
102
106
with :
103
107
path : ${{ env.R_LIBS_USER }}
104
- key : ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_12 -r-4.0 -${{ hashFiles('.github/depends.Rds') }}
105
- restore-keys : ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_12 -r-4.0 -
108
+ key : ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel -r-4.4 -${{ hashFiles('.github/depends.Rds') }}
109
+ restore-keys : ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel -r-4.4 -
106
110
107
111
- name : Cache R packages on Linux
108
112
if : " !contains(github.event.head_commit.message, '/nocache') && runner.os == 'Linux' "
109
- uses : actions/cache@v2
113
+ uses : actions/cache@v3
110
114
with :
111
115
path : /home/runner/work/_temp/Library
112
- key : ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_12 -r-4.0 -${{ hashFiles('.github/depends.Rds') }}
113
- restore-keys : ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_12 -r-4.0 -
116
+ key : ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel -r-4.4 -${{ hashFiles('.github/depends.Rds') }}
117
+ restore-keys : ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel -r-4.4 -
114
118
115
- - name : Install Linux system dependencies
116
- if : runner.os == 'Linux'
117
- run : |
118
- sysreqs=$(Rscript -e 'cat("apt-get update -y && apt-get install -y", paste(gsub("apt-get install -y ", "", remotes::system_requirements("ubuntu", "20.04")), collapse = " "))')
119
- echo $sysreqs
120
- sudo -s eval "$sysreqs"
119
+ # - name: Install Linux system dependencies
120
+ # if: runner.os == 'Linux'
121
+ # run: |
122
+ # sysreqs=$(Rscript -e 'cat("apt-get update -y && apt-get install -y", paste(gsub("apt-get install -y ", "", remotes::system_requirements("ubuntu", "20.04")), collapse = " "))')
123
+ # echo $sysreqs
124
+ # sudo -s eval "$sysreqs"
121
125
122
126
- name : Install macOS system dependencies
123
127
if : matrix.config.os == 'macOS-latest'
@@ -133,8 +137,11 @@ jobs:
133
137
## For textshaping, required by ragg, and required by pkgdown
134
138
brew install harfbuzz fribidi
135
139
136
- ## Helps compile RCurl from source
137
- brew uninstall curl
140
+ ## For installing usethis's dependency gert
141
+ brew install libgit2
142
+
143
+ ## Required for tcltk
144
+ brew install xquartz --cask
138
145
139
146
- name : Install Windows system dependencies
140
147
if : runner.os == 'Windows'
@@ -150,10 +157,10 @@ jobs:
150
157
151
158
- name : Set BiocVersion
152
159
run : |
153
- BiocManager::install(version = "${{ matrix.config.bioc }}", ask = FALSE)
160
+ BiocManager::install(version = "${{ matrix.config.bioc }}", ask = FALSE, force = TRUE )
154
161
shell : Rscript {0}
155
162
156
- - name : Install dependencies
163
+ - name : Install dependencies pass 1
157
164
run : |
158
165
## Try installing the package dependencies in steps. First the local
159
166
## dependencies, then any remaining dependencies to avoid the
@@ -162,23 +169,21 @@ jobs:
162
169
## https://github.com/r-lib/remotes/issues/296
163
170
## Ideally, all dependencies should get installed in the first pass.
164
171
165
- ## Temporary for now due to https://github.com/ropensci/RefManageR/issues/79
166
- remotes::install_github("ropensci/bibtex")
167
- remotes::install_github("ropensci/RefManageR")
168
- remotes::install_github("cboettig/knitcitations")
172
+ ## For running the checks
173
+ message(paste('****', Sys.time(), 'installing rcmdcheck and BiocCheck ****'))
174
+ install.packages(c("rcmdcheck", "BiocCheck"), repos = BiocManager::repositories())
169
175
170
176
## Pass #1 at installing dependencies
171
177
message(paste('****', Sys.time(), 'pass number 1 at installing dependencies: local dependencies ****'))
172
- remotes::install_local(dependencies = TRUE, repos = BiocManager::repositories(), build_vignettes = TRUE, upgrade = TRUE)
178
+ remotes::install_local(dependencies = TRUE, repos = BiocManager::repositories(), build_vignettes = FALSE, upgrade = TRUE)
179
+ continue-on-error : true
180
+ shell : Rscript {0}
173
181
182
+ - name : Install dependencies pass 2
183
+ run : |
174
184
## Pass #2 at installing dependencies
175
185
message(paste('****', Sys.time(), 'pass number 2 at installing dependencies: any remaining dependencies ****'))
176
- remotes::install_local(dependencies = TRUE, repos = BiocManager::repositories(), build_vignettes = TRUE, upgrade = TRUE)
177
-
178
- ## For running the checks
179
- message(paste('****', Sys.time(), 'installing rcmdcheck and BiocCheck ****'))
180
- remotes::install_cran("rcmdcheck")
181
- BiocManager::install("BiocCheck")
186
+ remotes::install_local(dependencies = TRUE, repos = BiocManager::repositories(), build_vignettes = TRUE, upgrade = TRUE, force = TRUE)
182
187
shell : Rscript {0}
183
188
184
189
- name : Install BiocGenerics
@@ -189,15 +194,15 @@ jobs:
189
194
shell : Rscript {0}
190
195
191
196
- name : Install covr
192
- if : github.ref == 'refs/heads/master ' && env.run_covr == 'true' && runner.os == 'Linux'
197
+ if : github.ref == 'refs/heads/devel ' && env.run_covr == 'true' && runner.os == 'Linux'
193
198
run : |
194
199
remotes::install_cran("covr")
195
200
shell : Rscript {0}
196
201
197
202
- name : Install pkgdown
198
- if : github.ref == 'refs/heads/master ' && env.run_pkgdown == 'true' && runner.os == 'Linux'
203
+ if : github.ref == 'refs/heads/devel ' && env.run_pkgdown == 'true' && runner.os == 'Linux'
199
204
run : |
200
- remotes::install_cran(" pkgdown")
205
+ remotes::install_github("r-lib/ pkgdown")
201
206
shell : Rscript {0}
202
207
203
208
- name : Session info
@@ -210,10 +215,12 @@ jobs:
210
215
- name : Run CMD check
211
216
env :
212
217
_R_CHECK_CRAN_INCOMING_ : false
218
+ DISPLAY : 99.0
213
219
run : |
220
+ options(crayon.enabled = TRUE)
214
221
rcmdcheck::rcmdcheck(
215
- args = c("--no-build-vignettes ", "--no-manual ", "--timings"),
216
- build_args = c("--no-manual", "--no-resave-data"),
222
+ args = c("--no-manual ", "--no-vignettes ", "--timings"),
223
+ build_args = c("--no-manual", "--keep-empty-dirs", "-- no-resave-data"),
217
224
error_on = "warning",
218
225
check_dir = "check"
219
226
)
@@ -231,6 +238,8 @@ jobs:
231
238
shell : Rscript {0}
232
239
233
240
- name : Run BiocCheck
241
+ env :
242
+ DISPLAY : 99.0
234
243
run : |
235
244
BiocCheck::BiocCheck(
236
245
dir('check', 'tar.gz$', full.names = TRUE),
@@ -241,30 +250,89 @@ jobs:
241
250
shell : Rscript {0}
242
251
243
252
- name : Test coverage
244
- if : github.ref == 'refs/heads/master ' && env.run_covr == 'true' && runner.os == 'Linux'
253
+ if : github.ref == 'refs/heads/devel ' && env.run_covr == 'true' && runner.os == 'Linux'
245
254
run : |
246
- covr::codecov()
255
+ covr::codecov(coverage = covr::package_coverage(type = "all") )
247
256
shell : Rscript {0}
248
257
249
258
- name : Install package
250
- if : github.ref == 'refs/heads/master ' && env.run_pkgdown == 'true' && runner.os == 'Linux'
259
+ if : github.ref == 'refs/heads/devel ' && env.run_pkgdown == 'true' && runner.os == 'Linux'
251
260
run : R CMD INSTALL .
252
261
253
- - name : Deploy package
254
- if : github.ref == 'refs/heads/master' && env.run_pkgdown == 'true' && runner.os == 'Linux'
255
- run : |
256
- git config --local user.email "actions@github.com"
257
- git config --local user.name "GitHub Actions"
258
- Rscript -e "pkgdown::deploy_to_branch(new_process = FALSE)"
259
- shell : bash {0}
262
+ - name : Build pkgdown site
263
+ if : github.ref == 'refs/heads/devel' && env.run_pkgdown == 'true' && runner.os == 'Linux'
264
+ run : pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
265
+ shell : Rscript {0}
260
266
# # Note that you need to run pkgdown::deploy_to_branch(new_process = FALSE)
261
267
# # at least one locally before this will work. This creates the gh-pages
262
268
# # branch (erasing anything you haven't version controlled!) and
263
269
# # makes the git history recognizable by pkgdown.
264
270
271
+ - name : Install deploy dependencies
272
+ if : github.ref == 'refs/heads/devel' && env.run_pkgdown == 'true' && runner.os == 'Linux'
273
+ run : |
274
+ apt-get update && apt-get -y install rsync
275
+
276
+ - name : Deploy pkgdown site to GitHub pages 🚀
277
+ if : github.ref == 'refs/heads/devel' && env.run_pkgdown == 'true' && runner.os == 'Linux'
278
+ uses : JamesIves/github-pages-deploy-action@releases/v4
279
+ with :
280
+ clean : false
281
+ branch : gh-pages
282
+ folder : docs
283
+
265
284
- name : Upload check results
266
285
if : failure()
267
286
uses : actions/upload-artifact@master
268
287
with :
269
- name : ${{ runner.os }}-biocversion-RELEASE_3_12 -r-4.0 -results
288
+ name : ${{ runner.os }}-biocversion-devel -r-4.4 -results
270
289
path : check
290
+
291
+
292
+ # # Code adapted from
293
+ # # https://github.com/waldronlab/cBioPortalData/blob/e0440a4445f0cc731e426363a76faa22ee5e0f9d/.github/workflows/devel_check_dock.yml#L65-L92
294
+ docker-build-and-push :
295
+ runs-on : ubuntu-latest
296
+ needs : build-check
297
+ steps :
298
+ - name : Checkout Repository
299
+ if : " !contains(github.event.head_commit.message, '/nodocker') && env.run_docker == 'true' && github.ref == 'refs/heads/devel'"
300
+ uses : actions/checkout@v3
301
+
302
+ - name : Register repo name
303
+ if : " !contains(github.event.head_commit.message, '/nodocker') && env.run_docker == 'true' && github.ref == 'refs/heads/devel'"
304
+ id : reg_repo_name
305
+ run : |
306
+ echo CONT_IMG_NAME=$(echo ${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
307
+
308
+ - name : Set up QEMU
309
+ if : " !contains(github.event.head_commit.message, '/nodocker') && env.run_docker == 'true' && github.ref == 'refs/heads/devel'"
310
+ uses : docker/setup-qemu-action@v2
311
+
312
+ - name : Set up Docker Buildx
313
+ if : " !contains(github.event.head_commit.message, '/nodocker') && env.run_docker == 'true' && github.ref == 'refs/heads/devel'"
314
+ uses : docker/setup-buildx-action@v2
315
+
316
+ - name : Login to Docker Hub
317
+ if : " !contains(github.event.head_commit.message, '/nodocker') && env.run_docker == 'true' && github.ref == 'refs/heads/devel'"
318
+ uses : docker/login-action@v2
319
+ with :
320
+ username : ${{ secrets.DOCKERHUB_USERNAME }}
321
+ password : ${{ secrets.DOCKERHUB_TOKEN }}
322
+ # # Note that DOCKERHUB_TOKEN is really a token for your dockerhub
323
+ # # account, not your actual dockerhub account password. You can get it
324
+ # # from https://hub.docker.com/settings/security.
325
+ # # Check https://github.com/docker/build-push-action/tree/v4.0.0
326
+ # # for more details.
327
+ # # Alternatively, try checking
328
+ # # https://seandavi.github.io/BuildABiocWorkshop/articles/HOWTO_BUILD_WORKSHOP.html.
329
+
330
+ - name : Build and Push Docker
331
+ if : " !contains(github.event.head_commit.message, '/nodocker') && env.run_docker == 'true' && github.ref == 'refs/heads/devel' && success()"
332
+ uses : docker/build-push-action@v4
333
+ with :
334
+ context : .
335
+ push : true
336
+ tags : >
337
+ ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.CONT_IMG_NAME }}:latest,
338
+ ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.CONT_IMG_NAME }}:devel
0 commit comments