Skip to content

Commit

Permalink
[r,ci] Update r-ci.sh, remove unneeded entries from r-ci.yml (#2475
Browse files Browse the repository at this point in the history
…) (#2477)

* [r,ci] Update r-ci.sh, remove unneeded entries from r-ci.yml

* Tweak identified cause: no forcing binary pkg type

Co-authored-by: Dirk Eddelbuettel <[email protected]>
  • Loading branch information
github-actions[bot] and eddelbuettel authored Apr 24, 2024
1 parent 563a8b5 commit 8c7c3b7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
19 changes: 7 additions & 12 deletions .github/workflows/r-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@ jobs:
- name: Bootstrap
run: cd apis/r && tools/r-ci.sh bootstrap

- name: Set pkgType to binary (macOS)
if: ${{ matrix.os == 'macOS-latest' }}
run: cat("\noptions(pkgType = 'binary')\n", file = "~/.Rprofile", append = TRUE)
shell: Rscript {0}

- name: Install BioConductor package SingleCellExperiment
run: cd apis/r && tools/r-ci.sh install_bioc SingleCellExperiment

Expand Down Expand Up @@ -89,12 +84,12 @@ jobs:
- name: Dependencies
run: cd apis/r && tools/r-ci.sh install_all

- name: Install dataset packages from source (macOS)
if: ${{ matrix.os == 'macOS-latest' }}
run: cd apis/r && _CI_PKG_TYPE_=both _CI_USE_BIOC_=true Rscript tools/install_missing_deps.R
# - name: Install dataset packages from source (macOS)
# if: ${{ matrix.os == 'macOS-latest' }}
# run: cd apis/r && _CI_PKG_TYPE_=both _CI_USE_BIOC_=true Rscript tools/install_missing_deps.R

- name: CMake
uses: lukka/get-cmake@latest
# - name: CMake
# uses: lukka/get-cmake@latest

#- name: MkVars
# run: mkdir ~/.R && echo "CXX17FLAGS=-Wno-deprecated-declarations -Wno-deprecated" > ~/.R/Makevars
Expand All @@ -106,8 +101,8 @@ jobs:
# if: ${{ matrix.os == 'ubuntu-latest' }}
# run: sudo ldconfig
#
- name: Update Packages
run: Rscript -e 'update.packages(ask=FALSE)'
# - name: Update Packages
# run: Rscript -e 'update.packages(ask=FALSE)'

# - name: Build Package
# run: cd apis/r && R CMD build --no-build-vignettes --no-manual .
Expand Down
15 changes: 9 additions & 6 deletions apis/r/tools/r-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@ set -e
# Or ratherm set it for a lot noisier output
# set -x

CRAN=${CRAN:-"https://cloud.r-project.org"}
# Where do we run? OS can be 'Linux' or 'Darwin', ARCH can be 'x86_64' or 'arm64'
OS=$(uname -s)
RVER=${RVER:-"4.3.2"}
ARCH=$(uname -m)

# Default CRAN repo (use the CDN) and R verssion
CRAN=${CRAN:-"https://cloud.r-project.org"}
RVER=${RVER:-"4.3.3"}

## Optional drat repos, unset by default
DRAT_REPOS=${DRAT_REPOS:-""}
Expand Down Expand Up @@ -213,11 +217,10 @@ BootstrapLinuxOptions() {
}

BootstrapMac() {
# Install from latest CRAN binary build for OS X
echo "Downloading ${RVER} for macOS"
wget ${CRAN}/bin/macosx/big-sur-x86_64/base/R-${RVER}-x86_64.pkg -O /tmp/R-latest.pkg
# Install from latest CRAN binary build for OS X (given ${ARCH} from 'uname -m')
wget ${CRAN}/bin/macosx/big-sur-${ARCH}/base/R-${RVER}-${ARCH}.pkg -O /tmp/R-latest.pkg

echo "Installing macOS binary package for R"
echo "Installing macOS binary package for R on ${ARCH}"
sudo installer -pkg "/tmp/R-latest.pkg" -target /
rm "/tmp/R-latest.pkg"

Expand Down

0 comments on commit 8c7c3b7

Please sign in to comment.