language: r
services:
  - docker

r:
  - release
#  - oldrel
#  - devel

cache: packages
sudo: required
dist: xenial

addons:
  apt:
    packages:
      # needed by sys, https://github.com/jeroen/sys/blob/master/.travis.yml
      - iputils-ping
      - libapparmor-dev

before_install:
  - add-apt-repository ppa:ubuntugis/ubuntugis-unstable --yes
  - apt-get --yes --force-yes update -qq
  - apt-get install --yes libudunits2-dev libproj-dev libgeos-dev libgdal-dev
  # activate liblwgeom by:
  - ldconfig
  #- "Rscript -e 'update.packages(ask = FALSE)'" # https://github.com/travis-ci/travis-ci/issues/6850
  - "Rscript -e 'install.packages(\"BiocManager\")'"
  - "Rscript -e 'BiocManager::install(\"BiocGenerics\")'"
  # for stevedore, see https://github.com/richfitz/stevedore/blob/master/.travis.yml
  - pip install -U setuptools
  - pip install -U docker
  # pull baseimage for tests:
  - "docker pull rocker/r-ver:latest"
  - "docker pull rocker/r-ver:3.4.3" # used in tests
  - "docker pull rocker/r-ver:3.6.0"
  - "docker pull rocker/geospatial:4.0.5"

# don't do vignettes (relevant when trying to get on CRAN)
r_build_args: "--no-manual --no-build-vignettes"
r_check_args: "--no-manual --ignore-vignettes" # --as-cran

warnings_are_errors: true
