@@ -11,44 +11,46 @@ branches:
1111 - master
1212 - /^\d\.\d$/
1313
14- os :
15- - linux
16- # macOS builds are disabled as the machines are under-provisioned on Travis,
17- # adding up to an extra hour completing a full CI run.
18-
19- compiler :
20- - clang
21- # gcc also works, but to keep the # of concurrent builds down, we use one C
22- # compiler here and the other to run the coverage build.
23-
24- env :
25- - TESTING=cpython
26-
2714matrix :
2815 fast_finish : true
2916 allow_failures :
30- - env :
31- - TESTING=coverage
17+ - env : OPTIONAL=true
3218 include :
19+ - os : linux
20+ language : c
21+ compiler : clang
22+ # gcc also works, but to keep the # of concurrent builds down, we use one C
23+ # compiler here and the other to run the coverage build. Clang is preferred
24+ # in this instance for its better error messages.
25+ env : TESTING=cpython
26+ - os : osx
27+ language : c
28+ compiler : clang
29+ # Testing under macOS is optional until testing stability has been demonstrated.
30+ env : OPTIONAL=true
31+ before_install :
32+ - brew install openssl xz
33+ - export CPPFLAGS="-I$(brew --prefix openssl)/include"
34+ - export LDFLAGS="-L$(brew --prefix openssl)/lib"
3335 - os : linux
3436 language : python
3537 # Build the docs against a stable version of Python so code bugs don't hold up doc-related PRs.
3638 python : 3.6
37- env :
38- - TESTING=docs
39+ env : TESTING=docs
3940 before_script :
4041 - cd Doc
41- - make venv
42+ # Sphinx is pinned so that new versions that introduce new warnings won't suddenly cause build failures.
43+ # (Updating the version is fine as long as no warnings are raised by doing so.)
44+ - python -m pip install sphinx~=1.6.1
4245 script :
43- - make check suspicious html PYTHON="./venv/bin/python" SPHINXBUILD="./venv/bin/python -m sphinx" SPHINXOPTS="-q -W"
46+ - make check suspicious html SPHINXOPTS="-q -W -j4 "
4447 - os : linux
4548 language : c
4649 compiler : gcc
47- env :
48- - TESTING=coverage
50+ env : OPTIONAL=true
4951 before_script :
5052 - |
51- if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.( rst|yml) $)|(^Doc)|(^Misc)/ '
53+ if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.rst$)|(^Doc)|(^Misc)'
5254 then
5355 echo "Only docs were updated, stopping build process."
5456 exit
@@ -60,26 +62,40 @@ matrix:
6062 ./venv/bin/python -m pip install -U coverage
6163 script :
6264 # Skip tests that re-run the entire test suite.
63- - ./venv/bin/python -m coverage run --pylib -m test -uall -x test_multiprocessing_fork -x test_multiprocessing_forkserver -x test_multiprocessing_spawn
65+ - ./venv/bin/python -m coverage run --pylib -m test -uall,-cpu -x test_multiprocessing_fork -x test_multiprocessing_forkserver -x test_multiprocessing_spawn
6466 after_script : # Probably should be after_success once test suite updated to run under coverage.py.
6567 # Make the `coverage` command available to Codecov w/ a version of Python that can parse all source files.
6668 - source ./venv/bin/activate
6769 - bash <(curl -s https://codecov.io/bash)
6870
69- # Travis provides only 2 cores, so don't overdue the parallelism and waste memory.
71+ # Travis provides only 2 cores, so don't overdo the parallelism and waste memory.
7072before_script :
7173 - |
72- if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.(rst|yml)$)|(^Doc)|(^Misc)/'
74+ set -e
75+ if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.rst$)|(^Doc)|(^Misc)'
7376 then
7477 echo "Only docs were updated, stopping build process."
7578 exit
7679 fi
7780 ./configure --with-pydebug
7881 make -j4
82+ make -j4 regen-all clinic
83+ changes=`git status --porcelain`
84+ if ! test -z "$changes"
85+ then
86+ echo "Generated files not up to date"
87+ echo "$changes"
88+ exit 1
89+ fi
7990
8091script :
92+ # Using the built Python as patchcheck.py is built around the idea of using
93+ # a checkout-build of CPython to know things like what base branch the changes
94+ # should be compared against.
95+ # Only run on Linux as the check only needs to be run once.
96+ - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./python Tools/scripts/patchcheck.py --travis $TRAVIS_PULL_REQUEST; fi
8197 # `-r -w` implicitly provided through `make buildbottest`.
82- - make buildbottest TESTOPTS="-j4"
98+ - make buildbottest TESTOPTS="-j4 -uall,-cpu "
8399
84100notifications :
85101 email : false
0 commit comments