Skip to content

Commit

Permalink
WiP
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardoporreca committed Jan 15, 2024
1 parent 951a84e commit 30b47fc
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/ci-cd-renv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,17 @@ jobs:
- name: Setup pak to install system dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
packages: jsonlite
packages: jsonlite, processx
dependencies: NA
cache-version: 'sysreqs-1' # ensure keys are not shared with the renv cache

- name: Install system dependencies
run: pak::sysreqs_fix_installed(names(jsonlite::read_json("renv.lock")$Packages))
run: |
(sysreqs_cmds <- pak::pkg_sysreqs(names(jsonlite::read_json("renv.lock")$Packages), dependencies = FALSE))
# inspired by pkgdepends:::sysreqs_install
lapply(unlist(sysreqs_cmds[c("pre_install", "install_scripts", "post_install")]), function(cmd) {
processx::run("sudo", c("sh", "-c", cmd))
})
shell: Rscript {0}

- name: Activate renv and restore packages with cache
Expand Down

0 comments on commit 30b47fc

Please sign in to comment.