blob: 335fd9fd3d3bfcd05907880ab21c1dd4dcc71644 [file] [log] [blame]
Brett Cannonbb09c862017-02-10 14:21:15 -08001language: c
2dist: trusty
3sudo: false
4group: beta
5
6# To cache doc-building dependencies.
7cache: pip
8
Donald Stufft984eef72017-02-14 20:21:32 -05009branches:
10 only:
11 - master
12 - /^\d\.\d$/
13
Brett Cannonbb09c862017-02-10 14:21:15 -080014os:
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.
Brett Cannonbb09c862017-02-10 14:21:15 -080018
19compiler:
20 - clang
Brett Cannonad2f9e22017-03-27 16:39:54 -070021 # 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.
Brett Cannonbb09c862017-02-10 14:21:15 -080023
24env:
25 - TESTING=cpython
26
27matrix:
Brett Cannonb52260d2017-02-14 16:37:15 -080028 fast_finish: true
Brett Cannonbb09c862017-02-10 14:21:15 -080029 allow_failures:
30 - env:
31 - TESTING=coverage
32 include:
33 - os: linux
34 language: python
Brett Cannon31b39012017-05-11 10:45:34 -070035 # Build the docs against a stable version of Python so code bugs don't hold up doc-related PRs.
Brett Cannonad2f9e22017-03-27 16:39:54 -070036 python: 3.6
Brett Cannonbb09c862017-02-10 14:21:15 -080037 env:
38 - TESTING=docs
39 before_script:
Zachary Ware53251972017-02-15 16:18:03 -060040 - cd Doc
Mariattafca224f2017-05-16 13:48:25 -070041 # Sphinx is pinned so that new versions that introduce new warnings won't suddenly cause build failures.
42 # (Updating the version is fine as long as no warnings are raised by doing so.)
43 - python -m pip install sphinx~=1.6.1
Brett Cannonbb09c862017-02-10 14:21:15 -080044 script:
Antoine Pitroueba68e22017-05-29 12:05:45 +020045 - make check suspicious html SPHINXOPTS="-q -W -j4"
Brett Cannonbb09c862017-02-10 14:21:15 -080046 - os: linux
47 language: c
Brett Cannonad2f9e22017-03-27 16:39:54 -070048 compiler: gcc
Brett Cannonbb09c862017-02-10 14:21:15 -080049 env:
50 - TESTING=coverage
51 before_script:
Berker Peksag157c0b82017-02-14 12:57:26 +030052 - |
Serhiy Storchaka4a2ffce2017-03-08 20:22:16 +020053 if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.(rst|yml)$)|(^Doc)|(^Misc)/'
Berker Peksag157c0b82017-02-14 12:57:26 +030054 then
55 echo "Only docs were updated, stopping build process."
56 exit
57 fi
58 ./configure
59 make -s -j4
60 # Need a venv that can parse covered code.
61 ./python -m venv venv
62 ./venv/bin/python -m pip install -U coverage
Brett Cannonbb09c862017-02-10 14:21:15 -080063 script:
64 # Skip tests that re-run the entire test suite.
65 - ./venv/bin/python -m coverage run --pylib -m test -uall -x test_multiprocessing_fork -x test_multiprocessing_forkserver -x test_multiprocessing_spawn
66 after_script: # Probably should be after_success once test suite updated to run under coverage.py.
67 # Make the `coverage` command available to Codecov w/ a version of Python that can parse all source files.
68 - source ./venv/bin/activate
69 - bash <(curl -s https://codecov.io/bash)
Brett Cannonbb09c862017-02-10 14:21:15 -080070
71# Travis provides only 2 cores, so don't overdue the parallelism and waste memory.
72before_script:
Berker Peksag157c0b82017-02-14 12:57:26 +030073 - |
Serhiy Storchaka4a2ffce2017-03-08 20:22:16 +020074 if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.(rst|yml)$)|(^Doc)|(^Misc)/'
Berker Peksag157c0b82017-02-14 12:57:26 +030075 then
76 echo "Only docs were updated, stopping build process."
77 exit
78 fi
79 ./configure --with-pydebug
80 make -j4
Brett Cannonbb09c862017-02-10 14:21:15 -080081
82script:
83 # `-r -w` implicitly provided through `make buildbottest`.
84 - make buildbottest TESTOPTS="-j4"
85
86notifications:
87 email: false
88 irc:
89 channels:
Donald Stufft4538ddc2017-02-10 19:58:34 -050090 # This is set to a secure variable to prevent forks from notifying the
91 # IRC channel whenever they fail a build. This can be removed when travis
92 # implements https://github.com/travis-ci/travis-ci/issues/1094.
93 # The actual value here is: irc.freenode.net#python-dev
94 - secure: "s7kAkpcom2yUJ8XqyjFI0obJmhAGrn1xmoivdaPdgBIA++X47TBp1x4pgDsbEsoalef7bEwa4l07KdT4qa+DOd/c4QxaWom7fbN3BuLVsZuVfODnl79+gYq/TAbGfyH+yDs18DXrUfPgwD7C5aW32ugsqAOd4iWzfGJQ5OrOZzqzGjYdYQUEkJFXgxDEIb4aHvxNDWGO3Po9uKISrhb5saQ0l776yLo1Ur7M4oxl8RTbCdgX0vf5TzPg52BgvZpOgt3DHOUYPeiJLKNjAE6ibg0U95sEvMfHX77nz4aFY4/3UI6FFaRla34rZ+mYKrn0TdxOhera1QOgPmM6HzdO4K44FpfK1DS0Xxk9U9/uApq+cG0bU3W+cVUHDBe5+90lpRBAXHeHCgT7TI8gec614aiT8lEr3+yH8OBRYGzkjNK8E2LJZ/SxnVxDe7aLF6AWcoWLfS6/ziAIBFQ5Nc4U72CT8fGVSkl8ywPiRlvixKdvTODMSZo0jMqlfZSNaAPTsNRx4wu5Uis4qekwe32Fz4aB6KGpsuuVjBi+H6v0RKxNJNGY3JKDiEH2TK0UE2auJ5GvLW48aUVFcQMB7euCWYXlSWVRHh3WLU8QXF29Dw4JduRZqUpOdRgMHU79UHRq+mkE0jAS/nBcS6CvsmxCpTSrfVYuMOu32yt18QQoTyU="
Brett Cannonbb09c862017-02-10 14:21:15 -080095 on_success: change
96 on_failure: always
97 skip_join: true