Skip to content

Commit

Permalink
pkgdepends
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardoporreca committed Jan 15, 2024
1 parent 10cfc57 commit 0bb65bd
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ci-cd-renv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ jobs:

- name: Install system dependencies
run: |
install.packages("pak", repos = "https://r-lib.github.io/p/pak/stable/")
install.packages(c("processx", "jsonlite"))
(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))
})
install.packages("pkgdepends", "jsonlite")
pkg_installation_proposal <- pkgdepends::new_pkg_installation_proposal
names(jsonlite::read_json("renv.lock")$Packages),
config = list(dependencies = FALSE)
)
pkg_installation_proposal$solve()
pkg_installation_proposal$install_sysreqs()
shell: Rscript {0}

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

0 comments on commit 0bb65bd

Please sign in to comment.