Skip to content

Commit 4710a0e

Browse files
committed
Revert "Update check-bioc.yml"
This reverts commit 5aeac41.
1 parent 5aeac41 commit 4710a0e

File tree

1 file changed

+49
-109
lines changed

1 file changed

+49
-109
lines changed

.github/workflows/check-bioc.yml

Lines changed: 49 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ env:
3939
run_pkgdown: 'true'
4040
has_RUnit: 'false'
4141
cache-version: 'cache-v1'
42-
run_docker: 'false'
4342

4443
jobs:
4544
build-check:
@@ -52,11 +51,9 @@ jobs:
5251
fail-fast: false
5352
matrix:
5453
config:
55-
- { os: ubuntu-latest, r: '4.3', bioc: '3.18', cont: "bioconductor/bioconductor_docker:devel", rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest" }
56-
- { os: macOS-latest, r: '4.3', bioc: '3.18'}
57-
- { os: windows-latest, r: '4.3', bioc: '3.18'}
58-
## Check https://github.com/r-lib/actions/tree/master/examples
59-
## for examples using the http-user-agent
54+
- { os: ubuntu-latest, r: '4.2', bioc: '3.16', cont: "bioconductor/bioconductor_docker:RELEASE_3_16", 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'}
6057
env:
6158
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
6259
RSPM: ${{ matrix.config.rspm }}
@@ -79,15 +76,14 @@ jobs:
7976
## https://github.com/r-lib/actions/blob/master/examples/check-standard.yaml
8077
## If they update their steps, we will also need to update ours.
8178
- name: Checkout Repository
82-
uses: actions/checkout@v3
79+
uses: actions/checkout@v2
8380

8481
## R is already included in the Bioconductor docker images
8582
- name: Setup R from r-lib
8683
if: runner.os != 'Linux'
8784
uses: r-lib/actions/setup-r@v2
8885
with:
8986
r-version: ${{ matrix.config.r }}
90-
http-user-agent: ${{ matrix.config.http-user-agent }}
9187

9288
## pandoc is already included in the Bioconductor docker images
9389
- name: Setup pandoc from r-lib
@@ -100,28 +96,28 @@ jobs:
10096
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
10197
shell: Rscript {0}
10298

103-
- name: Restore R package cache
99+
- name: Cache R packages
104100
if: "!contains(github.event.head_commit.message, '/nocache') && runner.os != 'Linux'"
105101
uses: actions/cache@v3
106102
with:
107103
path: ${{ env.R_LIBS_USER }}
108-
key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-4.3-${{ hashFiles('.github/depends.Rds') }}
109-
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-4.3-
104+
key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_16-r-4.2-${{ hashFiles('.github/depends.Rds') }}
105+
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_16-r-4.2-
110106

111107
- name: Cache R packages on Linux
112108
if: "!contains(github.event.head_commit.message, '/nocache') && runner.os == 'Linux' "
113109
uses: actions/cache@v3
114110
with:
115111
path: /home/runner/work/_temp/Library
116-
key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-4.3-${{ hashFiles('.github/depends.Rds') }}
117-
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-4.3-
112+
key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_16-r-4.2-${{ hashFiles('.github/depends.Rds') }}
113+
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_16-r-4.2-
118114

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"
115+
- name: Install Linux system dependencies
116+
if: runner.os == 'Linux'
117+
run: |
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
120+
sudo -s eval "$sysreqs"
125121
126122
- name: Install macOS system dependencies
127123
if: matrix.config.os == 'macOS-latest'
@@ -139,9 +135,10 @@ jobs:
139135
140136
## For installing usethis's dependency gert
141137
brew install libgit2
142-
143-
## Required for tcltk
144-
brew install xquartz --cask
138+
139+
## To fix x11/cairo error with tidyHeatmap/Complexheatmap here https://github.com/stemangiola/tidybulk/runs/1388237421?check_suite_focus=true#step:14:2134
140+
## Suggested here https://stackoverflow.com/questions/63648591/how-to-install-x11-before-testing-with-github-actions-for-macos
141+
brew install --cask xquartz
145142
146143
- name: Install Windows system dependencies
147144
if: runner.os == 'Windows'
@@ -157,7 +154,7 @@ jobs:
157154

158155
- name: Set BiocVersion
159156
run: |
160-
BiocManager::install(version = "${{ matrix.config.bioc }}", ask = FALSE, force = TRUE)
157+
BiocManager::install(version = "${{ matrix.config.bioc }}", ask = FALSE)
161158
shell: Rscript {0}
162159

163160
- name: Install dependencies pass 1
@@ -169,21 +166,22 @@ jobs:
169166
## https://github.com/r-lib/remotes/issues/296
170167
## Ideally, all dependencies should get installed in the first pass.
171168
172-
## For running the checks
173-
message(paste('****', Sys.time(), 'installing rcmdcheck and BiocCheck ****'))
174-
install.packages(c("rcmdcheck", "BiocCheck"), repos = BiocManager::repositories())
175-
176169
## Pass #1 at installing dependencies
177170
message(paste('****', Sys.time(), 'pass number 1 at installing dependencies: local dependencies ****'))
178-
remotes::install_local(dependencies = TRUE, repos = BiocManager::repositories(), build_vignettes = FALSE, upgrade = TRUE)
171+
remotes::install_local(dependencies = TRUE, repos = BiocManager::repositories(), build_vignettes = TRUE, upgrade = TRUE)
179172
continue-on-error: true
180173
shell: Rscript {0}
181174

182175
- name: Install dependencies pass 2
183176
run: |
184177
## Pass #2 at installing dependencies
185178
message(paste('****', Sys.time(), 'pass number 2 at installing dependencies: any remaining dependencies ****'))
186-
remotes::install_local(dependencies = TRUE, repos = BiocManager::repositories(), build_vignettes = TRUE, upgrade = TRUE, force = TRUE)
179+
remotes::install_local(dependencies = TRUE, repos = BiocManager::repositories(), build_vignettes = TRUE, upgrade = TRUE)
180+
181+
## For running the checks
182+
message(paste('****', Sys.time(), 'installing rcmdcheck and BiocCheck ****'))
183+
remotes::install_cran("rcmdcheck")
184+
BiocManager::install("BiocCheck")
187185
shell: Rscript {0}
188186

189187
- name: Install BiocGenerics
@@ -194,15 +192,15 @@ jobs:
194192
shell: Rscript {0}
195193

196194
- name: Install covr
197-
if: github.ref == 'refs/heads/devel' && env.run_covr == 'true' && runner.os == 'Linux'
195+
if: github.ref == 'refs/heads/master' && env.run_covr == 'true' && runner.os == 'Linux'
198196
run: |
199197
remotes::install_cran("covr")
200198
shell: Rscript {0}
201199

202200
- name: Install pkgdown
203-
if: github.ref == 'refs/heads/devel' && env.run_pkgdown == 'true' && runner.os == 'Linux'
201+
if: github.ref == 'refs/heads/master' && env.run_pkgdown == 'true' && runner.os == 'Linux'
204202
run: |
205-
remotes::install_github("r-lib/pkgdown")
203+
remotes::install_cran("pkgdown")
206204
shell: Rscript {0}
207205

208206
- name: Session info
@@ -215,12 +213,10 @@ jobs:
215213
- name: Run CMD check
216214
env:
217215
_R_CHECK_CRAN_INCOMING_: false
218-
DISPLAY: 99.0
219216
run: |
220-
options(crayon.enabled = TRUE)
221217
rcmdcheck::rcmdcheck(
222-
args = c("--no-manual", "--no-vignettes", "--timings"),
223-
build_args = c("--no-manual", "--keep-empty-dirs", "--no-resave-data"),
218+
args = c("--no-build-vignettes", "--no-manual", "--timings"),
219+
build_args = c("--no-manual", "--no-resave-data"),
224220
error_on = "warning",
225221
check_dir = "check"
226222
)
@@ -238,101 +234,45 @@ jobs:
238234
shell: Rscript {0}
239235

240236
- name: Run BiocCheck
241-
env:
242-
DISPLAY: 99.0
243237
run: |
244238
BiocCheck::BiocCheck(
245239
dir('check', 'tar.gz$', full.names = TRUE),
246240
`quit-with-status` = TRUE,
247241
`no-check-R-ver` = TRUE,
248-
`no-check-bioc-help` = TRUE
242+
`no-check-bioc-help` = TRUE,
243+
`no-check-library-calls` = TRUE,
244+
`no-check-coding-practices` = TRUE
249245
)
250246
shell: Rscript {0}
251247

252248
- name: Test coverage
253-
if: github.ref == 'refs/heads/devel' && env.run_covr == 'true' && runner.os == 'Linux'
249+
if: github.ref == 'refs/heads/master' && env.run_covr == 'true' && runner.os == 'Linux'
254250
run: |
255251
covr::codecov()
256252
shell: Rscript {0}
257253

258254
- name: Install package
259-
if: github.ref == 'refs/heads/devel' && env.run_pkgdown == 'true' && runner.os == 'Linux'
255+
if: github.ref == 'refs/heads/master' && env.run_pkgdown == 'true' && runner.os == 'Linux'
260256
run: R CMD INSTALL .
261257

262-
- name: Build pkgdown site
263-
if: github.ref == 'refs/heads/devel' && env.run_pkgdown == 'true' && runner.os == 'Linux'
264-
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
265-
shell: Rscript {0}
258+
- name: Deploy package
259+
if: github.ref == 'refs/heads/master' && env.run_pkgdown == 'true' && runner.os == 'Linux'
260+
run: |
261+
## Temporary workaround for https://github.com/actions/checkout/issues/766
262+
git config --global --add safe.directory "$GITHUB_WORKSPACE"
263+
264+
git config --local user.email "[email protected]"
265+
git config --local user.name "GitHub Actions"
266+
Rscript -e "pkgdown::deploy_to_branch(new_process = FALSE)"
267+
shell: bash {0}
266268
## Note that you need to run pkgdown::deploy_to_branch(new_process = FALSE)
267269
## at least one locally before this will work. This creates the gh-pages
268270
## branch (erasing anything you haven't version controlled!) and
269271
## makes the git history recognizable by pkgdown.
270272

271-
- name: Install deploy dependencies
272-
if: github.ref == 'refs/heads/devel' && env.run_pkgdown == 'true' && runner.os == 'Linux'
273-
run: |
274-
apt-get update && apt-get -y install rsync
275-
276-
- name: Deploy pkgdown site to GitHub pages 🚀
277-
if: github.ref == 'refs/heads/devel' && env.run_pkgdown == 'true' && runner.os == 'Linux'
278-
uses: JamesIves/github-pages-deploy-action@releases/v4
279-
with:
280-
clean: false
281-
branch: gh-pages
282-
folder: docs
283-
284273
- name: Upload check results
285274
if: failure()
286-
uses: actions/upload-artifact@master
275+
uses: actions/upload-artifact@v3
287276
with:
288-
name: ${{ runner.os }}-biocversion-devel-r-4.3-results
277+
name: ${{ runner.os }}-biocversion-RELEASE_3_16-r-4.2-results
289278
path: check
290-
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
333-
with:
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

Comments
 (0)