.travis.yml 1.5 KB
Newer Older
Y
Yu Yang 已提交
1
language: cpp
2 3 4
cache:
  directories:
    - $HOME/.ccache
Y
Yu Yang 已提交
5
    - $HOME/.cache/pip
Y
Yu Yang 已提交
6
    - $TRAVIS_BUILD_DIR/build/third_party
7
    - $TRAVIS_BUILD_DIR/build_android/third_party
8
    - $TRAVIS_BUILD_DIR/build_ios/third_party
Y
Yu Yang 已提交
9 10
sudo: required
dist: trusty
Y
Yu Yang 已提交
11 12
os:
  - linux
Y
Yu Yang 已提交
13
env:
Y
Yi Wang 已提交
14 15
  - JOB=build_doc
  - JOB=check_style
L
Liu Yiqun 已提交
16
  - JOB=build_android
17 18 19 20 21 22
matrix:
  include:
    - env: JOB=build_ios
      os: osx
      osx_image: xcode8.3
      compiler: clang
Y
Yu Yang 已提交
23 24 25 26 27 28 29
addons:
  apt:
    packages:
      - gcc-4.8
      - g++-4.8
      - git
      - build-essential
30
      - python
Y
Yu Yang 已提交
31
      - python-pip
32
      - python2.7-dev
33 34
      - python-numpy
      - python-wheel
L
liaogang 已提交
35
      - libboost-dev
G
gangliao 已提交
36
      - curl
L
liaogang 已提交
37
      - swig
Y
Yu Yang 已提交
38
      - graphviz
Y
Yu Yang 已提交
39
      - clang-format-3.8
40 41
      - automake
      - libtool
42
      - ccache
Y
Yu Yang 已提交
43
before_install:
Y
Yi Wang 已提交
44
  - if [[ "$JOB" == "check_style" ]]; then sudo ln -s /usr/bin/clang-format-3.8 /usr/bin/clang-format; fi
W
wuyi05 已提交
45
  # Paddle is using protobuf 3.1 currently. Protobuf 3.2 breaks the compatibility. So we specify the python
Y
Yu Yang 已提交
46
  # protobuf version.
47 48
  - pip install -r $TRAVIS_BUILD_DIR/python/requirements.txt
  - pip install wheel sphinx==1.5.6 recommonmark sphinx-rtd-theme==0.1.9 virtualenv pre-commit LinkChecker
Y
Yu Yang 已提交
49 50
  - |
    function timeout() { perl -e 'alarm shift; exec @ARGV' "$@"; }
Y
Yu Yang 已提交
51
script:
52
  - |
W
wuyi05 已提交
53
    timeout 2580 paddle/scripts/travis/${JOB}.sh # 43min timeout
54
    RESULT=$?; if [ $RESULT -eq 0 ] || [ $RESULT -eq 142 ]; then true; else false; fi;
Y
Yu Yang 已提交
55 56 57 58
notifications:
  email:
    on_success: change
    on_failure: always