From 01a639c5d2f3caf2c84ab780611fa024e0feb7e0 Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Mon, 13 Feb 2017 19:58:09 +0300 Subject: [PATCH 1/2] Only run Travis jobs when needed --- .travis.yml | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 90d19d3dea4f1c..af6be186919110 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,8 +30,14 @@ matrix: env: - TESTING=docs before_script: - - cd Doc - - make venv PYTHON=python3 + - | + if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '^Doc/' + then + echo "Docs weren't updated, stopping build process." + exit + fi + cd Doc + make venv PYTHON=python3 script: - make html SPHINXBUILD="./venv/bin/python3 -m sphinx" SPHINXOPTS="-q" - python3 tools/rstlint.py -i tools -i venv @@ -41,11 +47,17 @@ matrix: env: - TESTING=coverage before_script: - - ./configure - - make -s -j4 - # Need a venv that can parse covered code. - - ./python -m venv venv - - ./venv/bin/python -m pip install -U coverage + - | + if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.(rst|yml)$)|(^Doc)/' + then + echo "Only docs were updated, stopping build process." + exit + fi + ./configure + make -s -j4 + # Need a venv that can parse covered code. + ./python -m venv venv + ./venv/bin/python -m pip install -U coverage script: # Skip tests that re-run the entire test suite. - ./venv/bin/python -m coverage run --pylib -m test -uall -x test_multiprocessing_fork -x test_multiprocessing_forkserver -x test_multiprocessing_spawn @@ -65,8 +77,14 @@ matrix: # Travis provides only 2 cores, so don't overdue the parallelism and waste memory. before_script: - - ./configure --with-pydebug - - make -j4 + - | + if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.(rst|yml)$)|(^Doc)/' + then + echo "Only docs were updated, stopping build process." + exit + fi + ./configure --with-pydebug + make -j4 script: # `-r -w` implicitly provided through `make buildbottest`. From 48834f49bf874583fa98cf8b114127b159b4cd85 Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Mon, 13 Feb 2017 21:00:52 +0300 Subject: [PATCH 2/2] Fix condition --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index af6be186919110..87219221180f45 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,7 +31,7 @@ matrix: - TESTING=docs before_script: - | - if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '^Doc/' + if git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '^Doc/' then echo "Docs weren't updated, stopping build process." exit pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy