Skip to content

Fix #757

Fix #757 #404

Workflow file for this run

# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
on:
push:
branches:
- master
- devel
pull_request:
branches:
- master
- devel
name: R-CMD-check
jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
strategy:
fail-fast: false
matrix:
config:
#- {os: windows-latest, r: 'devel', rglusenull: "true"}
- {os: windows-latest, r: 'release', rglusenull: "true"}
#- {os: windows-latest, r: '3.6', rglusenull: "true"}
#- {os: macOS-latest, r: 'release', rglusenull: "true"}
- {os: ubuntu-latest, r: 'release'}
#- {os: ubuntu-latest, r: 'devel'}
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
_R_CHECK_FORCE_SUGGESTS_: false
RGL_USE_NULL: ${{ matrix.config.rglusenull }}
RSPM: ${{ matrix.config.rspm }}
NOT_CRAN: true
OMP_NUM_THREADS: 1
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
- uses: r-lib/actions/setup-pandoc@v2
- name: Brew and macOS config
if: runner.os == 'macOS'
run: |
# conflicts with gfortran from r-lib/actions when linking gcc
rm '/usr/local/bin/gfortran'
brew install gdal proj geos
brew install --cask xquartz
- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}
- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v1
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-2-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-2-
- name: Install system dependencies
if: runner.os == 'Linux'
run: |
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt update
sudo apt install \
libgdal-dev \
libgeos++-dev \
libudunits2-dev \
libproj-dev \
libx11-dev \
libgl1-mesa-dev \
libglu1-mesa-dev \
libfreetype6-dev \
libnode-dev \
libxt-dev \
libfftw3-dev
- name: Install dependencies
run: |
install.packages("BiocManager")
BiocManager::install("EBImage")
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
remotes::install_cran("covr")
shell: Rscript {0}
- name: Check
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}
- name: Show testthat output
if: always()
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash
- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
- name: Test coverage
if: matrix.config.os == 'ubuntu-20.04' && matrix.config.r == 'devel'
run: covr::codecov(type = "all")
shell: Rscript {0}