From fd567ad29fb11fb3e9a7c10bc800e7751f9d52bf Mon Sep 17 00:00:00 2001 From: phauchamps Date: Tue, 9 Jan 2024 16:07:36 +0100 Subject: [PATCH] testing again with GHA workflow (wip) --- .github/workflows/check-bioc.yml | 65 ++++++++++++++------------------ 1 file changed, 28 insertions(+), 37 deletions(-) diff --git a/.github/workflows/check-bioc.yml b/.github/workflows/check-bioc.yml index b199649..0a6462c 100644 --- a/.github/workflows/check-bioc.yml +++ b/.github/workflows/check-bioc.yml @@ -173,47 +173,38 @@ jobs: run: | BiocManager::install(version = "${{ matrix.config.bioc }}", ask = FALSE) shell: Rscript {0} - - - name: pre-install rlang with specific c-compiler flags + + - name: Install dependencies run: | withr::with_makevars( c(CFLAGS = "-w", CXXFLAGS = "-w"), - BiocManager::install("rlang"), - assignment = "+=") - shell: Rscript {0} + { + ## Try installing the package dependencies in steps. First the local + ## dependencies, then any remaining dependencies to avoid the + ## issues described at + ## https://stat.ethz.ch/pipermail/bioc-devel/2020-April/016675.html + ## https://github.com/r-lib/remotes/issues/296 + ## Ideally, all dependencies should get installed in the first pass. + + ## Pass #1 at installing dependencies + message(paste('****', Sys.time(), 'pass number 1 at installing dependencies: local dependencies ****')) + local_deps <- remotes::local_package_deps(dependencies = TRUE) + deps <- remotes::dev_package_deps(dependencies = TRUE, repos = BiocManager::repositories()) + BiocManager::install(local_deps[local_deps %in% deps$package[deps$diff != 0]]) - - name: Session info - run: | - options(width = 100) - pkgs <- installed.packages()[, "Package"] - sessioninfo::session_info(pkgs, include_base = TRUE) - shell: Rscript {0} - - - name: Install dependencies - run: | - ## Try installing the package dependencies in steps. First the local - ## dependencies, then any remaining dependencies to avoid the - ## issues described at - ## https://stat.ethz.ch/pipermail/bioc-devel/2020-April/016675.html - ## https://github.com/r-lib/remotes/issues/296 - ## Ideally, all dependencies should get installed in the first pass. - - ## Pass #1 at installing dependencies - message(paste('****', Sys.time(), 'pass number 1 at installing dependencies: local dependencies ****')) - local_deps <- remotes::local_package_deps(dependencies = TRUE) - deps <- remotes::dev_package_deps(dependencies = TRUE, repos = BiocManager::repositories()) - BiocManager::install(local_deps[local_deps %in% deps$package[deps$diff != 0]]) - - ## Pass #2 at installing dependencies - message(paste('****', Sys.time(), 'pass number 2 at installing dependencies: any remaining dependencies ****')) - deps <- remotes::dev_package_deps(dependencies = TRUE, repos = BiocManager::repositories()) - BiocManager::install(deps$package[deps$diff != 0]) - - ## For running the checks - message(paste('****', Sys.time(), 'installing rcmdcheck and BiocCheck ****')) - remotes::install_cran("rcmdcheck") - BiocManager::install("BiocCheck") + ## Pass #2 at installing dependencies + message(paste('****', Sys.time(), 'pass number 2 at installing dependencies: any remaining dependencies ****')) + deps <- remotes::dev_package_deps(dependencies = TRUE, repos = BiocManager::repositories()) + BiocManager::install(deps$package[deps$diff != 0]) + + ## For running the checks + message(paste('****', Sys.time(), 'installing rcmdcheck and BiocCheck ****')) + remotes::install_cran("rcmdcheck") + BiocManager::install("BiocCheck") + }, + assignment = "+=") + shell: Rscript {0} - name: Session info @@ -267,7 +258,7 @@ jobs: ##if: github.ref == 'refs/heads/master' && env.run_pkgdown == 'true' && runner.os == 'Linux' if: env.run_pkgdown == 'true' && runner.os == 'Linux' run: | - remotes::install_github("r-lib/pkgdown"), + remotes::install_github("r-lib/pkgdown") shell: Rscript {0} - name: Session info