52
52
fail-fast : false
53
53
matrix :
54
54
config :
55
- - { os: ubuntu-latest, r: 'devel ', bioc: '3.18 ', cont: "bioconductor/bioconductor_docker:devel", rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal /latest" }
56
- - { os: macOS-latest, r: 'devel ', bioc: '3.18 '}
57
- - { os: windows-latest, r: 'devel ', bioc: '3.18 '}
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
58
# # Check https://github.com/r-lib/actions/tree/master/examples
59
59
# # for examples using the http-user-agent
60
60
env :
@@ -105,23 +105,23 @@ jobs:
105
105
uses : actions/cache@v3
106
106
with :
107
107
path : ${{ env.R_LIBS_USER }}
108
- key : ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-devel -${{ hashFiles('.github/depends.Rds') }}
109
- restore-keys : ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-devel -
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 -
110
110
111
111
- name : Cache R packages on Linux
112
112
if : " !contains(github.event.head_commit.message, '/nocache') && runner.os == 'Linux' "
113
113
uses : actions/cache@v3
114
114
with :
115
115
path : /home/runner/work/_temp/Library
116
- key : ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-devel -${{ hashFiles('.github/depends.Rds') }}
117
- restore-keys : ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-devel -
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 -
118
118
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"
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"
125
125
126
126
- name : Install macOS system dependencies
127
127
if : matrix.config.os == 'macOS-latest'
@@ -169,35 +169,19 @@ jobs:
169
169
## https://github.com/r-lib/remotes/issues/296
170
170
## Ideally, all dependencies should get installed in the first pass.
171
171
172
- ## Set the repos source depending on the OS
173
- ## Alternatively use https://storage.googleapis.com/bioconductor_docker/packages/
174
- ## though based on https://bit.ly/bioc2021-package-binaries
175
- ## the Azure link will be the main one going forward.
176
- gha_repos <- if(
177
- .Platform$OS.type == "unix" && Sys.info()["sysname"] != "Darwin"
178
- ) c(
179
- "AnVIL" = "https://bioconductordocker.blob.core.windows.net/packages/3.17/bioc",
180
- BiocManager::repositories()
181
- ) else BiocManager::repositories()
182
-
183
172
## For running the checks
184
173
message(paste('****', Sys.time(), 'installing rcmdcheck and BiocCheck ****'))
185
- install.packages(c("rcmdcheck", "BiocCheck"), repos = gha_repos )
174
+ install.packages(c("rcmdcheck", "BiocCheck"), repos = BiocManager::repositories() )
186
175
187
176
## Pass #1 at installing dependencies
188
- ## This pass uses AnVIL-powered fast binaries
189
- ## details at https://github.com/nturaga/bioc2021-bioconductor-binaries
190
- ## The speed gains only apply to the docker builds.
191
177
message(paste('****', Sys.time(), 'pass number 1 at installing dependencies: local dependencies ****'))
192
- remotes::install_local(dependencies = TRUE, repos = gha_repos , build_vignettes = FALSE, upgrade = TRUE)
178
+ remotes::install_local(dependencies = TRUE, repos = BiocManager::repositories() , build_vignettes = FALSE, upgrade = TRUE)
193
179
continue-on-error : true
194
180
shell : Rscript {0}
195
181
196
182
- name : Install dependencies pass 2
197
183
run : |
198
184
## Pass #2 at installing dependencies
199
- ## This pass does not use AnVIL and will thus update any packages
200
- ## that have seen been updated in Bioconductor
201
185
message(paste('****', Sys.time(), 'pass number 2 at installing dependencies: any remaining dependencies ****'))
202
186
remotes::install_local(dependencies = TRUE, repos = BiocManager::repositories(), build_vignettes = TRUE, upgrade = TRUE, force = TRUE)
203
187
shell : Rscript {0}
@@ -210,13 +194,13 @@ jobs:
210
194
shell : Rscript {0}
211
195
212
196
- name : Install covr
213
- 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'
214
198
run : |
215
199
remotes::install_cran("covr")
216
200
shell : Rscript {0}
217
201
218
202
- name : Install pkgdown
219
- 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'
220
204
run : |
221
205
remotes::install_github("r-lib/pkgdown")
222
206
shell : Rscript {0}
@@ -261,23 +245,22 @@ jobs:
261
245
dir('check', 'tar.gz$', full.names = TRUE),
262
246
`quit-with-status` = TRUE,
263
247
`no-check-R-ver` = TRUE,
264
- `no-check-bioc-help` = TRUE,
265
- `no-check-pkg-size` = TRUE
248
+ `no-check-bioc-help` = TRUE
266
249
)
267
250
shell : Rscript {0}
268
251
269
252
- name : Test coverage
270
- 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'
271
254
run : |
272
- covr::codecov()
255
+ covr::codecov(coverage = covr::package_coverage(type = "all") )
273
256
shell : Rscript {0}
274
257
275
258
- name : Install package
276
- 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'
277
260
run : R CMD INSTALL .
278
261
279
262
- name : Build pkgdown site
280
- if : github.ref == 'refs/heads/master ' && env.run_pkgdown == 'true' && runner.os == 'Linux'
263
+ if : github.ref == 'refs/heads/devel ' && env.run_pkgdown == 'true' && runner.os == 'Linux'
281
264
run : pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
282
265
shell : Rscript {0}
283
266
# # Note that you need to run pkgdown::deploy_to_branch(new_process = FALSE)
@@ -286,12 +269,12 @@ jobs:
286
269
# # makes the git history recognizable by pkgdown.
287
270
288
271
- name : Install deploy dependencies
289
- if : github.ref == 'refs/heads/master ' && env.run_pkgdown == 'true' && runner.os == 'Linux'
272
+ if : github.ref == 'refs/heads/devel ' && env.run_pkgdown == 'true' && runner.os == 'Linux'
290
273
run : |
291
274
apt-get update && apt-get -y install rsync
292
275
293
276
- name : Deploy pkgdown site to GitHub pages 🚀
294
- if : github.ref == 'refs/heads/master ' && env.run_pkgdown == 'true' && runner.os == 'Linux'
277
+ if : github.ref == 'refs/heads/devel ' && env.run_pkgdown == 'true' && runner.os == 'Linux'
295
278
uses : JamesIves/github-pages-deploy-action@releases/v4
296
279
with :
297
280
clean : false
@@ -302,21 +285,54 @@ jobs:
302
285
if : failure()
303
286
uses : actions/upload-artifact@master
304
287
with :
305
- name : ${{ runner.os }}-biocversion-devel-r-devel -results
288
+ name : ${{ runner.os }}-biocversion-devel-r-4.4 -results
306
289
path : check
307
290
308
- # # Note that DOCKER_PASSWORD is really a token for your dockerhub
309
- # # account, not your actual dockerhub account password.
310
- # # This comes from
311
- # # https://seandavi.github.io/BuildABiocWorkshop/articles/HOWTO_BUILD_WORKSHOP.html#6-add-secrets-to-github-repo
312
- # # Check https://github.com/docker/build-push-action/tree/releases/v1
313
- # # for more details.
314
- - uses : docker/build-push-action@v1
315
- if : " !contains(github.event.head_commit.message, '/nodocker') && env.run_docker == 'true' && runner.os == 'Linux' "
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
316
333
with :
317
- username : ${{ secrets.DOCKER_USERNAME }}
318
- password : ${{ secrets.DOCKER_PASSWORD }}
319
- repository : helenalc/muscat
320
- tag_with_ref : true
321
- tag_with_sha : true
322
- tags : latest
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