From cb8f940eca24fa32cd8934bf5f9ae0b87c4ae98a Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Sat, 15 Dec 2018 01:43:17 +0000 Subject: [PATCH 1/2] DOC: Making the build fail if the doc build fails --- .travis.yml | 12 ++++-------- ci/build_docs.sh | 2 ++ ci/run_build_docs.sh | 10 ---------- doc/make.py | 5 ++++- 4 files changed, 10 insertions(+), 19 deletions(-) delete mode 100755 ci/run_build_docs.sh diff --git a/.travis.yml b/.travis.yml index 03026647d6bb8..99c3638439457 100644 --- a/.travis.yml +++ b/.travis.yml @@ -60,23 +60,19 @@ matrix: apt: packages: - xsel - - # In allow_failures - dist: trusty env: - - JOB="3.6, slow" ENV_FILE="ci/deps/travis-36-slow.yaml" PATTERN="slow" + - JOB="3.6, doc" ENV_FILE="ci/deps/travis-36-doc.yaml" DOC=true # In allow_failures - dist: trusty env: - - JOB="3.6, doc" ENV_FILE="ci/deps/travis-36-doc.yaml" DOC=true + - JOB="3.6, slow" ENV_FILE="ci/deps/travis-36-slow.yaml" PATTERN="slow" + allow_failures: - dist: trusty env: - JOB="3.6, slow" ENV_FILE="ci/deps/travis-36-slow.yaml" PATTERN="slow" - - dist: trusty - env: - - JOB="3.6, doc" ENV_FILE="ci/deps/travis-36-doc.yaml" DOC=true before_install: - echo "before_install" @@ -106,7 +102,7 @@ before_script: script: - echo "script start" - source activate pandas-dev - - ci/run_build_docs.sh + - ci/build_docs.sh - ci/run_tests.sh after_script: diff --git a/ci/build_docs.sh b/ci/build_docs.sh index f89c4369dff4a..0b1ea2329636d 100755 --- a/ci/build_docs.sh +++ b/ci/build_docs.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -e + if [ "${TRAVIS_OS_NAME}" != "linux" ]; then echo "not doing build_docs on non-linux" exit 0 diff --git a/ci/run_build_docs.sh b/ci/run_build_docs.sh deleted file mode 100755 index 2909b9619552e..0000000000000 --- a/ci/run_build_docs.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -echo "inside $0" - -"$TRAVIS_BUILD_DIR"/ci/build_docs.sh 2>&1 - -# wait until subprocesses finish (build_docs.sh) -wait - -exit 0 diff --git a/doc/make.py b/doc/make.py index 0a3a7483fcc91..9c6c6caa2308d 100755 --- a/doc/make.py +++ b/doc/make.py @@ -214,7 +214,10 @@ def _run_os(*args): # TODO check_call should be more safe, but it fails with # exclude patterns, needs investigation # subprocess.check_call(args, stderr=subprocess.STDOUT) - os.system(' '.join(args)) + exit_status = os.system(' '.join(args)) + if exit_status: + msg = 'Command "{}" finished with exit code {}' + raise RuntimeError(msg.format(' '.join(args), exit_status)) def _sphinx_build(self, kind): """Call sphinx to build documentation. From 8ad2ff16237562c330ec9208442fe91638a6f466 Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Sun, 16 Dec 2018 00:36:25 +0000 Subject: [PATCH 2/2] Moving back doc build to allowed failures in travis --- .travis.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 869026e6a7c81..c30a7f3f58f55 100644 --- a/.travis.yml +++ b/.travis.yml @@ -60,19 +60,23 @@ matrix: apt: packages: - xsel - - dist: trusty - env: - - JOB="3.6, doc" ENV_FILE="ci/deps/travis-36-doc.yaml" DOC=true # In allow_failures - dist: trusty env: - JOB="3.6, slow" ENV_FILE="ci/deps/travis-36-slow.yaml" PATTERN="slow" + # In allow_failures + - dist: trusty + env: + - JOB="3.6, doc" ENV_FILE="ci/deps/travis-36-doc.yaml" DOC=true allow_failures: - dist: trusty env: - JOB="3.6, slow" ENV_FILE="ci/deps/travis-36-slow.yaml" PATTERN="slow" + - dist: trusty + env: + - JOB="3.6, doc" ENV_FILE="ci/deps/travis-36-doc.yaml" DOC=true before_install: - echo "before_install"