os: linux
dist: trusty
sudo: false
language: java
jdk: oraclejdk8

branches:
  only:
  - master

before_cache:
- rm -rf $HOME/.cache/bazel/_bazel_travis/install/
cache:
  directories:
  - $HOME/local
  - $HOME/.bazel
  - $HOME/.cache/bazel

addons:
  apt:
    sources:
    - ubuntu-toolchain-r-test
    packages:
    - libstdc++6
    - build-essential
    - g++

before_install:
- .travis/install-bazel.sh 0.5.2
- bazel version
- bazel info
- bazel fetch --curses=no -- "//... -//:jsonnetunit-docs"
install:
- bazel build $BAZEL_BUILD_OPTS --show_progress_rate_limit 0 -- //... -//:jsonnetunit-docs
- bazel build $BAZEL_BUILD_OPTS -- //:jsonnetunit-docs
script:
- bazel test $BAZEL_BUILD_OPTS --show_progress_rate_limit 0 --test_output=streamed -- //...

env:
  global:
  - PATH=$PATH:$HOME/local/bin
  - BAZEL_BUILD_OPTS="--curses=no --genrule_strategy=standalone --spawn_strategy=standalone --verbose_failures -j 20"

os: linux
dist: trusty
sudo: false
language: java
jdk: oraclejdk8

branches:
  only:
  - master

before_cache:
- rm -rf $HOME/.cache/bazel/_bazel_travis/install/
cache:
  directories:
  - $HOME/local
  - $HOME/.bazel
  - $HOME/.cache/bazel

addons:
  apt:
    sources:
    - ubuntu-toolchain-r-test
    packages:
    - libstdc++6
    - build-essential
    - g++

before_install:
- .travis/install-bazel.sh 0.13.0
- bazel version
- bazel info
- bazel fetch --curses=no -- "//... -//:jsonnetunit-docs"
install:
- bazel build $BAZEL_BUILD_OPTS --show_progress_rate_limit 0 -- //... -//:jsonnetunit-docs
- bazel build $BAZEL_BUILD_OPTS -- //:jsonnetunit-docs
script:
- bazel test $BAZEL_BUILD_OPTS --show_progress_rate_limit 0 --test_output=streamed -- //...

env:
  global:
  - PATH=$PATH:$HOME/local/bin
  - BAZEL_BUILD_OPTS="--curses=no --genrule_strategy=standalone --spawn_strategy=standalone --verbose_failures -j 20"

Upgrade Bazel used on TravisCI
Upgrade Bazel used on TravisCI
