From c40dc561ba311fa226e2aaf8827f65b65cf41265 Mon Sep 17 00:00:00 2001 From: Riccardo Porreca Date: Wed, 10 Jan 2024 18:05:43 +0100 Subject: [PATCH] Use pak-based installation for renv, which includes system requirements * Note that the released version of `remotes` is pretty old and does not support Ubuntu 22.04. We could possibly rely on a development version, but we try to go for pak directly. * See https://github.com/r-lib/actions/issues/785 --- .github/workflows/ci-cd-renv.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci-cd-renv.yml b/.github/workflows/ci-cd-renv.yml index 17d2885..5e90efd 100644 --- a/.github/workflows/ci-cd-renv.yml +++ b/.github/workflows/ci-cd-renv.yml @@ -33,6 +33,8 @@ jobs: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} # Preserve package sources for informative references in case of errors R_KEEP_PKG_SOURCE: yes + # Enable pak-based installation for renv (including system requirements) + RENV_CONFIG_PAK_ENABLED: TRUE steps: @@ -46,16 +48,6 @@ jobs: # No RStudio Package Manager to respect renv.lock use-public-rspm: false - - name: Install system dependencies - # This is not taken care of (yet) by r-lib/actions/setup-renv - # Package distro used to get the distro for the used ubuntu-latest - run: | - Rscript -e "install.packages(c('remotes', 'distro'))" - while read -r cmd - do - eval sudo $cmd - done < <(Rscript -e 'writeLines(with(distro::distro(), remotes::system_requirements(id, short_version)))') - - name: Activate renv and restore packages with cache uses: r-lib/actions/setup-renv@v2