.travis.yml 1.8 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
L
Liu Yiqun 已提交
7
    - $HOME/android-toolchain-gcc
Y
Yu Yang 已提交
8 9
sudo: required
dist: trusty
Y
Yu Yang 已提交
10 11
os:
  - linux
Y
Yu Yang 已提交
12
env:
Y
Yi Wang 已提交
13 14
  - JOB=build_doc
  - JOB=check_style
L
Liu Yiqun 已提交
15
  - JOB=build_android
Y
Yu Yang 已提交
16 17 18 19 20 21 22
addons:
  apt:
    packages:
      - gcc-4.8
      - g++-4.8
      - git
      - build-essential
23
      - python
Y
Yu Yang 已提交
24
      - python-pip
25
      - python2.7-dev
26 27
      - python-numpy
      - python-wheel
L
liaogang 已提交
28
      - libboost-dev
G
gangliao 已提交
29
      - curl
L
liaogang 已提交
30
      - swig
Y
Yu Yang 已提交
31
      - graphviz
Y
Yu Yang 已提交
32
      - clang-format-3.8
33 34
      - automake
      - libtool
35
      - ccache
Y
Yu Yang 已提交
36
before_install:
Y
Yi Wang 已提交
37
  - if [[ "$JOB" == "check_style" ]]; then sudo ln -s /usr/bin/clang-format-3.8 /usr/bin/clang-format; fi
L
Liu Yiqun 已提交
38 39 40 41 42 43
  - if [[ "JOB" == "build_android" ]]; then
      mkdir -p $HOME/tmp/$JOB;
      cd $HOME/tmp/$JOB; wget -q https://dl.google.com/android/repository/android-ndk-r14b-linux-x86_64.zip; unzip -q android-ndk-r14b-linux-x86_64.zip;
      sh $HOME/tmp/$JOB/android-ndk-r14b/build/tools/make-standalone-toolchain.sh --arch=arm --platform=android-21 --install-dir=$HOME/android-toolchain-gcc;
      cd $HOME; rm -rf $HOME/tmp/$JOB;
    fi
W
wuyi05 已提交
44
  # Paddle is using protobuf 3.1 currently. Protobuf 3.2 breaks the compatibility. So we specify the python
Y
Yu Yang 已提交
45
  # protobuf version.
D
dzhwinter 已提交
46 47
  - pip install numpy wheel 'protobuf==3.1' sphinx==1.5.6 recommonmark sphinx-rtd-theme==0.1.9 virtualenv pre-commit requests==2.9.2 LinkChecker
  - pip install rarfile
W
wuyi05 已提交
48
  - curl https://glide.sh/get | bash
Q
qiaolongfei 已提交
49
  - eval "$(GIMME_GO_VERSION=1.8.3 gimme)"
Y
Yu Yang 已提交
50 51
  - |
    function timeout() { perl -e 'alarm shift; exec @ARGV' "$@"; }
Y
Yu Yang 已提交
52
script:
53
  - |
W
wuyi05 已提交
54
    timeout 2580 paddle/scripts/travis/${JOB}.sh # 43min timeout
55
    RESULT=$?; if [ $RESULT -eq 0 ] || [ $RESULT -eq 142 ]; then true; else false; fi;
Y
Yu Yang 已提交
56 57 58 59
notifications:
  email:
    on_success: change
    on_failure: always