.travis.yml 689 字节
Newer Older
朔-望's avatar
朔-望 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
language: cpp
cache: ccache
sudo: required
dist: trusty

os:
  - linux
env:
  - JOB=check_style

addons:
  apt:
    packages:
      - git
      - python
      - python-pip
      - python2.7-dev
      - clang-format-3.8

before_install:
  - sudo pip install -U virtualenv pre-commit pip

script:
  - if [[ "$JOB" == "check_style" ]]; then sudo ln -s /usr/bin/clang-format-3.8 /usr/bin/clang-format; fi
  - |
    function timeout() { perl -e 'alarm shift; exec @ARGV' "$@"; }
  - |
    timeout 600 .travis/${JOB}.sh # 10min timeout
    RESULT=$?; if [ $RESULT -eq 0 ] || [ $RESULT -eq 142 ]; then true; else exit 1; fi;

notifications:
  email:
    on_success: change
    on_failure: always