Skip to content

Commit

Permalink
Use pak-based installation for renv, which includes system requirements
Browse files Browse the repository at this point in the history
* 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 also https://github.com/r-l_ib/acti_ons/issu_es/785
  • Loading branch information
riccardoporreca committed Jan 10, 2024
1 parent b22e30a commit e3bca52
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/ci-cd-renv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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

Expand Down

0 comments on commit e3bca52

Please sign in to comment.