library path for linux actions #16
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
pull_request: | |
name: R-CMD-check | |
jobs: | |
check: | |
runs-on: ${{ matrix.config.os }} | |
env: | |
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true | |
_R_CHECK_TESTS_NLINES_: 0 | |
NOT_CRAN: true | |
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: true | |
_R_CHECK_FORCE_SUGGESTS_: false #TODO: drop this for now! | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- {os: macos-latest, r: 'release'} | |
- {os: windows-latest, r: 'release', rtools-version: '44'} | |
- {os: ubuntu-latest, r: 'release'} | |
steps: | |
## Most of these steps are the same as the ones in | |
## https://github.com/r-lib/actions/blob/master/examples/check-standard.yaml | |
## If they update their steps, we will also need to update ours. | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
## pandoc | |
- name: Setup pandoc from r-lib | |
if: runner.os != 'Linux' | |
uses: r-lib/actions/setup-pandoc@v2 | |
# ## Set the R library to the directory matching the | |
# ## R packages cache step further below when running on Docker (Linux). | |
# - name: Set R Library home on Linux | |
# if: runner.os == 'Linux' | |
# run: | | |
# mkdir /R-site-library | |
# echo ".libPaths('/R-site-library')" > ~/.Rprofile | |
## R is already included in the Bioconductor docker images | |
- name: Setup R from r-lib | |
uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: ${{ matrix.config.r }} | |
rtools-version: ${{ matrix.config.rtools-version }} | |
## Windows dependencies | |
- name: Install Windows system dependencies | |
if: runner.os == 'Windows' | |
run: | | |
## Edit below if you have any Windows system dependencies | |
shell: Rscript {0} | |
## macOS/linux dependencies | |
- name: Install macOS/linux system dependencies | |
if: matrix.config.os == 'macos-latest' | |
run: | | |
## Enable installing XML from source if needed | |
brew install libxml2 | |
echo "XML_CONFIG=/usr/local/opt/libxml2/bin/xml2-config" >> $GITHUB_ENV | |
## Required to install magick as noted at | |
## https://github.com/r-lib/usethis/commit/f1f1e0d10c1ebc75fd4c18fa7e2de4551fd9978f#diff-9bfee71065492f63457918efcd912cf2 | |
brew install imagemagick@6 | |
## For textshaping, required by ragg, and required by pkgdown | |
brew install harfbuzz fribidi | |
## For installing usethis's dependency gert | |
brew install libgit2 | |
## Required for tcltk | |
brew install xquartz --cask | |
## remotes, devtools | |
- name: Query dependencies | |
run: | | |
install.packages('remotes') | |
install.packages('devtools') | |
shell: Rscript {0} | |
## BiocManager | |
- name: Install BiocManager | |
run: | | |
remotes::install_cran("BiocManager") | |
shell: Rscript {0} | |
# All Other dependencies | |
- name: Install dependencies | |
run: | | |
## Try installing the package dependencies in steps. First the local | |
## dependencies, then any remaining dependencies to avoid the | |
## issues described at | |
## https://stat.ethz.ch/pipermail/bioc-devel/2020-April/016675.html | |
## https://github.com/r-lib/remotes/issues/296 | |
## Ideally, all dependencies should get installed in the first pass. | |
## Pass #1 at installing dependencies | |
remotes::install_local(dependencies = TRUE, repos = BiocManager::repositories(), build_vignettes = FALSE, upgrade = TRUE) | |
continue-on-error: true | |
shell: Rscript {0} | |
# ## Linux dependencies for OpenCV | |
# - name: Install OpenCV for linux | |
# if: matrix.config.os == 'ubuntu-latest' | |
# run: | | |
# ## Edit below if you have any ubuntu/linux dependencies, e.g. OpenCV | |
# git clone https://github.com/opencv/opencv.git | |
# git clone https://github.com/opencv/opencv_contrib.git | |
# | |
# mkdir build | |
# cd build | |
# cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D OPENCV_GENERATE_PKGCONFIG=ON -D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules/ -D BUILD_opencv_xfeatures2d=ON ../opencv/ | |
# | |
# make -j5 | |
# make install | |
# | |
# sh -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf' | |
# ldconfig | |
## R CMD Check | |
- name: Run CMD check | |
env: | |
_R_CHECK_CRAN_INCOMING_: false | |
DISPLAY: 99.0 | |
run: | | |
options(crayon.enabled = TRUE) | |
rcmdcheck::rcmdcheck( | |
args = c("--no-manual", "--no-vignettes", "--timings"), | |
build_args = c("--no-manual", "--keep-empty-dirs", "--no-resave-data"), | |
error_on = "error", | |
check_dir = "check" | |
) | |
shell: Rscript {0} |