language: cpp
sudo: required
services:
    - docker
dist: trusty
os: linux
env:
    - JOB=build
    - JOB=lint
    - JOB=test
install: skip
before_script:
    - if [ ! -d "${HOME}/.cache" ]; then mkdir ${HOME}/.cache; fi
    - cp scripts/AGREEMENT.txt ${HOME}/.cache/.apollo_agreement.txt
    - ./apollo_docker.sh clean
script:
    - ./apollo_docker.sh ${JOB}
notifications:
    email:
        on_success: change
        on_failure: always

language: cpp
sudo: required
services:
    - docker
dist: trusty
os: linux
env:
    - JOB=build
    - JOB=lint
    - JOB=test
cache:
  directories:
  - $HOME/.cache/bazel
install: skip
before_script:
    - if [ ! -d "${HOME}/.cache" ]; then mkdir ${HOME}/.cache; fi
    - cp scripts/AGREEMENT.txt ${HOME}/.cache/.apollo_agreement.txt
script:
    - ./apollo_docker.sh ${JOB}
    - ./apollo_docker.sh clean
    - rm -rf "${HOME}/.cache/bazel/_bazel_${USER}/install"
notifications:
    email:
        on_success: change
        on_failure: always

Speed up ci with cache.
Speed up ci with cache.
