.travis.yml 1.3 KB
Newer Older
朔-望's avatar
朔-望 已提交
1 2 3 4 5 6 7 8
language: cpp
cache: ccache
sudo: required
dist: trusty

os:
  - linux
env:
9
  global:
朔-望's avatar
朔-望 已提交
10
    - JOB=check_style
11
    - CMAKE_URL=https://cmake.org/files/v3.11/cmake-3.11.1-Linux-x86_64.tar.gz
朔-望's avatar
朔-望 已提交
12 13
addons:
  apt:
14 15 16
    sources:
      - llvm-toolchain-trusty-6.0
      - ubuntu-toolchain-r-test
朔-望's avatar
朔-望 已提交
17 18 19 20 21
    packages:
      - git
      - python
      - python-pip
      - python2.7-dev
22 23 24
      - clang-6.0
      - libc6-i386
      - curl
朔-望's avatar
朔-望 已提交
25

26 27 28
compiler:
  - clang
        
朔-望's avatar
朔-望 已提交
29 30
before_install:
  - sudo pip install -U virtualenv pre-commit pip
31 32 33 34 35 36 37 38 39 40 41 42
  # Download and install recent cmake
  - |
    if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
      CMAKE_URL=${CMAKE_URL}
      mkdir -p ${DEPS_DIR}/cmake
      travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C ${DEPS_DIR}/cmake
      export PATH=${DEPS_DIR}/cmake/bin:${PATH}
    fi

install:
  - if [ "$CXX" = "g++" ]; then export CXX="g++-5" CC="gcc-5"; fi
  - if [ "$CXX" = "clang++" ]; then export CXX="clang++-6.0" CC="clang-6.0"; fi
朔-望's avatar
朔-望 已提交
43 44 45

script:
  - |
朔-望's avatar
朔-望 已提交
46
    
朔-望's avatar
朔-望 已提交
47 48 49 50 51 52 53 54 55
    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