blob: a549d4711ba3bcdd20f31cbbc0192292d00b127d [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 -080014matrix:
Brett Cannonb52260d2017-02-14 16:37:15 -080015 fast_finish: true
Brett Cannonbb09c862017-02-10 14:21:15 -080016 allow_failures:
Brett Cannon21c2dd72017-06-03 10:24:17 -070017 - env: OPTIONAL=true
Brett Cannonbb09c862017-02-10 14:21:15 -080018 include:
19 - os: linux
Hiro Asaria5aa72a2017-05-31 18:34:00 -040020 language: c
21 compiler: clang
22 # gcc also works, but to keep the # of concurrent builds down, we use one C
Brett Cannon21c2dd72017-06-03 10:24:17 -070023 # 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
Hiro Asaria5aa72a2017-05-31 18:34:00 -040031 - os: linux
Brett Cannonbb09c862017-02-10 14:21:15 -080032 language: python
Brett Cannon31b39012017-05-11 10:45:34 -070033 # 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 -070034 python: 3.6
Brett Cannon21c2dd72017-06-03 10:24:17 -070035 env: TESTING=docs
Brett Cannonbb09c862017-02-10 14:21:15 -080036 before_script:
Zachary Ware53251972017-02-15 16:18:03 -060037 - cd Doc
Mariattafca224f2017-05-16 13:48:25 -070038 # Sphinx is pinned so that new versions that introduce new warnings won't suddenly cause build failures.
39 # (Updating the version is fine as long as no warnings are raised by doing so.)
40 - python -m pip install sphinx~=1.6.1
Brett Cannonbb09c862017-02-10 14:21:15 -080041 script:
Antoine Pitroueba68e22017-05-29 12:05:45 +020042 - make check suspicious html SPHINXOPTS="-q -W -j4"
Brett Cannonbb09c862017-02-10 14:21:15 -080043 - os: linux
44 language: c
Brett Cannonad2f9e22017-03-27 16:39:54 -070045 compiler: gcc
Brett Cannon21c2dd72017-06-03 10:24:17 -070046 env: OPTIONAL=true
Brett Cannonbb09c862017-02-10 14:21:15 -080047 before_script:
Berker Peksag157c0b82017-02-14 12:57:26 +030048 - |
Zachary Warec53b13b2017-06-05 18:42:17 -050049 if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.rst$)|(^Doc)|(^Misc)'
Berker Peksag157c0b82017-02-14 12:57:26 +030050 then
51 echo "Only docs were updated, stopping build process."
52 exit
53 fi
54 ./configure
55 make -s -j4
56 # Need a venv that can parse covered code.
57 ./python -m venv venv
58 ./venv/bin/python -m pip install -U coverage
Brett Cannonbb09c862017-02-10 14:21:15 -080059 script:
60 # Skip tests that re-run the entire test suite.
Zachary Warec53b13b2017-06-05 18:42:17 -050061 - ./venv/bin/python -m coverage run --pylib -m test -uall,-cpu,-tzdata -x test_multiprocessing_fork -x test_multiprocessing_forkserver -x test_multiprocessing_spawn
Brett Cannonbb09c862017-02-10 14:21:15 -080062 after_script: # Probably should be after_success once test suite updated to run under coverage.py.
63 # Make the `coverage` command available to Codecov w/ a version of Python that can parse all source files.
64 - source ./venv/bin/activate
65 - bash <(curl -s https://codecov.io/bash)
Brett Cannonbb09c862017-02-10 14:21:15 -080066
Zachary Warec53b13b2017-06-05 18:42:17 -050067# Travis provides only 2 cores, so don't overdo the parallelism and waste memory.
Brett Cannonbb09c862017-02-10 14:21:15 -080068before_script:
Berker Peksag157c0b82017-02-14 12:57:26 +030069 - |
Zachary Warec53b13b2017-06-05 18:42:17 -050070 if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.rst$)|(^Doc)|(^Misc)'
Berker Peksag157c0b82017-02-14 12:57:26 +030071 then
72 echo "Only docs were updated, stopping build process."
73 exit
74 fi
75 ./configure --with-pydebug
76 make -j4
Brett Cannonbb09c862017-02-10 14:21:15 -080077
78script:
79 # `-r -w` implicitly provided through `make buildbottest`.
Zachary Warec53b13b2017-06-05 18:42:17 -050080 - make buildbottest TESTOPTS="-j4 -uall,-cpu,-tzdata"
Brett Cannonbb09c862017-02-10 14:21:15 -080081
82notifications:
83 email: false
84 irc:
85 channels:
Donald Stufft4538ddc2017-02-10 19:58:34 -050086 # This is set to a secure variable to prevent forks from notifying the
87 # IRC channel whenever they fail a build. This can be removed when travis
88 # implements https://github.com/travis-ci/travis-ci/issues/1094.
89 # The actual value here is: irc.freenode.net#python-dev
90 - 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 -080091 on_success: change
92 on_failure: always
93 skip_join: true