better follow instructions #222
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
## Read more about GitHub actions the features of this GitHub Actions workflow | |
## at https://lcolladotor.github.io/biocthis/articles/biocthis.html#use_bioc_github_action | |
## | |
## For more details, check the biocthis developer notes vignette at | |
## https://lcolladotor.github.io/biocthis/articles/biocthis_dev_notes.html | |
## | |
## You can add this workflow to other packages using: | |
## > biocthis::use_bioc_github_action() | |
## | |
## Using GitHub Actions exposes you to many details about how R packages are | |
## compiled and installed in several operating system.s | |
### If you need help, please follow the steps listed at | |
## https://github.com/r-lib/actions#where-to-find-help | |
## | |
## If you found an issue specific to biocthis's GHA workflow, please report it | |
## with the information that will make it easier for others to help you. | |
## Thank you! | |
## Acronyms: | |
## * GHA: GitHub Action | |
## * OS: operating system | |
on: | |
push: | |
pull_request: | |
name: R-CMD-check-bioc | |
## These environment variables control whether to run GHA code later on that is | |
## specific to testthat, covr, and pkgdown. | |
## | |
## If you need to clear the cache of packages, update the number inside | |
## cache-version as discussed at https://github.com/r-lib/actions/issues/86. | |
## Note that you can always run a GHA test without the cache by using the word | |
## "/nocache" in the commit message. | |
env: | |
has_testthat: 'false' | |
run_covr: 'false' | |
run_pkgdown: 'false' | |
has_RUnit: 'false' | |
cache-version: 'cache-v1' | |
run_docker: 'false' | |
jobs: | |
build-check: | |
runs-on: ${{ matrix.config.os }} | |
name: ${{ matrix.config.os }} (${{ matrix.config.r }}) | |
container: ${{ matrix.config.cont }} | |
## Environment variables unique to this job. | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
#- { os: ubuntu-latest, r: 'devel', bioc: '3.20', cont: "bioconductor/bioconductor_docker:{{dockerversion}}", rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest" } | |
- { os: macOS-latest, r: 'devel', bioc: '3.20'} | |
#- { os: windows-latest, r: 'devel', bioc: '3.20'} | |
## Check https://github.com/r-lib/actions/tree/master/examples | |
## for examples using the http-user-agent | |
env: | |
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true | |
RSPM: ${{ matrix.config.rspm }} | |
NOT_CRAN: true | |
TZ: UTC | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
## 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 /__w/_temp/Library | |
echo ".libPaths('/__w/_temp/Library')" > ~/.Rprofile | |
## 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 | |
## R is already included in the Bioconductor docker images | |
- name: Setup R from r-lib | |
if: runner.os != 'Linux' | |
uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: ${{ matrix.config.r }} | |
http-user-agent: ${{ matrix.config.http-user-agent }} | |
## pandoc is already included in the Bioconductor docker images | |
- name: Setup pandoc from r-lib | |
if: runner.os != 'Linux' | |
uses: r-lib/actions/setup-pandoc@v2 | |
- name: Install macOS 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 | |
- name: Install udunits | |
run: | | |
# Download the library | |
cd ~/Downloads | |
curl -O https://downloads.unidata.ucar.edu/udunits/2.2.28/udunits-2.2.28.tar.gz | |
# Unpack the distribution in an appropriate place. | |
cd /opt | |
sudo pax -rz < ~/Downloadsudunits-2.2.28.tar.gz | |
# Build and install the package. | |
cd udunits-2.2.28 | |
./configure >& configure.log | |
make all install | |
- name: Install units | |
run: | | |
message(paste('****', Sys.time(), 'installing units ****') | |
install.packages("units", configure.args = c("--with-udunits2-include=/opt/homebrew/Cellar/udunits/2.2.28/include", "--with-udunits2-lib=/opt/homebrew/Cellar/udunits/2.2.28/lib")) | |
shell: Rscript {0} |