@@ -34,8 +34,8 @@ name: R-CMD-check-bioc
3434# # Note that you can always run a GHA test without the cache by using the word
3535# # "/nocache" in the commit message.
3636env :
37- has_testthat : ' true '
38- run_covr : ' true '
37+ has_testthat : ' false '
38+ run_covr : ' false '
3939 run_pkgdown : ' false'
4040 has_RUnit : ' false'
4141 cache-version : ' cache-v1'
5252 fail-fast : false
5353 matrix :
5454 config :
55- - { os: ubuntu-latest, r: '4.3 ', bioc: '3.17 ', cont: "bioconductor/bioconductor_docker:RELEASE_3_17 ", rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest" }
55+ - { os: ubuntu-latest, r: '4.4 ', bioc: '3.19 ', cont: "bioconductor/bioconductor_docker:RELEASE_3_19 ", rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest" }
5656 # # Check https://github.com/r-lib/actions/tree/master/examples
5757 # # for examples using the http-user-agent
5858 env :
@@ -103,16 +103,16 @@ jobs:
103103 uses : actions/cache@v3
104104 with :
105105 path : ${{ env.R_LIBS_USER }}
106- key : ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_17 -r-4.3 -${{ hashFiles('.github/depends.Rds') }}
107- restore-keys : ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_17 -r-4.3 -
106+ key : ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_19 -r-4.4 -${{ hashFiles('.github/depends.Rds') }}
107+ restore-keys : ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_19 -r-4.4 -
108108
109109 - name : Cache R packages on Linux
110110 if : " !contains(github.event.head_commit.message, '/nocache') && runner.os == 'Linux' "
111111 uses : actions/cache@v3
112112 with :
113113 path : /home/runner/work/_temp/Library
114- key : ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_17 -r-4.3 -${{ hashFiles('.github/depends.Rds') }}
115- restore-keys : ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_17 -r-4.3 -
114+ key : ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_19 -r-4.4 -${{ hashFiles('.github/depends.Rds') }}
115+ restore-keys : ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_19 -r-4.4 -
116116
117117 - name : Install Linux system dependencies
118118 if : runner.os == 'Linux'
@@ -124,44 +124,18 @@ jobs:
124124 - name : Install GATK4
125125 if : runner.os == 'Linux'
126126 run : |
127- wget --no-verbose https://github.com/broadinstitute/gatk/releases/download/4.4.0 .0/gatk-4.4.0 .0.zip
127+ wget --no-verbose https://github.com/broadinstitute/gatk/releases/download/4.6.1 .0/gatk-4.6.1 .0.zip
128128 mkdir $HOME/tools
129- unzip gatk-4.4.0 .0.zip -d $HOME/tools
130- sudo -s ln -s "$HOME/tools/gatk-4.4.0 .0/gatk" /usr/local/bin/gatk
131- rm gatk-4.4.0 .0.zip
129+ unzip gatk-4.6.1 .0.zip -d $HOME/tools
130+ sudo -s ln -s "$HOME/tools/gatk-4.6.1 .0/gatk" /usr/local/bin/gatk
131+ rm gatk-4.6.1 .0.zip
132132
133133 - name : Show GATK4 version
134134 if : runner.os == 'Linux'
135135 run : |
136136 echo "$PATH"
137137 gatk --version
138138
139- - name : Install macOS system dependencies
140- if : matrix.config.os == 'macOS-latest'
141- run : |
142- ## Enable installing XML from source if needed
143- brew install libxml2
144- echo "XML_CONFIG=/usr/local/opt/libxml2/bin/xml2-config" >> $GITHUB_ENV
145-
146- ## Required to install magick as noted at
147- ## https://github.com/r-lib/usethis/commit/f1f1e0d10c1ebc75fd4c18fa7e2de4551fd9978f#diff-9bfee71065492f63457918efcd912cf2
148- brew install imagemagick@6
149-
150- ## For textshaping, required by ragg, and required by pkgdown
151- brew install harfbuzz fribidi
152-
153- ## For installing usethis's dependency gert
154- brew install libgit2
155-
156- ## Required for tcltk
157- brew install xquartz --cask
158-
159- - name : Install Windows system dependencies
160- if : runner.os == 'Windows'
161- run : |
162- ## Edit below if you have any Windows system dependencies
163- shell : Rscript {0}
164-
165139 - name : Install BiocManager
166140 run : |
167141 message(paste('****', Sys.time(), 'installing BiocManager ****'))
@@ -182,35 +156,19 @@ jobs:
182156 ## https://github.com/r-lib/remotes/issues/296
183157 ## Ideally, all dependencies should get installed in the first pass.
184158
185- ## Set the repos source depending on the OS
186- ## Alternatively use https://storage.googleapis.com/bioconductor_docker/packages/
187- ## though based on https://bit.ly/bioc2021-package-binaries
188- ## the Azure link will be the main one going forward.
189- gha_repos <- if(
190- .Platform$OS.type == "unix" && Sys.info()["sysname"] != "Darwin"
191- ) c(
192- "AnVIL" = "https://bioconductordocker.blob.core.windows.net/packages/3.17/bioc",
193- BiocManager::repositories()
194- ) else BiocManager::repositories()
195-
196159 ## For running the checks
197160 message(paste('****', Sys.time(), 'installing rcmdcheck and BiocCheck ****'))
198- install.packages(c("rcmdcheck", "BiocCheck"), repos = gha_repos )
161+ install.packages(c("rcmdcheck", "BiocCheck"), repos = BiocManager::repositories() )
199162
200163 ## Pass #1 at installing dependencies
201- ## This pass uses AnVIL-powered fast binaries
202- ## details at https://github.com/nturaga/bioc2021-bioconductor-binaries
203- ## The speed gains only apply to the docker builds.
204164 message(paste('****', Sys.time(), 'pass number 1 at installing dependencies: local dependencies ****'))
205- remotes::install_local(dependencies = TRUE, repos = gha_repos , build_vignettes = FALSE, upgrade = TRUE)
165+ remotes::install_local(dependencies = TRUE, repos = BiocManager::repositories() , build_vignettes = FALSE, upgrade = TRUE)
206166 continue-on-error : true
207167 shell : Rscript {0}
208168
209169 - name : Install dependencies pass 2
210170 run : |
211171 ## Pass #2 at installing dependencies
212- ## This pass does not use AnVIL and will thus update any packages
213- ## that have seen been updated in Bioconductor
214172 message(paste('****', Sys.time(), 'pass number 2 at installing dependencies: any remaining dependencies ****'))
215173 remotes::install_local(dependencies = TRUE, repos = BiocManager::repositories(), build_vignettes = TRUE, upgrade = TRUE, force = TRUE)
216174 shell : Rscript {0}
@@ -274,15 +232,14 @@ jobs:
274232 dir('check', 'tar.gz$', full.names = TRUE),
275233 `quit-with-status` = TRUE,
276234 `no-check-R-ver` = TRUE,
277- `no-check-pkg-size` = TRUE,
278235 `no-check-bioc-help` = TRUE
279236 )
280237 shell : Rscript {0}
281238
282239 - name : Test coverage
283240 if : github.ref == 'refs/heads/devel' && env.run_covr == 'true' && runner.os == 'Linux'
284241 run : |
285- covr::codecov()
242+ covr::codecov(coverage = covr::package_coverage(type = "all") )
286243 shell : Rscript {0}
287244
288245 - name : Install package
@@ -315,6 +272,54 @@ jobs:
315272 if : failure()
316273 uses : actions/upload-artifact@master
317274 with :
318- name : ${{ runner.os }}-biocversion-RELEASE_3_17 -r-4.3 -results
275+ name : ${{ runner.os }}-biocversion-RELEASE_3_19 -r-4.4 -results
319276 path : check
320277
278+
279+ # # Code adapted from
280+ # # https://github.com/waldronlab/cBioPortalData/blob/e0440a4445f0cc731e426363a76faa22ee5e0f9d/.github/workflows/devel_check_dock.yml#L65-L92
281+ docker-build-and-push :
282+ runs-on : ubuntu-latest
283+ needs : build-check
284+ steps :
285+ - name : Checkout Repository
286+ if : " !contains(github.event.head_commit.message, '/nodocker') && env.run_docker == 'true' && github.ref == 'refs/heads/devel'"
287+ uses : actions/checkout@v3
288+
289+ - name : Register repo name
290+ if : " !contains(github.event.head_commit.message, '/nodocker') && env.run_docker == 'true' && github.ref == 'refs/heads/devel'"
291+ id : reg_repo_name
292+ run : |
293+ echo CONT_IMG_NAME=$(echo ${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
294+
295+ - name : Set up QEMU
296+ if : " !contains(github.event.head_commit.message, '/nodocker') && env.run_docker == 'true' && github.ref == 'refs/heads/devel'"
297+ uses : docker/setup-qemu-action@v2
298+
299+ - name : Set up Docker Buildx
300+ if : " !contains(github.event.head_commit.message, '/nodocker') && env.run_docker == 'true' && github.ref == 'refs/heads/devel'"
301+ uses : docker/setup-buildx-action@v2
302+
303+ - name : Login to Docker Hub
304+ if : " !contains(github.event.head_commit.message, '/nodocker') && env.run_docker == 'true' && github.ref == 'refs/heads/devel'"
305+ uses : docker/login-action@v2
306+ with :
307+ username : ${{ secrets.DOCKERHUB_USERNAME }}
308+ password : ${{ secrets.DOCKERHUB_TOKEN }}
309+ # # Note that DOCKERHUB_TOKEN is really a token for your dockerhub
310+ # # account, not your actual dockerhub account password. You can get it
311+ # # from https://hub.docker.com/settings/security.
312+ # # Check https://github.com/docker/build-push-action/tree/v4.0.0
313+ # # for more details.
314+ # # Alternatively, try checking
315+ # # https://seandavi.github.io/BuildABiocWorkshop/articles/HOWTO_BUILD_WORKSHOP.html.
316+
317+ - name : Build and Push Docker
318+ if : " !contains(github.event.head_commit.message, '/nodocker') && env.run_docker == 'true' && github.ref == 'refs/heads/devel' && success()"
319+ uses : docker/build-push-action@v4
320+ with :
321+ context : .
322+ push : true
323+ tags : >
324+ ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.CONT_IMG_NAME }}:latest,
325+ ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.CONT_IMG_NAME }}:devel
0 commit comments