Skip to content

Commit

Permalink
removed some cruft from the R build files
Browse files Browse the repository at this point in the history
  • Loading branch information
sllynn committed Oct 25, 2023
1 parent 0c9c598 commit a6f2fc0
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 52 deletions.
15 changes: 0 additions & 15 deletions .github/actions/r_build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
35 changes: 0 additions & 35 deletions R/install_deps.R
Original file line number Diff line number Diff line change
@@ -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")
2 changes: 0 additions & 2 deletions R/sparkR-mosaic/tests.R
Original file line number Diff line number Diff line change
@@ -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")))
Expand Down

0 comments on commit a6f2fc0

Please sign in to comment.