Unverified Kaydet (Commit) ea49c033 authored tarafından Zachary Ware's avatar Zachary Ware Kaydeden (comit) GitHub

[3.6] Clean up Travis config (GH-5727)

(cherry picked from commit 7eb3f822)
üst 65a13c19
...@@ -5,13 +5,14 @@ group: beta ...@@ -5,13 +5,14 @@ group: beta
# To cache doc-building dependencies and C compiler output. # To cache doc-building dependencies and C compiler output.
cache: cache:
- pip - pip
- ccache - ccache
branches: branches:
only: only:
- master - master
- /^\d\.\d$/ - /^\d\.\d$/
- buildbot-custom
matrix: matrix:
fast_finish: true fast_finish: true
...@@ -41,19 +42,12 @@ matrix: ...@@ -41,19 +42,12 @@ matrix:
compiler: gcc compiler: gcc
env: OPTIONAL=true env: OPTIONAL=true
before_script: before_script:
- | - ./configure PYTHON_FOR_REGEN=python3
if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.rst$)|(^Doc)|(^Misc)' - make -s -j4
then # Need a venv that can parse covered code.
echo "Only docs were updated, stopping build process." - ./python -m venv venv
exit - ./venv/bin/python -m pip install -U coverage
fi - ./venv/bin/python -m test.pythoninfo
# Build in release mode
./configure PYTHON_FOR_REGEN=python3
make -s -j4
# Need a venv that can parse covered code.
./python -m venv venv
./venv/bin/python -m pip install -U coverage
./venv/bin/python -m test.pythoninfo
script: script:
# Skip tests that re-run the entire test suite. # Skip tests that re-run the entire test suite.
- ./venv/bin/python -m coverage run --pylib -m test -uall,-cpu -x test_multiprocessing_fork -x test_multiprocessing_forkserver -x test_multiprocessing_spawn - ./venv/bin/python -m coverage run --pylib -m test -uall,-cpu -x test_multiprocessing_fork -x test_multiprocessing_forkserver -x test_multiprocessing_spawn
...@@ -62,41 +56,48 @@ matrix: ...@@ -62,41 +56,48 @@ matrix:
- source ./venv/bin/activate - source ./venv/bin/activate
- bash <(curl -s https://codecov.io/bash) - bash <(curl -s https://codecov.io/bash)
# Travis provides only 2 cores, so don't overdo the parallelism and waste memory.
before_script:
- |
set -e
if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
files_changed=$(git diff --name-only $TRAVIS_COMMIT_RANGE)
else
# Pull requests are slightly complicated because merging the PR commit without
# rebasing causes it to retain its old commit date. Meaning in history if any
# commits have been made on master that post-date it, they will be accidentally
# included in the diff if we use the TRAVIS_COMMIT_RANGE variable.
files_changed=$(git diff --name-only HEAD $(git merge-base HEAD $TRAVIS_BRANCH))
fi
# Prints changed files in this commit to help debug doc-only build issues.
echo "Files changed: "
echo $files_changed
if ! echo "$files_changed" | grep -qvE '(\.rst$)|(^Doc)|(^Misc)' before_install:
- set -e
- |
# Check short-circuit conditions
if [ "${TESTING}" != "docs" ]
then then
echo "Only docs were updated, stopping build process." if [ "$TRAVIS_PULL_REQUEST" = "false" ]
exit 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 fi
# Build in debug mode
./configure --with-pydebug PYTHON_FOR_REGEN=python3 # Travis provides only 2 cores, so don't overdo the parallelism and waste memory.
make -j4 regen-all before_script:
changes=`git status --porcelain` - ./configure --with-pydebug PYTHON_FOR_REGEN=python3
- make -j4 regen-all
- changes=`git status --porcelain`
- |
# Check for changes in regenerated files
if ! test -z "$changes" if ! test -z "$changes"
then then
echo "Generated files not up to date" echo "Generated files not up to date"
echo "$changes" echo "$changes"
exit 1 exit 1
fi fi
make -j4 - make -j4
make pythoninfo - make pythoninfo
script: script:
# Using the built Python as patchcheck.py is built around the idea of using # Using the built Python as patchcheck.py is built around the idea of using
...@@ -104,6 +105,8 @@ script: ...@@ -104,6 +105,8 @@ script:
# should be compared against. # should be compared against.
# Only run on Linux as the check only needs to be run once. # Only run on Linux as the check only needs to be run once.
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./python Tools/scripts/patchcheck.py --travis $TRAVIS_PULL_REQUEST; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./python Tools/scripts/patchcheck.py --travis $TRAVIS_PULL_REQUEST; fi
# Check that all symbols exported by libpython start with "Py" or "_Py"
- make smelly
# `-r -w` implicitly provided through `make buildbottest`. # `-r -w` implicitly provided through `make buildbottest`.
- make buildbottest TESTOPTS="-j4 -uall,-cpu" - make buildbottest TESTOPTS="-j4 -uall,-cpu"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment