[Python-checkins] [2.7] Clean up Travis config (GH-5727)
Zachary Ware
webhook-mailer at python.org
Sun Feb 18 16:45:51 EST 2018
https://github.com/python/cpython/commit/21f53e7249d838489033abf4fc267bec00c1af3e
commit: 21f53e7249d838489033abf4fc267bec00c1af3e
branch: 2.7
author: Zachary Ware <zachary.ware at gmail.com>
committer: GitHub <noreply at github.com>
date: 2018-02-18T15:45:48-06:00
summary:
[2.7] Clean up Travis config (GH-5727)
(cherry picked from commit 7eb3f8226ea7b79dae4e4e8b05730cfe0d9af7c1)
files:
M .travis.yml
diff --git a/.travis.yml b/.travis.yml
index 6a64ec62ab84..175432dd45ab 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,13 +5,14 @@ group: beta
# To cache doc-building dependencies and C compiler output.
cache:
- - pip
- - ccache
+ - pip
+ - ccache
branches:
only:
- master
- /^\d\.\d$/
+ - buildbot-custom
matrix:
fast_finish: true
@@ -37,28 +38,53 @@ matrix:
script:
- make check suspicious html SPHINXOPTS="-q -W -j4"
-# Travis provides only 2 cores, so don't overdo the parallelism and waste memory.
-before_script:
+
+before_install:
+ - set -e
- |
- set -e
- if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.rst$)|(^Doc)'
+ # Check short-circuit conditions
+ if [ "${TESTING}" != "docs" ]
then
- echo "Only docs were updated, stopping build process."
- exit
+ if [ "$TRAVIS_PULL_REQUEST" = "false" ]
+ then
+ echo "Not a PR, doing full build."
+ else
+ # Pull requests are slightly complicated because $TRAVIS_COMMIT_RANGE
+ # may include more changes than desired if the history is convoluted.
+ # Instead, explicitly fetch the base branch and compare against the
+ # merge-base commit.
+ git fetch -q origin +refs/heads/$TRAVIS_BRANCH
+ changes=$(git diff --name-only HEAD $(git merge-base HEAD FETCH_HEAD))
+ echo "Files changed:"
+ echo "$changes"
+ if ! echo "$changes" | grep -qvE '(\.rst$)|(^Doc)|(^Misc)'
+ then
+ echo "Only docs were updated, stopping build process."
+ exit
+ fi
+ fi
fi
- ./configure --with-pydebug
- make -j4
- make -j4 regen-all
- changes=`git status --porcelain`
+
+
+# Travis provides only 2 cores, so don't overdo the parallelism and waste memory.
+before_script:
+ - ./configure --with-pydebug
+ - make -j4 regen-all
+ - changes=`git status --porcelain`
+ - |
+ # Check for changes in regenerated files
if ! test -z "$changes"
then
echo "Generated files not up to date"
echo "$changes"
exit 1
fi
- make pythoninfo
+ - make -j4
+ - make pythoninfo
script:
+ # Check that all symbols exported by libpython start with "Py" or "_Py"
+ - make smelly
# `-r -w` implicitly provided through `make buildbottest`.
- make buildbottest TESTOPTS="-j4 -uall,-cpu"
More information about the Python-checkins
mailing list