Add R to pre-installed software packages
I understand that Windows shared runners are in beta, thus I would like to provide feedback.
Please provide VM image that that would have R software pre-installed. It is required by any R project. Having such VM will reduce the load caused by installing R software in each CI job. It will also reduce web traffic as required binaries will not need to be downloaded.
This is the yaml chunk that I currently use:
- curl.exe -s -o ../R-win.exe https://cloud.r-project.org/bin/windows/base/old/R-4.0.0-win.exe
- Start-Process -FilePath ..\R-win.exe -ArgumentList "/VERYSILENT /DIR=C:\R" -NoNewWindow -Wait
- curl.exe -s -o ../rtools.exe https://cloud.r-project.org/bin/windows/Rtools/rtools40-x86_64.exe
- Start-Process -FilePath ..\rtools.exe -ArgumentList "/VERYSILENT /DIR=C:\rtools40" -NoNewWindow -Wait
- $ENV:PATH = "C:\R\bin;C:\rtools40\usr\bin;$ENV:PATH"
R-4.0.0 is current stable release of R. rootls40-x86_64 is R development tools, required for building package that has compiled code.
Aside from R 4.0.0, developers of R packages also tests their packages against development version of R. That would probably need to be a different VM image, because it needs to be re-builded, at least weekly, ideally daily, to make sense. To make R-devel environment the only difference is to replace first two lines in above yaml chunk for those:
. - curl.exe -s -o ../R-devel.exe https://cloud.r-project.org/bin/windows/base/R-devel-win.exe
- Start-Process -FilePath ..\R-devel.exe -ArgumentList "/VERYSILENT /DIR=C:\R" -NoNewWindow -Wait
When providing an R-ready VM, please do not pre-install any R packages (R extensions) on it. There are many commonly used packages, like rmarkdown
, testthat
, but they are not essential either for building R packages or testing them. If you have to provide them, please make another image for that. Pre-installed R packages on build&test environment might be a source of hard to track and debug issues, so should not be enforced on every user.
Thank you.