Brett Cannon | bb09c86 | 2017-02-10 14:21:15 -0800 | [diff] [blame] | 1 | language: c |
| 2 | dist: trusty |
| 3 | sudo: false |
| 4 | group: beta |
| 5 | |
| 6 | # To cache doc-building dependencies. |
| 7 | cache: pip |
| 8 | |
Donald Stufft | 984eef7 | 2017-02-14 20:21:32 -0500 | [diff] [blame] | 9 | branches: |
| 10 | only: |
| 11 | - master |
| 12 | - /^\d\.\d$/ |
| 13 | |
Brett Cannon | bb09c86 | 2017-02-10 14:21:15 -0800 | [diff] [blame] | 14 | matrix: |
Brett Cannon | b52260d | 2017-02-14 16:37:15 -0800 | [diff] [blame] | 15 | fast_finish: true |
Brett Cannon | bb09c86 | 2017-02-10 14:21:15 -0800 | [diff] [blame] | 16 | allow_failures: |
Brett Cannon | 21c2dd7 | 2017-06-03 10:24:17 -0700 | [diff] [blame] | 17 | - env: OPTIONAL=true |
Brett Cannon | bb09c86 | 2017-02-10 14:21:15 -0800 | [diff] [blame] | 18 | include: |
| 19 | - os: linux |
Hiro Asari | a5aa72a | 2017-05-31 18:34:00 -0400 | [diff] [blame] | 20 | language: c |
| 21 | compiler: clang |
| 22 | # gcc also works, but to keep the # of concurrent builds down, we use one C |
Brett Cannon | 21c2dd7 | 2017-06-03 10:24:17 -0700 | [diff] [blame] | 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 |
Zachary Ware | 167e0fc | 2017-06-05 19:11:29 -0500 | [diff] [blame] | 31 | before_install: |
| 32 | - brew install openssl xz |
| 33 | - export CPPFLAGS="-I$(brew --prefix openssl)/include" |
| 34 | - export LDFLAGS="-L$(brew --prefix openssl)/lib" |
Hiro Asari | a5aa72a | 2017-05-31 18:34:00 -0400 | [diff] [blame] | 35 | - os: linux |
Brett Cannon | bb09c86 | 2017-02-10 14:21:15 -0800 | [diff] [blame] | 36 | language: python |
Brett Cannon | 31b3901 | 2017-05-11 10:45:34 -0700 | [diff] [blame] | 37 | # Build the docs against a stable version of Python so code bugs don't hold up doc-related PRs. |
Brett Cannon | ad2f9e2 | 2017-03-27 16:39:54 -0700 | [diff] [blame] | 38 | python: 3.6 |
Brett Cannon | 21c2dd7 | 2017-06-03 10:24:17 -0700 | [diff] [blame] | 39 | env: TESTING=docs |
Brett Cannon | bb09c86 | 2017-02-10 14:21:15 -0800 | [diff] [blame] | 40 | before_script: |
Zachary Ware | 5325197 | 2017-02-15 16:18:03 -0600 | [diff] [blame] | 41 | - cd Doc |
Mariatta | fca224f | 2017-05-16 13:48:25 -0700 | [diff] [blame] | 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 |
Brett Cannon | bb09c86 | 2017-02-10 14:21:15 -0800 | [diff] [blame] | 45 | script: |
Antoine Pitrou | eba68e2 | 2017-05-29 12:05:45 +0200 | [diff] [blame] | 46 | - make check suspicious html SPHINXOPTS="-q -W -j4" |
Brett Cannon | bb09c86 | 2017-02-10 14:21:15 -0800 | [diff] [blame] | 47 | - os: linux |
| 48 | language: c |
Brett Cannon | ad2f9e2 | 2017-03-27 16:39:54 -0700 | [diff] [blame] | 49 | compiler: gcc |
Brett Cannon | 21c2dd7 | 2017-06-03 10:24:17 -0700 | [diff] [blame] | 50 | env: OPTIONAL=true |
Brett Cannon | bb09c86 | 2017-02-10 14:21:15 -0800 | [diff] [blame] | 51 | before_script: |
Berker Peksag | 157c0b8 | 2017-02-14 12:57:26 +0300 | [diff] [blame] | 52 | - | |
Zachary Ware | c53b13b | 2017-06-05 18:42:17 -0500 | [diff] [blame] | 53 | if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.rst$)|(^Doc)|(^Misc)' |
Berker Peksag | 157c0b8 | 2017-02-14 12:57:26 +0300 | [diff] [blame] | 54 | 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 Cannon | bb09c86 | 2017-02-10 14:21:15 -0800 | [diff] [blame] | 63 | script: |
| 64 | # Skip tests that re-run the entire test suite. |
Victor Stinner | 5b392bb | 2017-07-20 15:46:32 +0200 | [diff] [blame] | 65 | - ./venv/bin/python -m coverage run --pylib -m test -uall,-cpu -x test_multiprocessing_fork -x test_multiprocessing_forkserver -x test_multiprocessing_spawn |
Brett Cannon | bb09c86 | 2017-02-10 14:21:15 -0800 | [diff] [blame] | 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 Cannon | bb09c86 | 2017-02-10 14:21:15 -0800 | [diff] [blame] | 70 | |
Zachary Ware | c53b13b | 2017-06-05 18:42:17 -0500 | [diff] [blame] | 71 | # Travis provides only 2 cores, so don't overdo the parallelism and waste memory. |
Brett Cannon | bb09c86 | 2017-02-10 14:21:15 -0800 | [diff] [blame] | 72 | before_script: |
Berker Peksag | 157c0b8 | 2017-02-14 12:57:26 +0300 | [diff] [blame] | 73 | - | |
Zachary Ware | 0afbabe | 2017-06-10 21:37:40 -0500 | [diff] [blame] | 74 | set -e |
Zachary Ware | c53b13b | 2017-06-05 18:42:17 -0500 | [diff] [blame] | 75 | if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.rst$)|(^Doc)|(^Misc)' |
Berker Peksag | 157c0b8 | 2017-02-14 12:57:26 +0300 | [diff] [blame] | 76 | then |
| 77 | echo "Only docs were updated, stopping build process." |
| 78 | exit |
| 79 | fi |
| 80 | ./configure --with-pydebug |
| 81 | make -j4 |
Zachary Ware | 0afbabe | 2017-06-10 21:37:40 -0500 | [diff] [blame] | 82 | make -j4 regen-all clinic |
Zachary Ware | 3f8f16d | 2017-06-10 23:04:36 -0500 | [diff] [blame] | 83 | changes=`git status --porcelain` |
| 84 | if ! test -z "$changes" |
Zachary Ware | 0afbabe | 2017-06-10 21:37:40 -0500 | [diff] [blame] | 85 | then |
| 86 | echo "Generated files not up to date" |
Zachary Ware | 3f8f16d | 2017-06-10 23:04:36 -0500 | [diff] [blame] | 87 | echo "$changes" |
Zachary Ware | 0afbabe | 2017-06-10 21:37:40 -0500 | [diff] [blame] | 88 | exit 1 |
| 89 | fi |
Brett Cannon | bb09c86 | 2017-02-10 14:21:15 -0800 | [diff] [blame] | 90 | |
| 91 | script: |
Brett Cannon | 70cb187 | 2017-06-24 16:51:23 -0700 | [diff] [blame] | 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 |
Brett Cannon | bb09c86 | 2017-02-10 14:21:15 -0800 | [diff] [blame] | 97 | # `-r -w` implicitly provided through `make buildbottest`. |
Victor Stinner | 5b392bb | 2017-07-20 15:46:32 +0200 | [diff] [blame] | 98 | - make buildbottest TESTOPTS="-j4 -uall,-cpu" |
Brett Cannon | bb09c86 | 2017-02-10 14:21:15 -0800 | [diff] [blame] | 99 | |
| 100 | notifications: |
| 101 | email: false |
| 102 | irc: |
| 103 | channels: |
Donald Stufft | 4538ddc | 2017-02-10 19:58:34 -0500 | [diff] [blame] | 104 | # This is set to a secure variable to prevent forks from notifying the |
| 105 | # IRC channel whenever they fail a build. This can be removed when travis |
| 106 | # implements https://github.com/travis-ci/travis-ci/issues/1094. |
| 107 | # The actual value here is: irc.freenode.net#python-dev |
| 108 | - secure: "s7kAkpcom2yUJ8XqyjFI0obJmhAGrn1xmoivdaPdgBIA++X47TBp1x4pgDsbEsoalef7bEwa4l07KdT4qa+DOd/c4QxaWom7fbN3BuLVsZuVfODnl79+gYq/TAbGfyH+yDs18DXrUfPgwD7C5aW32ugsqAOd4iWzfGJQ5OrOZzqzGjYdYQUEkJFXgxDEIb4aHvxNDWGO3Po9uKISrhb5saQ0l776yLo1Ur7M4oxl8RTbCdgX0vf5TzPg52BgvZpOgt3DHOUYPeiJLKNjAE6ibg0U95sEvMfHX77nz4aFY4/3UI6FFaRla34rZ+mYKrn0TdxOhera1QOgPmM6HzdO4K44FpfK1DS0Xxk9U9/uApq+cG0bU3W+cVUHDBe5+90lpRBAXHeHCgT7TI8gec614aiT8lEr3+yH8OBRYGzkjNK8E2LJZ/SxnVxDe7aLF6AWcoWLfS6/ziAIBFQ5Nc4U72CT8fGVSkl8ywPiRlvixKdvTODMSZo0jMqlfZSNaAPTsNRx4wu5Uis4qekwe32Fz4aB6KGpsuuVjBi+H6v0RKxNJNGY3JKDiEH2TK0UE2auJ5GvLW48aUVFcQMB7euCWYXlSWVRHh3WLU8QXF29Dw4JduRZqUpOdRgMHU79UHRq+mkE0jAS/nBcS6CvsmxCpTSrfVYuMOu32yt18QQoTyU=" |
Brett Cannon | bb09c86 | 2017-02-10 14:21:15 -0800 | [diff] [blame] | 109 | on_success: change |
| 110 | on_failure: always |
| 111 | skip_join: true |