language: cpp cache: - pip - ccache - yarn - npm sudo: required dist: trusty os: - linux # much bug with osx environment # TODO(ChunweiYan) support osx in the future #- osx env: - JOB=check_style - JOB=test - JOB=build_doc addons: apt: packages: - gcc-4.8 - g++-4.8 - git - python - python-pip - python2.7-dev - python-wheel - clang-format-3.8 - ccache - npm - nodejs ssh_known_hosts: 52.76.173.135 before_install: - if [[ "$JOB" == "check_style" ]]; then sudo ln -s /usr/bin/clang-format-3.8 /usr/bin/clang-format; sudo pip install pre-commit flake8; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew upgrade python; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install brew-pip; fi script: - if [[ "$JOB" == "check_style" ]]; then ./travis/check_style.sh; fi - if [[ "$JOB" == "test" ]]; then /bin/bash ./tests.sh all; fi - | if [[ "$JOB" != "build_doc" ]]; then exit 0; fi; if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then exit 0; fi; if [[ "$TRAVIS_BRANCH" != "develop" ]]; then exit 0; fi; export DEPLOY_DOCS_SH=https://raw.githubusercontent.com/PaddlePaddle/PaddlePaddle.org/master/scripts/deploy/deploy_docs.sh export DOCS_DIR=`pwd` cd .. curl $DEPLOY_DOCS_SH | bash -s $CONTENT_DEC_PASSWD $TRAVIS_BRANCH $DOCS_DIR notifications: email: on_success: change on_failure: always