... | ... |
@@ -38,7 +38,8 @@ env: |
38 | 38 |
run_covr: 'true' |
39 | 39 |
run_pkgdown: 'true' |
40 | 40 |
has_RUnit: 'false' |
41 |
- cache-version: 'cache-v2' |
|
41 |
+ cache-version: 'cache-v1' |
|
42 |
+ run_docker: 'false' |
|
42 | 43 |
|
43 | 44 |
jobs: |
44 | 45 |
build-check: |
... | ... |
@@ -51,9 +52,11 @@ jobs: |
51 | 52 |
fail-fast: false |
52 | 53 |
matrix: |
53 | 54 |
config: |
54 |
- - { os: ubuntu-latest, r: '4.2', bioc: '3.16', cont: "bioconductor/bioconductor_docker:devel", rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest" } |
|
55 |
- - { os: macOS-latest, r: '4.2', bioc: '3.16'} |
|
56 |
- - { os: windows-latest, r: '4.2', bioc: '3.16'} |
|
55 |
+ - { os: ubuntu-latest, r: 'devel', bioc: '3.17', cont: "bioconductor/bioconductor_docker:devel", rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest" } |
|
56 |
+ - { os: macOS-latest, r: 'devel', bioc: '3.17'} |
|
57 |
+ - { os: windows-latest, r: 'devel', bioc: '3.17'} |
|
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,19 +79,20 @@ 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: | |
... | ... |
@@ -96,9 +100,9 @@ jobs: |
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 | 108 |
key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-devel-${{ hashFiles('.github/depends.Rds') }} |
... | ... |
@@ -106,7 +110,7 @@ jobs: |
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 | 116 |
key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-devel-${{ hashFiles('.github/depends.Rds') }} |
... | ... |
@@ -136,6 +140,9 @@ jobs: |
136 | 140 |
## For installing usethis's dependency gert |
137 | 141 |
brew install libgit2 |
138 | 142 |
|
143 |
+ ## Required for tcltk |
|
144 |
+ brew install xquartz --cask |
|
145 |
+ |
|
139 | 146 |
- name: Install Windows system dependencies |
140 | 147 |
if: runner.os == 'Windows' |
141 | 148 |
run: | |
... | ... |
@@ -150,7 +157,7 @@ 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 | 163 |
- name: Install dependencies pass 1 |
... | ... |
@@ -162,22 +169,37 @@ 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 |
|
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 |
+ ## For running the checks |
|
184 |
+ message(paste('****', Sys.time(), 'installing rcmdcheck and BiocCheck ****')) |
|
185 |
+ install.packages(c("rcmdcheck", "BiocCheck"), repos = gha_repos) |
|
186 |
+ |
|
165 | 187 |
## 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. |
|
166 | 191 |
message(paste('****', Sys.time(), 'pass number 1 at installing dependencies: local dependencies ****')) |
167 |
- remotes::install_local(dependencies = TRUE, repos = BiocManager::repositories(), build_vignettes = TRUE, upgrade = TRUE) |
|
192 |
+ remotes::install_local(dependencies = TRUE, repos = gha_repos, build_vignettes = FALSE, upgrade = TRUE) |
|
168 | 193 |
continue-on-error: true |
169 | 194 |
shell: Rscript {0} |
170 | 195 |
|
171 | 196 |
- name: Install dependencies pass 2 |
172 | 197 |
run: | |
173 | 198 |
## 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 |
|
174 | 201 |
message(paste('****', Sys.time(), 'pass number 2 at installing dependencies: any remaining dependencies ****')) |
175 |
- remotes::install_local(dependencies = TRUE, repos = BiocManager::repositories(), build_vignettes = TRUE, upgrade = TRUE) |
|
176 |
- |
|
177 |
- ## For running the checks |
|
178 |
- message(paste('****', Sys.time(), 'installing rcmdcheck and BiocCheck ****')) |
|
179 |
- remotes::install_cran("rcmdcheck") |
|
180 |
- BiocManager::install("BiocCheck") |
|
202 |
+ remotes::install_local(dependencies = TRUE, repos = BiocManager::repositories(), build_vignettes = TRUE, upgrade = TRUE, force = TRUE) |
|
181 | 203 |
shell: Rscript {0} |
182 | 204 |
|
183 | 205 |
- name: Install BiocGenerics |
... | ... |
@@ -196,7 +218,7 @@ jobs: |
196 | 218 |
- name: Install pkgdown |
197 | 219 |
if: github.ref == 'refs/heads/master' && env.run_pkgdown == 'true' && runner.os == 'Linux' |
198 | 220 |
run: | |
199 |
- remotes::install_cran("pkgdown") |
|
221 |
+ remotes::install_github("r-lib/pkgdown") |
|
200 | 222 |
shell: Rscript {0} |
201 | 223 |
|
202 | 224 |
- name: Session info |
... | ... |
@@ -209,10 +231,12 @@ jobs: |
209 | 231 |
- name: Run CMD check |
210 | 232 |
env: |
211 | 233 |
_R_CHECK_CRAN_INCOMING_: false |
234 |
+ DISPLAY: 99.0 |
|
212 | 235 |
run: | |
236 |
+ options(crayon.enabled = TRUE) |
|
213 | 237 |
rcmdcheck::rcmdcheck( |
214 |
- args = c("--no-build-vignettes", "--no-manual", "--timings"), |
|
215 |
- build_args = c("--no-manual", "--no-resave-data"), |
|
238 |
+ args = c("--no-manual", "--no-vignettes", "--timings"), |
|
239 |
+ build_args = c("--no-manual", "--keep-empty-dirs", "--no-resave-data"), |
|
216 | 240 |
error_on = "warning", |
217 | 241 |
check_dir = "check" |
218 | 242 |
) |
... | ... |
@@ -230,12 +254,13 @@ jobs: |
230 | 254 |
shell: Rscript {0} |
231 | 255 |
|
232 | 256 |
- name: Run BiocCheck |
257 |
+ env: |
|
258 |
+ DISPLAY: 99.0 |
|
233 | 259 |
run: | |
234 | 260 |
BiocCheck::BiocCheck( |
235 | 261 |
dir('check', 'tar.gz$', full.names = TRUE), |
236 | 262 |
`quit-with-status` = TRUE, |
237 | 263 |
`no-check-R-ver` = TRUE, |
238 |
- `no-check-pkg-size` = TRUE, |
|
239 | 264 |
`no-check-bioc-help` = TRUE |
240 | 265 |
) |
241 | 266 |
shell: Rscript {0} |
... | ... |
@@ -250,24 +275,80 @@ jobs: |
250 | 275 |
if: github.ref == 'refs/heads/master' && env.run_pkgdown == 'true' && runner.os == 'Linux' |
251 | 276 |
run: R CMD INSTALL . |
252 | 277 |
|
253 |
- - name: work around permission issue (since Apr 2022) |
|
254 |
- run: git config --global --add safe.directory /__w/Gviz/Gviz |
|
255 |
- |
|
256 |
- - name: Deploy package |
|
278 |
+ - name: Build pkgdown site |
|
257 | 279 |
if: github.ref == 'refs/heads/master' && env.run_pkgdown == 'true' && runner.os == 'Linux' |
258 |
- run: | |
|
259 |
- git config --local user.email "actions@github.com" |
|
260 |
- git config --local user.name "GitHub Actions" |
|
261 |
- Rscript -e "pkgdown::deploy_to_branch(new_process = FALSE)" |
|
262 |
- shell: bash {0} |
|
280 |
+ run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) |
|
281 |
+ shell: Rscript {0} |
|
263 | 282 |
## Note that you need to run pkgdown::deploy_to_branch(new_process = FALSE) |
264 | 283 |
## at least one locally before this will work. This creates the gh-pages |
265 | 284 |
## branch (erasing anything you haven't version controlled!) and |
266 | 285 |
## makes the git history recognizable by pkgdown. |
267 | 286 |
|
287 |
+ - name: Install deploy dependencies |
|
288 |
+ if: github.ref == 'refs/heads/master' && env.run_pkgdown == 'true' && runner.os == 'Linux' |
|
289 |
+ run: | |
|
290 |
+ apt-get update && apt-get -y install rsync |
|
291 |
+ |
|
292 |
+ - name: Deploy pkgdown site to GitHub pages 🚀 |
|
293 |
+ if: github.ref == 'refs/heads/master' && env.run_pkgdown == 'true' && runner.os == 'Linux' |
|
294 |
+ uses: JamesIves/github-pages-deploy-action@releases/v4 |
|
295 |
+ with: |
|
296 |
+ clean: false |
|
297 |
+ branch: gh-pages |
|
298 |
+ folder: docs |
|
299 |
+ |
|
268 | 300 |
- name: Upload check results |
269 | 301 |
if: failure() |
270 | 302 |
uses: actions/upload-artifact@master |
271 | 303 |
with: |
272 | 304 |
name: ${{ runner.os }}-biocversion-devel-r-devel-results |
273 | 305 |
path: check |
306 |
+ |
|
307 |
+ |
|
308 |
+ ## Code adapted from |
|
309 |
+ ## https://github.com/waldronlab/cBioPortalData/blob/e0440a4445f0cc731e426363a76faa22ee5e0f9d/.github/workflows/devel_check_dock.yml#L65-L92 |
|
310 |
+ docker-build-and-push: |
|
311 |
+ runs-on: ubuntu-latest |
|
312 |
+ needs: build-check |
|
313 |
+ steps: |
|
314 |
+ - name: Checkout Repository |
|
315 |
+ if: "!contains(github.event.head_commit.message, '/nodocker') && env.run_docker == 'true' && github.ref == 'refs/heads/master' " |
|
316 |
+ uses: actions/checkout@v3 |
|
317 |
+ |
|
318 |
+ - name: Register repo name |
|
319 |
+ if: "!contains(github.event.head_commit.message, '/nodocker') && env.run_docker == 'true' && github.ref == 'refs/heads/master' " |
|
320 |
+ id: reg_repo_name |
|
321 |
+ run: | |
|
322 |
+ echo CONT_IMG_NAME=$(echo ${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV |
|
323 |
+ |
|
324 |
+ - name: Set up QEMU |
|
325 |
+ if: "!contains(github.event.head_commit.message, '/nodocker') && env.run_docker == 'true' && github.ref == 'refs/heads/master' " |
|
326 |
+ uses: docker/setup-qemu-action@v2 |
|
327 |
+ |
|
328 |
+ - name: Set up Docker Buildx |
|
329 |
+ if: "!contains(github.event.head_commit.message, '/nodocker') && env.run_docker == 'true' && github.ref == 'refs/heads/master' " |
|
330 |
+ uses: docker/setup-buildx-action@v2 |
|
331 |
+ |
|
332 |
+ - name: Login to Docker Hub |
|
333 |
+ if: "!contains(github.event.head_commit.message, '/nodocker') && env.run_docker == 'true' && github.ref == 'refs/heads/master' " |
|
334 |
+ uses: docker/login-action@v2 |
|
335 |
+ with: |
|
336 |
+ username: ${{ secrets.DOCKERHUB_USERNAME }} |
|
337 |
+ password: ${{ secrets.DOCKERHUB_TOKEN }} |
|
338 |
+ ## Note that DOCKERHUB_TOKEN is really a token for your dockerhub |
|
339 |
+ ## account, not your actual dockerhub account password. You can get it |
|
340 |
+ ## from https://hub.docker.com/settings/security. |
|
341 |
+ ## Check https://github.com/docker/build-push-action/tree/v4.0.0 |
|
342 |
+ ## for more details. |
|
343 |
+ ## Alternatively, try checking |
|
344 |
+ ## https://seandavi.github.io/BuildABiocWorkshop/articles/HOWTO_BUILD_WORKSHOP.html. |
|
345 |
+ |
|
346 |
+ - name: Build and Push Docker |
|
347 |
+ if: "!contains(github.event.head_commit.message, '/nodocker') && env.run_docker == 'true' && github.ref == 'refs/heads/master' && success()" |
|
348 |
+ uses: docker/build-push-action@v4 |
|
349 |
+ with: |
|
350 |
+ context: . |
|
351 |
+ push: true |
|
352 |
+ tags: > |
|
353 |
+ ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.CONT_IMG_NAME }}:latest, |
|
354 |
+ ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.CONT_IMG_NAME }}:devel |
... | ... |
@@ -21,9 +21,9 @@ Artistic-2.0](https://img.shields.io/badge/License-Artistic%202.0-0298c3.svg)](h |
21 | 21 |
| OS | [](https://bioconductor.org/checkResults/release/bioc-LATEST/Gviz/) | [](https://bioconductor.org/checkResults/devel/bioc-LATEST/Gviz/) | |
22 | 22 |
| Bioc Last Update | [](https://bioconductor.org/checkResults/release/bioc-LATEST/Gviz/) | [](https://bioconductor.org/checkResults/devel/bioc-LATEST/Gviz/) | |
23 | 23 |
| Bioc Status | [](https://bioconductor.org/checkResults/release/bioc-LATEST/Gviz) | [](https://bioconductor.org/checkResults/devel/bioc-LATEST/Gviz) | |
24 |
-| GitHub Last Commit | [](https://github.com/ivanek/Gviz/tree/RELEASE_3_15) | [](https://github.com/ivanek/Gviz/tree/master/) | |
|
25 |
-| GitHub Actions | [](https://github.com/ivanek/Gviz/actions) | [](https://github.com/ivanek/Gviz/actions) | |
|
26 |
-| Coverage | [](https://codecov.io/gh/ivanek/Gviz/branch/RELEASE_3_15) | [](https://codecov.io/github/ivanek/Gviz) | |
|
24 |
+| GitHub Last Commit | [](https://github.com/ivanek/Gviz/tree/RELEASE_3_16) | [](https://github.com/ivanek/Gviz/tree/master/) | |
|
25 |
+| GitHub Actions | [](https://github.com/ivanek/Gviz/actions) | [](https://github.com/ivanek/Gviz/actions) | |
|
26 |
+| Coverage | [](https://codecov.io/gh/ivanek/Gviz/branch/RELEASE_3_16) | [](https://codecov.io/github/ivanek/Gviz) | |
|
27 | 27 |
|
28 | 28 |
## Authors |
29 | 29 |
|