# Sample .travis.yml for R projects

language: r
cache: packages
dist: trusty
sudo: required
warnings_are_errors: false
bioc_required: true

# Add GDAL, GEOS, proj, and units2 dependencies.

before_install:
  - Rscript -e 'update.packages(ask = FALSE)'
  - curl -OL http://raw.github.com/craigcitro/r-travis/master/scripts/travis-tool.sh
  - chmod 755 ./travis-tool.sh
  - sudo add-apt-repository ppa:ubuntugis/ppa --yes
  - sudo apt-get --yes --force-yes update -qq
  - sudo apt-get install --yes libudunits2-dev libproj-dev libgeos-dev libgdal-dev libgsl0-dev

# Install packages from github
#r_github_packages:
#  - zhengxwen/gdsfmt

notifications:
  email:
    on_success: change
    on_failure: change

os:
  - linux
  #- osx
env:
  global:
    - NOT_CRAN: true
    - R_CHECK_ARGS="--as-cran --timings"
    - R_CHECK_TIME="TRUE"
    - R_CHECK_TESTS="TRUE"
    - _R_CHECK_TIMINGS_="0"
    - _R_CHECK_FORCE_SUGGESTS_=false
    - MAKEFLAGS="-j 2"
    - TRAVIS_CXXFLAGS="-Wall -Wextra -pedantic -Werror"
    - R_REMOTES_NO_ERRORS_FROM_WARNINGS=true
    - _R_CHECK_SYSTEM_CLOCK_=FALSE


# Binary versions of packages to reduce build time.
r_binary_packages:
  - data.table
  - dplyr
  - markdown
  - readr
  - rlang
  - rmarkdown
  - stringi
  - tidyr
  - tibble
  - ggplot2
