INADA Naoki | 98604c7 | 2017-02-20 09:44:53 +0900 | [diff] [blame] | 1 | language: c |
| 2 | dist: trusty |
| 3 | sudo: false |
| 4 | group: beta |
| 5 | |
Christian Heimes | 9721e51 | 2017-09-05 19:14:03 +0200 | [diff] [blame] | 6 | # To cache doc-building dependencies and C compiler output. |
| 7 | cache: |
Zachary Ware | 21f53e7 | 2018-02-18 15:45:48 -0600 | [diff] [blame] | 8 | - pip |
| 9 | - ccache |
INADA Naoki | 98604c7 | 2017-02-20 09:44:53 +0900 | [diff] [blame] | 10 | |
INADA Naoki | 730fb07 | 2018-04-25 10:28:06 +0900 | [diff] [blame] | 11 | env: |
| 12 | global: |
| 13 | # Use -O3 because we don't use debugger on Travis-CI |
| 14 | - CFLAGS="-O3" |
| 15 | |
Brett Cannon | 32e220f | 2017-05-31 15:53:30 -0700 | [diff] [blame] | 16 | branches: |
| 17 | only: |
| 18 | - master |
| 19 | - /^\d\.\d$/ |
Zachary Ware | 21f53e7 | 2018-02-18 15:45:48 -0600 | [diff] [blame] | 20 | - buildbot-custom |
INADA Naoki | 98604c7 | 2017-02-20 09:44:53 +0900 | [diff] [blame] | 21 | |
| 22 | matrix: |
Brett Cannon | 6a1b89d | 2017-06-03 10:38:43 -0700 | [diff] [blame] | 23 | fast_finish: true |
| 24 | allow_failures: |
| 25 | - env: OPTIONAL=true |
INADA Naoki | 98604c7 | 2017-02-20 09:44:53 +0900 | [diff] [blame] | 26 | include: |
| 27 | - os: linux |
Brett Cannon | 32e220f | 2017-05-31 15:53:30 -0700 | [diff] [blame] | 28 | language: c |
| 29 | compiler: clang |
| 30 | # gcc also works, but to keep the # of concurrent builds down, we use one C |
Brett Cannon | 6a1b89d | 2017-06-03 10:38:43 -0700 | [diff] [blame] | 31 | # compiler here and the other to run the coverage build. Clang is preferred |
| 32 | # in this instance for its better error messages. |
| 33 | env: TESTING=cpython |
Zachary Ware | c5bc6e4 | 2018-07-19 21:51:42 -0500 | [diff] [blame] | 34 | addons: |
| 35 | apt: |
| 36 | packages: |
| 37 | - xvfb |
Brett Cannon | 32e220f | 2017-05-31 15:53:30 -0700 | [diff] [blame] | 38 | - os: linux |
INADA Naoki | 98604c7 | 2017-02-20 09:44:53 +0900 | [diff] [blame] | 39 | language: python |
| 40 | python: 2.7 |
Brett Cannon | 6a1b89d | 2017-06-03 10:38:43 -0700 | [diff] [blame] | 41 | env: TESTING=docs |
INADA Naoki | 98604c7 | 2017-02-20 09:44:53 +0900 | [diff] [blame] | 42 | before_script: |
Zachary Ware | bd82a07 | 2017-05-13 10:05:53 -0500 | [diff] [blame] | 43 | - cd Doc |
Brett Cannon | 97eb2a7 | 2017-05-16 14:41:00 -0700 | [diff] [blame] | 44 | # Sphinx is pinned so that new versions that introduce new warnings won't suddenly cause build failures. |
| 45 | # (Updating the version is fine as long as no warnings are raised by doing so.) |
Brett Cannon | fd58340 | 2017-05-22 17:47:01 -0700 | [diff] [blame] | 46 | - python -m pip install sphinx~=1.6.1 |
INADA Naoki | 98604c7 | 2017-02-20 09:44:53 +0900 | [diff] [blame] | 47 | script: |
Mariatta | 497e5e1 | 2017-05-30 15:29:40 -0700 | [diff] [blame] | 48 | - make check suspicious html SPHINXOPTS="-q -W -j4" |
INADA Naoki | 98604c7 | 2017-02-20 09:44:53 +0900 | [diff] [blame] | 49 | |
Zachary Ware | 21f53e7 | 2018-02-18 15:45:48 -0600 | [diff] [blame] | 50 | |
| 51 | before_install: |
| 52 | - set -e |
| 53 | - | |
| 54 | # Check short-circuit conditions |
| 55 | if [ "${TESTING}" != "docs" ] |
| 56 | then |
| 57 | if [ "$TRAVIS_PULL_REQUEST" = "false" ] |
| 58 | then |
| 59 | echo "Not a PR, doing full build." |
| 60 | else |
| 61 | # Pull requests are slightly complicated because $TRAVIS_COMMIT_RANGE |
| 62 | # may include more changes than desired if the history is convoluted. |
| 63 | # Instead, explicitly fetch the base branch and compare against the |
| 64 | # merge-base commit. |
| 65 | git fetch -q origin +refs/heads/$TRAVIS_BRANCH |
| 66 | changes=$(git diff --name-only HEAD $(git merge-base HEAD FETCH_HEAD)) |
| 67 | echo "Files changed:" |
| 68 | echo "$changes" |
| 69 | if ! echo "$changes" | grep -qvE '(\.rst$)|(^Doc)|(^Misc)' |
| 70 | then |
| 71 | echo "Only docs were updated, stopping build process." |
| 72 | exit |
| 73 | fi |
| 74 | fi |
| 75 | fi |
| 76 | |
| 77 | |
Zachary Ware | ddf8f14 | 2017-06-05 20:03:05 -0500 | [diff] [blame] | 78 | # Travis provides only 2 cores, so don't overdo the parallelism and waste memory. |
INADA Naoki | 98604c7 | 2017-02-20 09:44:53 +0900 | [diff] [blame] | 79 | before_script: |
Zachary Ware | 21f53e7 | 2018-02-18 15:45:48 -0600 | [diff] [blame] | 80 | - ./configure --with-pydebug |
| 81 | - make -j4 regen-all |
| 82 | - changes=`git status --porcelain` |
INADA Naoki | 98604c7 | 2017-02-20 09:44:53 +0900 | [diff] [blame] | 83 | - | |
Zachary Ware | 21f53e7 | 2018-02-18 15:45:48 -0600 | [diff] [blame] | 84 | # Check for changes in regenerated files |
Zachary Ware | 51658f7 | 2017-06-11 17:45:40 -0500 | [diff] [blame] | 85 | if ! test -z "$changes" |
| 86 | then |
| 87 | echo "Generated files not up to date" |
| 88 | echo "$changes" |
| 89 | exit 1 |
| 90 | fi |
Zachary Ware | 21f53e7 | 2018-02-18 15:45:48 -0600 | [diff] [blame] | 91 | - make -j4 |
| 92 | - make pythoninfo |
INADA Naoki | 98604c7 | 2017-02-20 09:44:53 +0900 | [diff] [blame] | 93 | |
| 94 | script: |
Zachary Ware | 21f53e7 | 2018-02-18 15:45:48 -0600 | [diff] [blame] | 95 | # Check that all symbols exported by libpython start with "Py" or "_Py" |
| 96 | - make smelly |
INADA Naoki | 98604c7 | 2017-02-20 09:44:53 +0900 | [diff] [blame] | 97 | # `-r -w` implicitly provided through `make buildbottest`. |
Zachary Ware | c5bc6e4 | 2018-07-19 21:51:42 -0500 | [diff] [blame] | 98 | - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then XVFB_RUN=xvfb-run; fi; $XVFB_RUN make buildbottest TESTOPTS="-j4 -uall,-cpu" |
INADA Naoki | 98604c7 | 2017-02-20 09:44:53 +0900 | [diff] [blame] | 99 | |
| 100 | notifications: |
| 101 | email: false |
| 102 | irc: |
| 103 | channels: |
| 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=" |
| 109 | on_success: change |
| 110 | on_failure: always |
| 111 | skip_join: true |