.travis.yml 1.7 KB
Newer Older
Y
Yu Yang 已提交
1
group: deprecated-2017Q2
Y
Yu Yang 已提交
2
language: cpp
3 4 5 6
cache:
  directories:
    - $HOME/third_party
    - $HOME/.ccache
Y
Yu Yang 已提交
7
    - $HOME/.cache/pip
Y
Yu Yang 已提交
8 9
sudo: required
dist: trusty
Y
Yu Yang 已提交
10 11
os:
  - linux
Y
Yu Yang 已提交
12 13 14
env:
  - JOB=DOCS
  - JOB=BUILD_AND_TEST
Y
Yu Yang 已提交
15
  - JOB=PRE_COMMIT
Y
Yu Yang 已提交
16 17 18 19 20
addons:
  apt:
    packages:
      - gcc-4.8
      - g++-4.8
L
liaogang 已提交
21
      - gfortran-4.8
Y
Yu Yang 已提交
22 23
      - git
      - build-essential
24
      - python
Y
Yu Yang 已提交
25
      - python-pip
26
      - python2.7-dev
27 28
      - python-numpy
      - python-wheel
L
liaogang 已提交
29
      - libboost-dev
G
gangliao 已提交
30
      - curl
L
liaogang 已提交
31
      - swig
Y
Yu Yang 已提交
32
      - graphviz
Y
Yu Yang 已提交
33
      - clang-format-3.8
34 35
      - automake
      - libtool
36
      - ccache
Y
Yu Yang 已提交
37
before_install:
38 39
  - |
    if [ ${JOB} == "BUILD_AND_TEST" ]; then
Y
Yu Yang 已提交
40 41 42 43 44 45 46
      local change_list=`git diff --name-only $TRAVIS_COMMIT_RANGE`
      if [ $? -eq 0 ]; then  # if git diff return no zero, then rerun unit test.
        if ! echo ${change_list} | grep -qvE '(\.md$)|(\.rst$)|(\.jpg$)|(\.png$)'
        then
          echo "Only markdown docs were updated, stopping build process."
          exit
        fi
L
liaogang 已提交
47
      fi
48
    fi
Y
Yu Yang 已提交
49
  - if [[ "$JOB" == "PRE_COMMIT" ]]; then sudo ln -s /usr/bin/clang-format-3.8 /usr/bin/clang-format; fi
Y
Yu Yang 已提交
50 51
  # Paddle is using protobuf 3.1 currently. Protobuf 3.2 breaks the compatibility. So we specify the python 
  # protobuf version.
D
dzhwinter 已提交
52 53
  - 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
Q
qiaolongfei 已提交
54
  - eval "$(GIMME_GO_VERSION=1.8.3 gimme)"
Y
Yu Yang 已提交
55 56
  - |
    function timeout() { perl -e 'alarm shift; exec @ARGV' "$@"; }
Y
Yu Yang 已提交
57
script:
Y
Yu Yang 已提交
58 59 60
  - | 
    timeout 2580 paddle/scripts/travis/main.sh  # 43min timeout
    RESULT=$?; if [ $RESULT -eq 0 ] || [ $RESULT -eq 142 ]; then true; else false; fi;
Y
Yu Yang 已提交
61 62 63 64
notifications:
  email:
    on_success: change
    on_failure: always