language: R
cache: packages
sudo: true
dist: trusty

# environment variables set for all builds
env:
  global:
  # don't treat missing suggested packages as error
  - _R_CHECK_FORCE_SUGGESTS_=false
  # switch off vdiffr by default
  - VDIFFR_RUN_TESTS=false

after_success:
  - Rscript -e 'covr::codecov()'

before_install:
  - sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable --yes
  - sudo apt-get --yes --force-yes update -qq
  - sudo apt-get install --yes libudunits2-dev libproj-dev libgeos-dev libgdal-dev
  - Rscript -e 'update.packages(ask = FALSE)'