.travis.yml 775 字节
Newer Older
朔-望's avatar
朔-望 已提交
1 2
language: cpp
cache: ccache
Y
Yan Chunwei 已提交
3
dist: xenial
朔-望's avatar
朔-望 已提交
4 5 6

os:
  - linux
朔-望's avatar
朔-望 已提交
7

朔-望's avatar
朔-望 已提交
8 9 10
addons:
  apt:
    packages:
11 12 13 14 15 16 17
#      - git
#      - python
#      - python-pip
#      - python2.7-dev
#      - libc6-i386
#      - curl
      - clang-format-3.8
18
        
朔-望's avatar
朔-望 已提交
19
before_install:
20
  - sudo pip install cpplint flake8 pre-commit==1.10.3
21
  - sudo ln -s /usr/bin/clang-format-3.8 /usr/bin/clang-format
22
  # Download and install recent cmake
朔-望's avatar
朔-望 已提交
23

朔-望's avatar
朔-望 已提交
24
script:
25
  - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
朔-望's avatar
朔-望 已提交
26
  - | 
朔-望's avatar
朔-望 已提交
27 28
    function timeout() { perl -e 'alarm shift; exec @ARGV' "$@"; }
  - |
朔-望's avatar
朔-望 已提交
29
    timeout 600 .travis/pre-commit-job.sh # 10min timeout
朔-望's avatar
朔-望 已提交
30 31 32 33 34 35
    RESULT=$?; if [ $RESULT -eq 0 ] || [ $RESULT -eq 142 ]; then true; else exit 1; fi;

notifications:
  email:
    on_success: change
    on_failure: always