Skip to content

Commit 79e0057

Browse files
committed
Use r-lib/actions/setup-r-dependencies@v2 to install dependencies
This has the additional benefit of installing system dependencies on Linux, which means the system dependency of igraph (libgslpk) is now automatically installed. The lack of this library was what prevented the imager package from loading. Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
1 parent c0b0434 commit 79e0057

1 file changed

Lines changed: 12 additions & 14 deletions

File tree

.github/workflows/main.yml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ jobs:
3636
brew update
3737
brew install --cask xquartz
3838
39-
- name: "Install missing system packages in Ubuntu"
40-
if: ${{ runner.os == 'Linux' }}
41-
run: sudo apt update && sudo apt install libglpk40
42-
4339
- uses: r-lib/actions/setup-pandoc@v2
4440

4541
- uses: r-lib/actions/setup-r@v2
@@ -48,18 +44,20 @@ jobs:
4844
http-user-agent: ${{ matrix.config.http-user-agent }}
4945
use-public-rspm: true
5046

47+
- uses: r-lib/actions/setup-r-dependencies@v2
48+
dependencies: '"hard"'
49+
with:
50+
extra-packages: any::rcmdcheck,
51+
github::asgr/Rwcs@master,
52+
github::asgr/Rfits@master,
53+
github::ICRAR/ProFit@master,
54+
any::hdf5r,
55+
any::knitr,
56+
any::rmarkdown,
57+
any::imager
58+
5159
- name: Install dependencies
5260
run: |
53-
install.packages('remotes')
54-
install.packages('hdf5r')
55-
install.packages('knitr')
56-
install.packages('rmarkdown')
57-
install.packages('imager')
58-
remotes::install_deps(dependencies = TRUE)
59-
remotes::install_cran("rcmdcheck")
60-
remotes::install_github("asgr/Rwcs", ref="master")
61-
remotes::install_github("asgr/Rfits", ref="master")
62-
remotes::install_github("ICRAR/ProFit", ref="master")
6361
shell: Rscript {0}
6462

6563
- uses: r-lib/actions/check-r-package@v2

0 commit comments

Comments
 (0)