...
|
...
|
@@ -6,9 +6,6 @@
|
6
|
6
|
##
|
7
|
7
|
## You can add this workflow to other packages using:
|
8
|
8
|
## > biocthis::use_bioc_github_action()
|
9
|
|
-## or
|
10
|
|
-## > usethis::use_github_action("check-bioc", "https://bit.ly/biocthis_gha", "check-bioc.yml")
|
11
|
|
-## without having to install biocthis.
|
12
|
9
|
##
|
13
|
10
|
## Using GitHub Actions exposes you to many details about how R packages are
|
14
|
11
|
## compiled and installed in several operating system.s
|
...
|
...
|
@@ -19,25 +16,13 @@
|
19
|
16
|
## with the information that will make it easier for others to help you.
|
20
|
17
|
## Thank you!
|
21
|
18
|
|
22
|
|
-
|
23
|
|
-
|
24
|
19
|
## Acronyms:
|
25
|
20
|
## * GHA: GitHub Action
|
26
|
21
|
## * OS: operating system
|
27
|
22
|
|
28
|
|
-## Specify which branches you want this GHA to run on.
|
29
|
|
-## Bioconductor uses branches such as master (bioc-devel) and RELEASE_* like
|
30
|
|
-## RELEASE_3_10. For more details check
|
31
|
|
-## http://bioconductor.org/developers/how-to/git/
|
32
|
23
|
on:
|
33
|
24
|
push:
|
34
|
|
- branches:
|
35
|
|
- - master
|
36
|
|
- - 'RELEASE_*'
|
37
|
25
|
pull_request:
|
38
|
|
- branches:
|
39
|
|
- - master
|
40
|
|
- - 'RELEASE_*'
|
41
|
26
|
|
42
|
27
|
name: R-CMD-check-bioc
|
43
|
28
|
|
...
|
...
|
@@ -51,283 +36,58 @@ name: R-CMD-check-bioc
|
51
|
36
|
env:
|
52
|
37
|
has_testthat: 'true'
|
53
|
38
|
run_covr: 'true'
|
54
|
|
- run_pkgdown: 'false'
|
|
39
|
+ run_pkgdown: 'true'
|
55
|
40
|
has_RUnit: 'false'
|
56
|
41
|
cache-version: 'cache-v1'
|
57
|
42
|
|
58
|
43
|
jobs:
|
59
|
|
- ## This first job uses the GitHub repository branch name to infer what
|
60
|
|
- ## version of Bioconductor we will be working on.
|
61
|
|
- define-docker-info:
|
62
|
|
- runs-on: ubuntu-latest
|
63
|
|
- outputs:
|
64
|
|
- imagename: ${{ steps.findinfo.outputs.imagename }}
|
65
|
|
- biocversion: ${{ steps.findinfo.outputs.biocversion }}
|
66
|
|
- steps:
|
67
|
|
- - id: findinfo
|
68
|
|
- run: |
|
69
|
|
- ## Find what Bioconductor RELEASE branch we are working on
|
70
|
|
- ## otherwise, assume we are working on bioc-devel.
|
71
|
|
- if echo "$GITHUB_REF" | grep -q "RELEASE_"; then
|
72
|
|
- biocversion="$(basename -- $GITHUB_REF)"
|
73
|
|
- else
|
74
|
|
- biocversion="devel"
|
75
|
|
- fi
|
76
|
|
- ## Define the image name and print the information
|
77
|
|
- imagename="bioconductor/bioconductor_docker:${biocversion}"
|
78
|
|
- echo $imagename
|
79
|
|
- echo $biocversion
|
80
|
|
-
|
81
|
|
- ## Save the information for the next job
|
82
|
|
- echo "::set-output name=imagename::${imagename}"
|
83
|
|
- echo "::set-output name=biocversion::${biocversion}"
|
84
|
|
-
|
85
|
|
- R-CMD-check-bioc:
|
86
|
|
- ## This job then checks the R package using the Bioconductor docker that
|
87
|
|
- ## was defined by the previous job. This job will determine what version of
|
88
|
|
- ## R to use for the macOS and Windows builds on the next job.
|
89
|
|
- runs-on: ubuntu-latest
|
90
|
|
- needs: define-docker-info
|
91
|
|
-
|
92
|
|
- ## Name shown on the GHA log
|
93
|
|
- name: ubuntu-latest (r-biocdocker bioc-${{ needs.define-docker-info.outputs.biocversion }})
|
94
|
|
-
|
95
|
|
- ## Information used by the next job that will run on macOS and Windows
|
96
|
|
- outputs:
|
97
|
|
- rversion: ${{ steps.findrversion.outputs.rversion }}
|
98
|
|
- biocversionnum: ${{ steps.findrversion.outputs.biocversionnum }}
|
99
|
|
-
|
|
44
|
+ build-check:
|
|
45
|
+ runs-on: ${{ matrix.config.os }}
|
|
46
|
+ name: ${{ matrix.config.os }} (${{ matrix.config.r }})
|
|
47
|
+ container: ${{ matrix.config.cont }}
|
100
|
48
|
## Environment variables unique to this job.
|
|
49
|
+
|
|
50
|
+ strategy:
|
|
51
|
+ fail-fast: false
|
|
52
|
+ matrix:
|
|
53
|
+ 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'}
|
101
|
57
|
env:
|
102
|
58
|
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
|
103
|
|
- TZ: UTC
|
|
59
|
+ RSPM: ${{ matrix.config.rspm }}
|
104
|
60
|
NOT_CRAN: true
|
|
61
|
+ TZ: UTC
|
105
|
62
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
106
|
63
|
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
|
107
|
64
|
|
108
|
|
- ## The docker container to use. Note that we link a directory on the GHA
|
109
|
|
- ## runner to a docker directory, such that we can then cache the linked
|
110
|
|
- ## directory. This directory will contain the R packages used.
|
111
|
|
- container:
|
112
|
|
- image: ${{ needs.define-docker-info.outputs.imagename }}
|
113
|
|
- volumes:
|
114
|
|
- - /home/runner/work/_temp/Library:/usr/local/lib/R/host-site-library
|
115
|
|
-
|
116
|
65
|
steps:
|
117
|
|
- - name: Install latest git
|
|
66
|
+
|
|
67
|
+ ## Set the R library to the directory matching the
|
|
68
|
+ ## R packages cache step further below when running on Docker (Linux).
|
|
69
|
+ - name: Set R Library home on Linux
|
|
70
|
+ if: runner.os == 'Linux'
|
118
|
71
|
run: |
|
119
|
|
- ## git version provided
|
120
|
|
- git --version
|
121
|
|
- ## to be able to install software properties
|
122
|
|
- sudo apt-get update -y
|
123
|
|
- ## to be able to use add-apt-repository
|
124
|
|
- sudo apt-get install software-properties-common -y
|
125
|
|
- ## to use stable releases of git that are already in a PPA at
|
126
|
|
- ## https://launchpad.net/~git-core/+archive/ubuntu/candidate
|
127
|
|
- sudo add-apt-repository ppa:git-core/candidate -y
|
128
|
|
- ## Update
|
129
|
|
- sudo apt-get update -y
|
130
|
|
- ## Upgrade git and other tools
|
131
|
|
- sudo apt-get upgrade -y
|
132
|
|
- ## latest git version
|
133
|
|
- git --version
|
134
|
|
- shell: bash {0}
|
135
|
|
- ## Related to https://github.com/rocker-org/rocker-versioned2/issues/52
|
|
72
|
+ mkdir /__w/_temp/Library
|
|
73
|
+ echo ".libPaths('/__w/_temp/Library')" > ~/.Rprofile
|
136
|
74
|
|
137
|
75
|
## Most of these steps are the same as the ones in
|
138
|
76
|
## https://github.com/r-lib/actions/blob/master/examples/check-standard.yaml
|
139
|
77
|
## If they update their steps, we will also need to update ours.
|
140
|
|
- - uses: actions/checkout@v2
|
141
|
|
-
|
142
|
|
- - name: Query dependencies
|
143
|
|
- run: |
|
144
|
|
- install.packages('remotes')
|
145
|
|
- saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
|
146
|
|
- message(paste('****', Sys.time(), 'installing BiocManager ****'))
|
147
|
|
- remotes::install_cran("BiocManager")
|
148
|
|
- shell: Rscript {0}
|
149
|
|
-
|
150
|
|
- ## Find the corresponding R version based on the Bioconductor version
|
151
|
|
- ## to use for the macOS and Windows checks by the next GHA job
|
152
|
|
- - id: findrversion
|
153
|
|
- name: Find Bioc and R versions
|
154
|
|
- run: |
|
155
|
|
- ## Find what branch we are working on
|
156
|
|
- if echo "$GITHUB_REF" | grep -q "master"; then
|
157
|
|
- biocversion="devel"
|
158
|
|
- elif echo "$GITHUB_REF" | grep -q "RELEASE_"; then
|
159
|
|
- biocversion="release"
|
160
|
|
- fi
|
161
|
|
-
|
162
|
|
- ## Define the R and Bioconductor version numbers
|
163
|
|
- biocversionnum=$(Rscript -e "info <- BiocManager:::.version_map_get_online('https://bioconductor.org/config.yaml'); res <- subset(info, BiocStatus == '${biocversion}')[, 'Bioc']; cat(as.character(res))")
|
164
|
|
- rversion=$(Rscript -e "info <- BiocManager:::.version_map_get_online('https://bioconductor.org/config.yaml'); res <- subset(info, BiocStatus == '${biocversion}')[, 'R']; cat(as.character(res))")
|
165
|
|
-
|
166
|
|
- ## Print the results
|
167
|
|
- echo $biocversion
|
168
|
|
- echo $biocversionnum
|
169
|
|
- echo $rversion
|
170
|
|
-
|
171
|
|
- ## Save the info for the next job
|
172
|
|
- echo "::set-output name=rversion::${rversion}"
|
173
|
|
- echo "::set-output name=biocversionnum::${biocversionnum}"
|
174
|
|
- shell:
|
175
|
|
- bash {0}
|
176
|
|
-
|
177
|
|
- - name: Cache R packages
|
178
|
|
- if: "!contains(github.event.head_commit.message, '/nocache')"
|
179
|
|
- uses: actions/cache@v1
|
180
|
|
- with:
|
181
|
|
- path: /home/runner/work/_temp/Library
|
182
|
|
- key: ${{ env.cache-version }}-${{ runner.os }}-biocdocker-biocbranch-${{ needs.define-docker-info.outputs.biocversion }}-r-${{ steps.findrversion.outputs.rversion }}-bioc-${{ steps.findrversion.outputs.biocversionnum }}-${{ hashFiles('.github/depends.Rds') }}
|
183
|
|
- restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocdocker-biocbranch-${{ needs.define-docker-info.outputs.biocversion }}-r-${{ steps.findrversion.outputs.rversion }}-bioc-${{ steps.findrversion.outputs.biocversionnum }}-
|
184
|
|
-
|
185
|
|
- - name: Install dependencies
|
186
|
|
- run: |
|
187
|
|
- ## Try installing the package dependencies in steps. First the local
|
188
|
|
- ## dependencies, then any remaining dependencies to avoid the
|
189
|
|
- ## issues described at
|
190
|
|
- ## https://stat.ethz.ch/pipermail/bioc-devel/2020-April/016675.html
|
191
|
|
- ## https://github.com/r-lib/remotes/issues/296
|
192
|
|
- ## Ideally, all dependencies should get installed in the first pass.
|
193
|
|
-
|
194
|
|
- ## Pass #1 at installing dependencies
|
195
|
|
- message(paste('****', Sys.time(), 'pass number 1 at installing dependencies: local dependencies ****'))
|
196
|
|
- local_deps <- remotes::local_package_deps(dependencies = TRUE)
|
197
|
|
- deps <- remotes::dev_package_deps(dependencies = TRUE, repos = BiocManager::repositories())
|
198
|
|
- BiocManager::install(local_deps[local_deps %in% deps$package[deps$diff != 0]])
|
199
|
|
-
|
200
|
|
- ## Pass #2 at installing dependencies
|
201
|
|
- message(paste('****', Sys.time(), 'pass number 2 at installing dependencies: any remaining dependencies ****'))
|
202
|
|
- deps <- remotes::dev_package_deps(dependencies = TRUE, repos = BiocManager::repositories())
|
203
|
|
- BiocManager::install(deps$package[deps$diff != 0])
|
204
|
|
-
|
205
|
|
- ## For running the checks
|
206
|
|
- message(paste('****', Sys.time(), 'installing rcmdcheck and BiocCheck ****'))
|
207
|
|
- remotes::install_cran("rcmdcheck")
|
208
|
|
- BiocManager::install("BiocCheck")
|
209
|
|
- shell: Rscript {0}
|
210
|
|
-
|
211
|
|
- - name: Session info
|
212
|
|
- run: |
|
213
|
|
- options(width = 100)
|
214
|
|
- pkgs <- installed.packages()[, "Package"]
|
215
|
|
- sessioninfo::session_info(pkgs, include_base = TRUE)
|
216
|
|
- shell: Rscript {0}
|
217
|
|
-
|
218
|
|
- - name: Check
|
219
|
|
- env:
|
220
|
|
- _R_CHECK_CRAN_INCOMING_: false
|
221
|
|
- run: |
|
222
|
|
- rcmdcheck::rcmdcheck(
|
223
|
|
- args = c("--no-build-vignettes", "--no-manual", "--timings"),
|
224
|
|
- build_args = c("--no-manual", "--no-resave-data"),
|
225
|
|
- error_on = "warning",
|
226
|
|
- check_dir = "check"
|
227
|
|
- )
|
228
|
|
- shell: Rscript {0}
|
229
|
|
-
|
230
|
|
- - name: Reveal testthat details
|
231
|
|
- if: env.has_testthat == 'true'
|
232
|
|
- run: find . -name testthat.Rout -exec cat '{}' ';'
|
233
|
|
-
|
234
|
|
- - name: Run RUnit tests
|
235
|
|
- if: env.has_RUnit == 'true'
|
236
|
|
- run: |
|
237
|
|
- ## Install BiocGenerics
|
238
|
|
- BiocManager::install("BiocGenerics")
|
239
|
|
- BiocGenerics:::testPackage()
|
240
|
|
- shell: Rscript {0}
|
241
|
|
-
|
242
|
|
- - name: BiocCheck
|
243
|
|
- run: |
|
244
|
|
- ## This syntax works on Windows as well as other OS
|
245
|
|
- ## plus it doesn't break the GHA workflow in case BiocCheck finds
|
246
|
|
- ## an error (for example, the package is bigger than the maximum
|
247
|
|
- ## allowed size). We want the rest of the GHA to proceed even if
|
248
|
|
- ## there is a BiocCheck error in order to see the full output and
|
249
|
|
- ## run the tests on all operating systems.
|
250
|
|
- BiocCheck::BiocCheck(dir('check', 'tar.gz$', full.names = TRUE), `no-check-R-ver` = TRUE, `no-check-bioc-help` = TRUE)
|
251
|
|
- ## For more options check http://bioconductor.org/packages/release/bioc/vignettes/BiocCheck/inst/doc/BiocCheck.html
|
252
|
|
- shell: Rscript {0}
|
253
|
|
-
|
254
|
|
- - name: Install covr
|
255
|
|
- if: github.ref == 'refs/heads/master' && env.run_covr == 'true'
|
256
|
|
- run: |
|
257
|
|
- remotes::install_cran("covr")
|
258
|
|
- shell: Rscript {0}
|
259
|
|
-
|
260
|
|
- - name: Test coverage
|
261
|
|
- if: github.ref == 'refs/heads/master' && env.run_covr == 'true'
|
262
|
|
- run: |
|
263
|
|
- covr::codecov()
|
264
|
|
- shell: Rscript {0}
|
265
|
|
-
|
266
|
|
- - name: Install pkgdown
|
267
|
|
- if: github.ref == 'refs/heads/master' && env.run_pkgdown == 'true'
|
268
|
|
- run: |
|
269
|
|
- remotes::install_cran("pkgdown")
|
270
|
|
- shell: Rscript {0}
|
271
|
|
-
|
272
|
|
- - name: Install package
|
273
|
|
- if: github.ref == 'refs/heads/master' && env.run_pkgdown == 'true'
|
274
|
|
- run: R CMD INSTALL .
|
275
|
|
-
|
276
|
|
- - name: Deploy package
|
277
|
|
- if: github.ref == 'refs/heads/master' && env.run_pkgdown == 'true'
|
278
|
|
- run: |
|
279
|
|
- git config --local user.email "action@github.com"
|
280
|
|
- git config --local user.name "GitHub Action"
|
281
|
|
- Rscript -e "pkgdown::deploy_to_branch(new_process = FALSE)"
|
282
|
|
- shell: bash {0}
|
283
|
|
- ## Note that you need to run pkgdown::deploy_to_branch(new_process = FALSE)
|
284
|
|
- ## at least one locally before this will work. This creates the gh-pages
|
285
|
|
- ## branch (erasing anything you haven't version controlled!) and
|
286
|
|
- ## makes the git history recognizable by pkgdown.
|
287
|
|
-
|
288
|
|
- - name: Upload check results
|
289
|
|
- if: failure()
|
290
|
|
- uses: actions/upload-artifact@master
|
291
|
|
- with:
|
292
|
|
- name: ${{ runner.os }}-biocdocker-biocbranch-${{ needs.define-docker-info.outputs.biocversion }}-r-${{ steps.findrversion.outputs.rversion }}-bioc-${{ steps.findrversion.outputs.biocversionnum }}-results
|
293
|
|
- path: check
|
294
|
|
-
|
295
|
|
- ## Run R CMD check on both macOS and Windows. You can also run the
|
296
|
|
- ## tests on Linux outside of the Bioconductor docker environment. If you
|
297
|
|
- ## do so, you might have to install system dependencies on Linux
|
298
|
|
- ## Bioconductor's docker includes all the system dependencies required by
|
299
|
|
- ## Bioconductor packages and their dependencies (which includes many CRAN
|
300
|
|
- ## dependencies as well, thus making this workflow useful beyond Bioconductor)
|
301
|
|
- R-CMD-check-r-lib:
|
302
|
|
- runs-on: ${{ matrix.config.os }}
|
303
|
|
- needs: [define-docker-info, R-CMD-check-bioc]
|
304
|
|
-
|
305
|
|
- name: ${{ matrix.config.os }} (r-${{ needs.R-CMD-check-bioc.outputs.rversion }} bioc-${{ needs.define-docker-info.outputs.biocversion }})
|
306
|
|
-
|
307
|
|
- strategy:
|
308
|
|
- fail-fast: false
|
309
|
|
- matrix:
|
310
|
|
- config:
|
311
|
|
- ## Comment/Un-comment in case you also want to run other versions
|
312
|
|
- - {os: windows-latest}
|
313
|
|
- - {os: macOS-latest}
|
314
|
|
- # - {os: ubuntu-16.04, rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
|
315
|
|
-
|
316
|
|
- env:
|
317
|
|
- R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
|
318
|
|
- RSPM: ${{ matrix.config.rspm }}
|
319
|
|
- BIOCVERSIONNUM: ${{ needs.R-CMD-check-bioc.outputs.biocversionnum }}
|
320
|
|
- GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
|
321
|
|
-
|
322
|
|
- steps:
|
323
|
|
- - uses: actions/checkout@v2
|
|
78
|
+ - name: Checkout Repository
|
|
79
|
+ uses: actions/checkout@v2
|
324
|
80
|
|
|
81
|
+ ## R is already included in the Bioconductor docker images
|
325
|
82
|
- name: Setup R from r-lib
|
|
83
|
+ if: runner.os != 'Linux'
|
326
|
84
|
uses: r-lib/actions/setup-r@master
|
327
|
85
|
with:
|
328
|
|
- r-version: ${{ needs.R-CMD-check-bioc.outputs.rversion }}
|
|
86
|
+ r-version: ${{ matrix.config.r }}
|
329
|
87
|
|
|
88
|
+ ## pandoc is already included in the Bioconductor docker images
|
330
|
89
|
- name: Setup pandoc from r-lib
|
|
90
|
+ if: runner.os != 'Linux'
|
331
|
91
|
uses: r-lib/actions/setup-pandoc@master
|
332
|
92
|
|
333
|
93
|
- name: Query dependencies
|
...
|
...
|
@@ -337,20 +97,26 @@ jobs:
|
337
|
97
|
shell: Rscript {0}
|
338
|
98
|
|
339
|
99
|
- name: Cache R packages
|
340
|
|
- if: "!contains(github.event.head_commit.message, '/nocache')"
|
341
|
|
- uses: actions/cache@v1
|
|
100
|
+ if: "!contains(github.event.head_commit.message, '/nocache') && runner.os != 'Linux'"
|
|
101
|
+ uses: actions/cache@v2
|
342
|
102
|
with:
|
343
|
103
|
path: ${{ env.R_LIBS_USER }}
|
344
|
|
- key: ${{ env.cache-version }}-${{ runner.os }}-biocbranch-${{ needs.define-docker-info.outputs.biocversion }}-r-${{ needs.R-CMD-check-bioc.outputs.rversion }}-bioc-${{ needs.define-docker-info.outputs.biocversion }}-${{ hashFiles('.github/depends.Rds') }}
|
345
|
|
- restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocbranch-${{ needs.define-docker-info.outputs.biocversion }}-r-${{ needs.R-CMD-check-bioc.outputs.rversion }}-bioc-${{ needs.define-docker-info.outputs.biocversion }}-
|
|
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-
|
|
106
|
+
|
|
107
|
+ - name: Cache R packages on Linux
|
|
108
|
+ if: "!contains(github.event.head_commit.message, '/nocache') && runner.os == 'Linux' "
|
|
109
|
+ uses: actions/cache@v2
|
|
110
|
+ with:
|
|
111
|
+ 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-
|
346
|
114
|
|
347
|
115
|
- name: Install Linux system dependencies
|
348
|
116
|
if: runner.os == 'Linux'
|
349
|
|
- env:
|
350
|
|
- RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
|
351
|
117
|
run: |
|
352
|
|
- Rscript -e "remotes::install_github('r-hub/sysreqs')"
|
353
|
|
- sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
|
|
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
|
354
|
120
|
sudo -s eval "$sysreqs"
|
355
|
121
|
|
356
|
122
|
- name: Install macOS system dependencies
|
...
|
...
|
@@ -358,12 +124,18 @@ jobs:
|
358
|
124
|
run: |
|
359
|
125
|
## Enable installing XML from source if needed
|
360
|
126
|
brew install libxml2
|
361
|
|
- echo "::set-env name=XML_CONFIG::/usr/local/opt/libxml2/bin/xml2-config"
|
|
127
|
+ echo "XML_CONFIG=/usr/local/opt/libxml2/bin/xml2-config" >> $GITHUB_ENV
|
362
|
128
|
|
363
|
129
|
## Required to install magick as noted at
|
364
|
130
|
## https://github.com/r-lib/usethis/commit/f1f1e0d10c1ebc75fd4c18fa7e2de4551fd9978f#diff-9bfee71065492f63457918efcd912cf2
|
365
|
131
|
brew install imagemagick@6
|
366
|
132
|
|
|
133
|
+ ## For textshaping, required by ragg, and required by pkgdown
|
|
134
|
+ brew install harfbuzz fribidi
|
|
135
|
+
|
|
136
|
+ ## See if this helps get RCurl installed
|
|
137
|
+ brew uninstall curl
|
|
138
|
+
|
367
|
139
|
- name: Install Windows system dependencies
|
368
|
140
|
if: runner.os == 'Windows'
|
369
|
141
|
run: |
|
...
|
...
|
@@ -378,7 +150,7 @@ jobs:
|
378
|
150
|
|
379
|
151
|
- name: Set BiocVersion
|
380
|
152
|
run: |
|
381
|
|
- BiocManager::install(version = Sys.getenv('BIOCVERSIONNUM'), ask = FALSE)
|
|
153
|
+ BiocManager::install(version = "${{ matrix.config.bioc }}", ask = FALSE)
|
382
|
154
|
shell: Rscript {0}
|
383
|
155
|
|
384
|
156
|
- name: Install dependencies
|
...
|
...
|
@@ -390,16 +162,18 @@ jobs:
|
390
|
162
|
## https://github.com/r-lib/remotes/issues/296
|
391
|
163
|
## Ideally, all dependencies should get installed in the first pass.
|
392
|
164
|
|
|
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")
|
|
169
|
+
|
393
|
170
|
## Pass #1 at installing dependencies
|
394
|
171
|
message(paste('****', Sys.time(), 'pass number 1 at installing dependencies: local dependencies ****'))
|
395
|
|
- local_deps <- remotes::local_package_deps(dependencies = TRUE)
|
396
|
|
- deps <- remotes::dev_package_deps(dependencies = TRUE, repos = BiocManager::repositories())
|
397
|
|
- BiocManager::install(local_deps[local_deps %in% deps$package[deps$diff != 0]])
|
|
172
|
+ remotes::install_local(dependencies = TRUE, repos = BiocManager::repositories(), build_vignettes = TRUE, upgrade = TRUE)
|
398
|
173
|
|
399
|
174
|
## Pass #2 at installing dependencies
|
400
|
175
|
message(paste('****', Sys.time(), 'pass number 2 at installing dependencies: any remaining dependencies ****'))
|
401
|
|
- deps <- remotes::dev_package_deps(dependencies = TRUE, repos = BiocManager::repositories())
|
402
|
|
- BiocManager::install(deps$package[deps$diff != 0])
|
|
176
|
+ remotes::install_local(dependencies = TRUE, repos = BiocManager::repositories(), build_vignettes = TRUE, upgrade = TRUE)
|
403
|
177
|
|
404
|
178
|
## For running the checks
|
405
|
179
|
message(paste('****', Sys.time(), 'installing rcmdcheck and BiocCheck ****'))
|
...
|
...
|
@@ -407,6 +181,25 @@ jobs:
|
407
|
181
|
BiocManager::install("BiocCheck")
|
408
|
182
|
shell: Rscript {0}
|
409
|
183
|
|
|
184
|
+ - name: Install BiocGenerics
|
|
185
|
+ if: env.has_RUnit == 'true'
|
|
186
|
+ run: |
|
|
187
|
+ ## Install BiocGenerics
|
|
188
|
+ BiocManager::install("BiocGenerics")
|
|
189
|
+ shell: Rscript {0}
|
|
190
|
+
|
|
191
|
+ - name: Install covr
|
|
192
|
+ if: github.ref == 'refs/heads/master' && env.run_covr == 'true' && runner.os == 'Linux'
|
|
193
|
+ run: |
|
|
194
|
+ remotes::install_cran("covr")
|
|
195
|
+ shell: Rscript {0}
|
|
196
|
+
|
|
197
|
+ - name: Install pkgdown
|
|
198
|
+ if: github.ref == 'refs/heads/master' && env.run_pkgdown == 'true' && runner.os == 'Linux'
|
|
199
|
+ run: |
|
|
200
|
+ remotes::install_cran("pkgdown")
|
|
201
|
+ shell: Rscript {0}
|
|
202
|
+
|
410
|
203
|
- name: Session info
|
411
|
204
|
run: |
|
412
|
205
|
options(width = 100)
|
...
|
...
|
@@ -414,7 +207,7 @@ jobs:
|
414
|
207
|
sessioninfo::session_info(pkgs, include_base = TRUE)
|
415
|
208
|
shell: Rscript {0}
|
416
|
209
|
|
417
|
|
- - name: Check
|
|
210
|
+ - name: Run CMD check
|
418
|
211
|
env:
|
419
|
212
|
_R_CHECK_CRAN_INCOMING_: false
|
420
|
213
|
run: |
|
...
|
...
|
@@ -426,6 +219,7 @@ jobs:
|
426
|
219
|
)
|
427
|
220
|
shell: Rscript {0}
|
428
|
221
|
|
|
222
|
+ ## Might need an to add this to the if: && runner.os == 'Linux'
|
429
|
223
|
- name: Reveal testthat details
|
430
|
224
|
if: env.has_testthat == 'true'
|
431
|
225
|
run: find . -name testthat.Rout -exec cat '{}' ';'
|
...
|
...
|
@@ -433,26 +227,45 @@ jobs:
|
433
|
227
|
- name: Run RUnit tests
|
434
|
228
|
if: env.has_RUnit == 'true'
|
435
|
229
|
run: |
|
436
|
|
- ## Install BiocGenerics
|
437
|
|
- BiocManager::install("BiocGenerics")
|
438
|
230
|
BiocGenerics:::testPackage()
|
439
|
231
|
shell: Rscript {0}
|
440
|
232
|
|
441
|
|
- - name: BiocCheck
|
|
233
|
+ - name: Run BiocCheck
|
442
|
234
|
run: |
|
443
|
|
- ## This syntax works on Windows as well as other OS
|
444
|
|
- ## plus it doesn't break the GHA workflow in case BiocCheck finds
|
445
|
|
- ## an error (for example, the package is bigger than the maximum
|
446
|
|
- ## allowed size). We want the rest of the GHA to proceed even if
|
447
|
|
- ## there is a BiocCheck error in order to see the full output and
|
448
|
|
- ## run the tests on all operating systems.
|
449
|
|
- BiocCheck::BiocCheck(dir('check', 'tar.gz$', full.names = TRUE), `no-check-R-ver` = TRUE, `no-check-bioc-help` = TRUE)
|
450
|
|
- ## For more options check http://bioconductor.org/packages/release/bioc/vignettes/BiocCheck/inst/doc/BiocCheck.html
|
|
235
|
+ BiocCheck::BiocCheck(
|
|
236
|
+ dir('check', 'tar.gz$', full.names = TRUE),
|
|
237
|
+ `quit-with-status` = TRUE,
|
|
238
|
+ `no-check-R-ver` = TRUE,
|
|
239
|
+ `no-check-pkg-size` = TRUE,
|
|
240
|
+ `no-check-bioc-help` = TRUE
|
|
241
|
+ )
|
451
|
242
|
shell: Rscript {0}
|
452
|
243
|
|
|
244
|
+ - name: Test coverage
|
|
245
|
+ if: github.ref == 'refs/heads/master' && env.run_covr == 'true' && runner.os == 'Linux'
|
|
246
|
+ run: |
|
|
247
|
+ covr::codecov()
|
|
248
|
+ shell: Rscript {0}
|
|
249
|
+
|
|
250
|
+ - name: Install package
|
|
251
|
+ if: github.ref == 'refs/heads/master' && env.run_pkgdown == 'true' && runner.os == 'Linux'
|
|
252
|
+ run: R CMD INSTALL .
|
|
253
|
+
|
|
254
|
+ - name: Deploy package
|
|
255
|
+ if: github.ref == 'refs/heads/master' && env.run_pkgdown == 'true' && runner.os == 'Linux'
|
|
256
|
+ run: |
|
|
257
|
+ git config --local user.email "actions@github.com"
|
|
258
|
+ git config --local user.name "GitHub Actions"
|
|
259
|
+ Rscript -e "pkgdown::deploy_to_branch(new_process = FALSE)"
|
|
260
|
+ shell: bash {0}
|
|
261
|
+ ## Note that you need to run pkgdown::deploy_to_branch(new_process = FALSE)
|
|
262
|
+ ## at least one locally before this will work. This creates the gh-pages
|
|
263
|
+ ## branch (erasing anything you haven't version controlled!) and
|
|
264
|
+ ## makes the git history recognizable by pkgdown.
|
|
265
|
+
|
453
|
266
|
- name: Upload check results
|
454
|
267
|
if: failure()
|
455
|
268
|
uses: actions/upload-artifact@master
|
456
|
269
|
with:
|
457
|
|
- name: ${{ runner.os }}-biocbranch-${{ needs.define-docker-info.outputs.biocversion }}-r-${{ needs.R-CMD-check-bioc.outputs.rversion }}-bioc-${{ needs.define-docker-info.outputs.biocversion }}-results
|
|
270
|
+ name: ${{ runner.os }}-biocversion-RELEASE_3_12-r-4.0-results
|
458
|
271
|
path: check
|