dist: trusty
sudo: false
language: erlang
otp_release:
  - 19.3.6.1
addons:
  apt:
    packages:
      - r-base
before_install:
  - ./ci before_install ${JOB:?} "${TRAVIS_BUILD_DIR:?}"
install:
  - ./ci install ${JOB:?} "${TRAVIS_BUILD_DIR:?}"
before_script:
  - ./ci before_script ${JOB:?} "${TRAVIS_BUILD_DIR:?}"
script:
  - ./ci script ${JOB:?} "${TRAVIS_BUILD_DIR:?}"
matrix:
  allow_failures:
  fast_finish: true
env:
  - JOB=minloadtest
  - JOB=dialyzer
  - JOB=xref
cache:
  directories:
    - .plt

dist: trusty
sudo: required
language: erlang
otp_release:
  - 19.3.6.1
before_install:
  - sudo apt-get -qq update
  - sudo apt-get install -y r-cran-plyr r-cran-ggplot2
  - ./ci before_install ${JOB:?} "${TRAVIS_BUILD_DIR:?}"
install:
  - ./ci install ${JOB:?} "${TRAVIS_BUILD_DIR:?}"
before_script:
  - ./ci before_script ${JOB:?} "${TRAVIS_BUILD_DIR:?}"
script:
  - ./ci script ${JOB:?} "${TRAVIS_BUILD_DIR:?}"
matrix:
  allow_failures:
  fast_finish: true
env:
  - JOB=minloadtest
  - JOB=dialyzer
  - JOB=xref
cache:
  directories:
    - .plt

Fix for graphs on CI: prefer R dependencies from Ubuntu repo because of old R
Fix for graphs on CI: prefer R dependencies from Ubuntu repo because of old R

Refs:
* https://docs.travis-ci.com/user/installing-dependencies/#Installing-Packages-on-Standard-Infrastructure
* https://docs.travis-ci.com/user/reference/trusty/#Routing-to-Trusty

Fixes error:
```
Rscript --vanilla priv/summary.r -i tests/current
[1] "plyr"
Loading required package: plyr
Installing package into ‘/home/travis/build/lucafavatella/basho_bench/tmp/R_libs’
(as ‘lib’ is unspecified)
Error in library(p, character.only = TRUE) :
  there is no package called ‘plyr’
Calls: source -> withVisible -> eval -> eval -> library
In addition: Warning message:
package ‘plyr’ is not available (for R version 3.0.2)
Execution halted
make: *** [results] Error 1
```
