From d758c6c427c3d25dbf5ac1d1e3b4fbd8afa68058 Mon Sep 17 00:00:00 2001 From: Luo Tao Date: Mon, 7 Aug 2017 21:06:47 +0800 Subject: [PATCH] reduce travis-ci time of build_doc --- doc/templates/conf.py.cn.in | 3 +-- doc/templates/conf.py.en.in | 3 +-- paddle/scripts/travis/build_doc.sh | 8 +------- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/doc/templates/conf.py.cn.in b/doc/templates/conf.py.cn.in index 95cad835b1..0faa3c78d6 100644 --- a/doc/templates/conf.py.cn.in +++ b/doc/templates/conf.py.cn.in @@ -15,12 +15,11 @@ import sys import os, subprocess import shlex from recommonmark import parser, transform +sys.path.append(os.path.abspath('@PROJ_ROOT@/python')) try: - import py_paddle import paddle import paddle.v2 except ImportError: - print("Must install paddle python package before generating documentation") sys.exit(1) MarkdownParser = parser.CommonMarkParser diff --git a/doc/templates/conf.py.en.in b/doc/templates/conf.py.en.in index b477f0120c..23d73189d9 100644 --- a/doc/templates/conf.py.en.in +++ b/doc/templates/conf.py.en.in @@ -15,12 +15,11 @@ import sys import os, subprocess import shlex from recommonmark import parser, transform +sys.path.append(os.path.abspath('@PROJ_ROOT@/python')) try: - import py_paddle import paddle import paddle.v2 except ImportError: - print("Must install paddle python package before generating documentation") sys.exit(1) diff --git a/paddle/scripts/travis/build_doc.sh b/paddle/scripts/travis/build_doc.sh index 33fb5d84e2..9785fa0c05 100755 --- a/paddle/scripts/travis/build_doc.sh +++ b/paddle/scripts/travis/build_doc.sh @@ -5,13 +5,6 @@ set -e mkdir -p $TRAVIS_BUILD_DIR/build cd $TRAVIS_BUILD_DIR/build -# Compile paddle binaries first -cmake .. -DCMAKE_BUILD_TYPE=Debug -DWITH_GPU=OFF -DWITH_DOC=OFF -DWITH_MKLDNN=OFF -DWITH_MKLML=OFF -DWITH_GOLANG=ON -DWITH_STYLE_CHECK=OFF - -mkdir output -make -j `nproc` -find .. -name '*whl' | xargs pip install # install all wheels. -rm -rf * # Compile Documentation only. cmake .. -DCMAKE_BUILD_TYPE=Debug -DWITH_GPU=OFF -DWITH_MKLDNN=OFF -DWITH_MKLML=OFF -DWITH_DOC=ON make -j `nproc` paddle_docs paddle_docs_cn @@ -35,6 +28,7 @@ TARGET_BRANCH="gh-pages" SOURCE_BRANCH="master" # Clone the repo to output directory +mkdir output git clone $REPO output cd output -- GitLab