diff --git a/.github/actions/r_build/action.yml b/.github/actions/r_build/action.yml index 3aea3d036..e970f2fdb 100644 --- a/.github/actions/r_build/action.yml +++ b/.github/actions/r_build/action.yml @@ -35,26 +35,11 @@ runs: with: r-version: ${{ matrix.R }} use-public-rspm: true - - name: Cache R packages download - id: cache-rlibs - uses: actions/cache@v3 - with: - path: /usr/lib/R/site-library - key: r_build-rlibs -# - if: ${{ steps.cache-rlibs.outputs.cache-hit != 'true' }} - name: Install R dependencies shell: bash run: | cd R Rscript --vanilla install_deps.R -# - name: Install R dependencies -# uses: r-lib/actions/setup-r-dependencies@v2 -# with: -# cache: true -# extra-packages: | -# any::pkgbuild -# any::roxygen2 -# any::sparklyr - name: Generate R bindings shell: bash run: | diff --git a/R/install_deps.R b/R/install_deps.R index 8a473eb7c..d05207329 100644 --- a/R/install_deps.R +++ b/R/install_deps.R @@ -1,40 +1,5 @@ -# repos = c( -# "https://cran.ma.imperial.ac.uk" = "https://cran.ma.imperial.ac.uk" -# ,"https://www.stats.bris.ac.uk/R" = "https://www.stats.bris.ac.uk/R" -# ,"https://cran.rstudio.com/" = "https://cran.rstudio.com/" -# ) options(repos = c(CRAN = "https://packagemanager.posit.co/cran/__linux__/focal/latest")) -# CRAN = "https://packagemanager.posit.co/cran/__linux__/focal/latest" -# -# options(HTTPUserAgent = sprintf("R/%s R (%s)", getRversion(), paste(getRversion(), R.version["platform"], R.version["arch"], R.version["os"]))) -# options(download.file.extra = sprintf("--header \"User-Agent: R (%s)\"", paste(getRversion(), R.version["platform"], R.version["arch"], R.version["os"]))) -# -# print(sprintf("R/%s R (%s)", getRversion(), paste(getRversion(), R.version["platform"], R.version["arch"], R.version["os"]))) -# mirror_is_up <- function(x){ -# out <- tryCatch({ -# available.packages(contrib.url(x)) -# } -# ,error = function(cond){return(0)} -# ,warning = function(cond){return(0)} -# ,finally = function(cond){} -# ) -# return(length(out)) -# } -# -# mirror_status = lapply(repos, mirror_is_up) -# for(repo in names(mirror_status)){ -# if (mirror_status[[repo]] > 1){ -# repo <<- repo -# break -# } -# } - -# .libPaths(c("/usr/lib/R/site-library", .libPaths())) - -# install.packages("pkgbuild", repos="https://packagemanager.posit.co/cran/__linux__/bullseye/latest") -# install.packages("roxygen2", repos="https://packagemanager.posit.co/cran/__linux__/bullseye/latest") -# install.packages("sparklyr", repos="https://packagemanager.posit.co/cran/__linux__/bullseye/latest") install.packages("pkgbuild") install.packages("roxygen2") install.packages("sparklyr") \ No newline at end of file diff --git a/R/sparkR-mosaic/tests.R b/R/sparkR-mosaic/tests.R index 7cb4e9c50..f4071c3d2 100644 --- a/R/sparkR-mosaic/tests.R +++ b/R/sparkR-mosaic/tests.R @@ -1,5 +1,3 @@ -repo<-"https://cran.ma.imperial.ac.uk/" - spark_location <- "/usr/spark-download/unzipped/spark-3.2.1-bin-hadoop2.7" Sys.setenv(SPARK_HOME = spark_location) library(SparkR, lib.loc = c(file.path(spark_location, "R", "lib")))