Skip to content

Commit

Permalink
[r/ci] Unbreak pkgdown CI (#2703)
Browse files Browse the repository at this point in the history
* [r/ci] Unbreak `pkgdown` CI [WIP]

* feedback from paul h
  • Loading branch information
johnkerl authored Jun 11, 2024
1 parent 99b19a5 commit 439842f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,23 @@ jobs:
use-public-rspm: true
working-directory: "apis/r"

- name: Set additional repositories (macOS)
if: ${{ matrix.os != 'ubuntu-latest' }}
run: echo 'options(repos = c("https://tiledb-inc.r-universe.dev", getOption("repos")), timeout = 300L)' | tee -a ~/.Rprofile

- name: Set additional repositories (Linux)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
rversion <- paste(strsplit(as.character(getRversion()), split = '\\.')[[1L]][1:2], collapse = '.')
codename <- system('. /etc/os-release; echo ${VERSION_CODENAME}', intern = TRUE)
repo <- "https://tiledb-inc.r-universe.dev"
(opt <- sprintf('options(repos = c("%s/bin/linux/%s/%s", "%s", getOption("repos")), timeout = 300L)', repo, codename, rversion, repo))
cat(opt, "\n", file = "~/.Rprofile", append = TRUE)
shell: Rscript {0}

- name: Install tiledb-r
run: cd apis/r && Rscript tools/install-tiledb-r.R

# Run this daily to surface errors as tracked at
# https://github.com/single-cell-data/TileDB-SOMA/issues/2052
- name: Install dependencies
Expand Down
6 changes: 4 additions & 2 deletions apis/r/tools/install-pkgdown-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ set -euo pipefail
export R_REMOTES_NO_ERRORS_FROM_WARNINGS='true'
Rscript -e 'install.packages(c("remotes", "pkgdown"))'
cd apis/r
Rscript -e 'remotes::install_deps(dependencies = TRUE)'
Rscript -e 'remotes::install_local()'
Rscript -e 'remotes::install_deps(dependencies = TRUE, upgrade=FALSE)'
# Need dependencies = FALSE to avoid getting latest/sometimes-too-new r-tiledb from CRAN when we
# really want it from our r-universe where we control the version we want:
Rscript -e 'remotes::install_local(dependencies = FALSE)'
cd ../..

0 comments on commit 439842f

Please sign in to comment.