| sudo: required |
| dist: trusty |
| language: |
| - java |
| jdk: |
| - oraclejdk8 # Building Bazel requires JDK8. |
| addons: |
| apt: |
| sources: |
| - sourceline: 'deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8' |
| key_url: 'https://storage.googleapis.com/bazel-apt/doc/apt-key.pub.gpg' |
| packages: |
| - bazel |
| |
| install: |
| - go get -u github.com/bazelbuild/buildifier/buildifier |
| |
| script: |
| # Check that all of our tools and samples build |
| - bazel clean && bazel build //... |
| # Check that all of our tests pass |
| - bazel clean && bazel test //... |
| |
| # Check for issues with the format of our bazel config files. |
| - buildifier -mode=check $(find . -name BUILD -type f) |
| - buildifier -mode=check $(find . -name WORKSPACE -type f) |
| - buildifier -mode=check $(find . -name '*.bzl' -type f) |