language: r
sudo: required
dist: xenial
cache:
  - packages
  - ccache

r:
  - release
  - devel

before_install:
  - sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable --yes
  - sudo add-apt-repository -y ppa:cran/jq --yes
  - sudo apt-get -qq update
  - sudo apt-get install -y libudunits2-dev libgdal-dev libgeos-dev libproj-dev aria2

env:
  global:
    - R_LIBS="http://cran.rstudio.com"
    - R_BUILD_ARGS="--no-build-vignettes --no-manual"
    - R_CHECK_ARGS="--no-build-vignettes --no-manual --as-cran"
    - R_CHECK_TIMINGS_="0"

apt_packages:
    - libv8-dev
    - libjq-dev
    - libprotobuf-dev
    - libprotoc-dev
    - protobuf-compiler
r_packages:
    - udunits2
    - units
    - covr
    - sf
    - shiny
    - leaflet
    - mapview
    - mapedit
after_success:
  - Rscript -e 'library(covr);coveralls();codecov()'
