From 7eb514189f240c1d90663b34e7821ef986f2a86d Mon Sep 17 00:00:00 2001 From: Riccardo Porreca Date: Mon, 22 Jan 2024 19:19:40 +0100 Subject: [PATCH] Simplify renv system dependencies based on `pkgdepends` as our preferred choice --- .github/workflows/ci-cd-renv.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci-cd-renv.yml b/.github/workflows/ci-cd-renv.yml index cd9bdc1..d4e5610 100644 --- a/.github/workflows/ci-cd-renv.yml +++ b/.github/workflows/ci-cd-renv.yml @@ -53,20 +53,15 @@ jobs: - name: Install system dependencies # This is not taken care of (yet) by r-lib/actions/setup-renv - # We rely on pkgdepends (from the library embedded in pak) to detect and - # install system requirements for the renv.lock packages - # We could use pak-based installation for renv, which includes system - # requirements, but would have to handle the pak cache explicitly # See https://github.com/r-lib/actions/issues/785 run: | + # We rely on pkgdepends from the library embedded in pak install.packages("pak", repos = "https://r-lib.github.io/p/pak/stable/") install.packages("jsonlite") .libPaths(c(system.file("library", package = "pak"), .libPaths())) - pkg_installation_proposal <- pkgdepends::new_pkg_installation_proposal( + pkgdepends::new_pkg_installation_proposal( names(jsonlite::read_json("renv.lock")$Packages), config = list(dependencies = FALSE) - )$solve() - pkg_installation_proposal$show_solution() - pkg_installation_proposal$install_sysreqs() + )$solve()$install_sysreqs() shell: Rscript {0} - name: Activate renv and restore packages with cache