.travis.yml 1.6 KB
Newer Older
Y
Yu Yang 已提交
1 2 3 4
language: cpp
cache: ccache
sudo: required
dist: trusty
Y
Yu Yang 已提交
5 6 7
os:
  - linux
  - osx
Y
Yu Yang 已提交
8 9 10
env:
  - JOB=DOCS
  - JOB=BUILD_AND_TEST
Y
Yu Yang 已提交
11
  - JOB=PRE_COMMIT
Y
Yu Yang 已提交
12 13 14
matrix:
  exclude:
    - os: osx
Y
Yu Yang 已提交
15 16 17
      env: JOB=DOCS  # Only generate documentation in linux.
    - os: osx
      env: JOB=PRE_COMMIT # Only check pre-commit hook in linux
Y
Yu Yang 已提交
18

Y
Yu Yang 已提交
19 20 21 22 23 24 25 26 27 28 29 30 31 32
addons:
  apt:
    packages:
      - gcc-4.8
      - g++-4.8
      - wget
      - git
      - build-essential
      - libatlas-base-dev
      - python
      - python-pip
      - python2.7-dev
      - m4
      - libprotobuf-dev
Y
Yu Yang 已提交
33
      - doxygen
Y
Yu Yang 已提交
34 35 36 37 38 39 40
      - protobuf-compiler
      - python-protobuf
      - python-numpy
      - python-wheel
      - libgoogle-glog-dev
      - libgflags-dev
      - libgtest-dev
G
gangliao 已提交
41 42
      - curl
      - lcov
Y
Yu Yang 已提交
43
      - graphviz
Y
Yu Yang 已提交
44
      - swig
Y
Yu Yang 已提交
45
      - clang-format-3.8
Y
Yu Yang 已提交
46
before_install:
47 48
  - |
    if [ ${JOB} == "BUILD_AND_TEST" ]; then
49
      if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.md$)|(\.rst$)|(\.jpg$)|(\.png$)'
L
liaogang 已提交
50
      then
51 52
        echo "Only markdown docs were updated, stopping build process."
        exit
L
liaogang 已提交
53
      fi
54
    fi
Y
Yu Yang 已提交
55 56
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo paddle/scripts/travis/before_install.linux.sh; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then paddle/scripts/travis/before_install.osx.sh; fi
Y
Yu Yang 已提交
57 58
  - if [[ "$JOB" == "PRE_COMMIT" ]]; then sudo ln -s /usr/bin/clang-format-3.8 /usr/bin/clang-format; fi
  - pip install wheel protobuf sphinx breathe recommonmark virtualenv numpy sphinx_rtd_theme pre-commit
Y
Yu Yang 已提交
59
script:
Y
Yu Yang 已提交
60
  - paddle/scripts/travis/main.sh
Y
Yu Yang 已提交
61 62 63 64
notifications:
  email:
    on_success: change
    on_failure: always