-
Notifications
You must be signed in to change notification settings - Fork 0
176 lines (144 loc) · 5.6 KB
/
example-workflow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
on:
workflow_dispatch:
name: Workflow that tests the actions
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
jobs:
pkg-at-root:
name: Root Pkg - Bioc ${{ matrix.bioc-version }} (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, windows-2019, windows-2022, macos-12, macos-13, macos-14]
## Test using both Bioconductor devel and release
bioc-version: [devel, release]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup R and Bioconductor
uses: grimbough/bioc-actions/setup-bioc@v1
with:
bioc-version: ${{ matrix.bioc-version }}
bioc-mirror: https://bioconductor.posit.co/
use-public-rspm: false
Ncpus: 1
- name: Install pandoc
uses: r-lib/actions/setup-pandoc@v2
- name: Install dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 1
- name: Build, Install, Check
id: build-install-check
uses: grimbough/bioc-actions/build-install-check@v1
with:
package-directory: '.'
## Turn off the checks that we know will fail
## Cause the workflow to error if any new errors appear
- name: Run BiocCheck with arguments
uses: grimbough/bioc-actions/run-BiocCheck@v1
with:
package-directory: '.'
arguments: '--no-check-bioc-views --no-check-vignettes --no-check-bioc-help'
error-on: 'error'
## upload the Rcheck folder regardless of success of failure
- name: Upload output
uses: actions/upload-artifact@v4
if: always()
with:
name: ${{ matrix.os }}-bioc-${{ matrix.bioc-version}}-Rcheck
path: |
${{ steps.build-install-check.outputs.check-dir }}
## upload source and binary packages
- name: Upload check output
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-bioc-${{ matrix.bioc-version}}-pkgs
path: |
${{ steps.build-install-check.outputs.source-tarball }}
${{ steps.build-install-check.outputs.package-binary }}
pkg-in-subfolder:
name: Subfolder Pkg - Bioc ${{ matrix.bioc-version }} (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04]
bioc-version: [release]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
## We only using Ubuntu and BioC-release here,
## so lets use the Rstudio package manager
## to install binary linux packages
- name: Setup R and Bioconductor
uses: grimbough/bioc-actions/setup-bioc@v1
with:
bioc-version: ${{ matrix.bioc-version }}
bioc-mirror: https://packagemanager.rstudio.com/bioconductor
- name: Install dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 1
## Run the complete build, install, check process like the Bioc Build System
- name: Build, Install, Check
id: build-install-check
uses: grimbough/bioc-actions/build-install-check@v1
with:
package-directory: 'inst/nestedPKG'
## Run all tests in BiocCheck, include those we know fail
## Use the 'error-on' to prevent this failing the workflow
- name: Run BiocCheck without arguments
uses: grimbough/bioc-actions/run-BiocCheck@v1
with:
package-directory: 'inst/nestedPKG'
error-on: 'never'
## upload the Rcheck folder if the workflow fails
- name: Upload output
uses: actions/upload-artifact@v4
if: failure()
with:
name: ${{ matrix.os }}-bioc-${{ matrix.bioc-version}}-sub_folder
path: |
${{ steps.build-install-check.outputs.check-dir }}
using-bioc-docker:
name: Docker Devel
strategy:
fail-fast: false
runs-on: ubuntu-22.04
container: bioconductor/bioconductor_docker:devel
steps:
- uses: actions/checkout@v4
##################################################
## no need to install R, BiocManager, or Pandoc ##
##################################################
## cache installed packages
- name: Cache install R packages
uses: actions/cache@v4
with:
path: /usr/local/lib/R/site-library
key: docker-1
restore-keys: docker-
## we can use BiocManager will install binary packages in the Docker container
- name: Install dependencies
run: |
BiocManager::install(c('AnnotationHub', 'rtracklayer', 'knitr', 'rmarkdown', 'BiocStyle'))
shell: Rscript {0}
- name: Build, Install, Check
id: build-install-check
uses: grimbough/bioc-actions/build-install-check@v1
with:
package-directory: '.'
## Turn off the checks that we know will fail
## Cause the workflow to error if any new errors appear
- name: Run BiocCheck with arguments
uses: grimbough/bioc-actions/run-BiocCheck@v1
with:
package-directory: '.'
arguments: '--no-check-bioc-views --no-check-vignettes --no-check-bioc-help'
error-on: 'error'
- name: Upload built package binary
uses: actions/upload-artifact@v4
with:
name: docker-binary
path: |
${{ steps.build-install-check.outputs.package-binary }}