## .travis.yml file for use with metacran/r-builder
## See https://github.com/metacran/r-builder for details.

language: c

sudo: required

before_install:
  - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
  - sudo apt-get update -qq
  - sudo apt-get install -qq libyajl-dev libxml2-dev libxqilla-dev libstdc++-4.8-dev
  - sudo apt-get install -qq g++-4.8
  - export CXX="g++-4.8"
  - export CC="gcc-4.8"
  - curl -OL https://raw.githubusercontent.com/metacran/r-builder/master/pkg-build.sh
  - chmod 755 pkg-build.sh
  - ./pkg-build.sh bootstrap

install:
  - ./pkg-build.sh install_bioc_deps
  - ./pkg-build.sh install_github jimhester/covr

script:
   - ./pkg-build.sh run_tests

after_success:
  - ./pkg-build.sh run_script -e 'covr::codecov()'

after_failure:
  - ./pkg-build.sh dump_logs

notifications:
  email:
    on_success: change
    on_failure: change

env:
  global:
    - BOOTSTRAP_LATEX=true # Required to build pdf vignettes (+ manual); slower
    - R_CHECK_ARGS="--no-vignettes --timings" # Mimic BioC build machines
  matrix:
    - RVERSION=devel # BioC 3.3 uses R 3.3.x (R-devel at the time of writing).
                     # This needs to be manually updated upon new BioC version.