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 | |
Christian Heimes | 8adc73c | 2017-09-05 01:48:54 +0200 | [diff] [blame] | 6 | # To cache doc-building dependencies and C compiler output. |
| 7 | cache: |
Zachary Ware | 7eb3f82 | 2018-02-18 10:19:37 -0600 | [diff] [blame] | 8 | - pip |
| 9 | - ccache |
| 10 | - directories: |
| 11 | - $HOME/multissl |
Christian Heimes | ced9cb5 | 2018-01-16 21:02:26 +0100 | [diff] [blame] | 12 | |
| 13 | env: |
| 14 | global: |
| 15 | - OPENSSL=1.1.0g |
| 16 | - OPENSSL_DIR="$HOME/multissl/openssl/${OPENSSL}" |
| 17 | - PATH="${OPENSSL_DIR}/bin:$PATH" |
INADA Naoki | 8ff5356 | 2018-02-10 20:35:17 +0900 | [diff] [blame] | 18 | # Use -O3 because we don't use debugger on Travis-CI |
| 19 | - CFLAGS="-I${OPENSSL_DIR}/include -O3" |
Christian Heimes | ced9cb5 | 2018-01-16 21:02:26 +0100 | [diff] [blame] | 20 | - LDFLAGS="-L${OPENSSL_DIR}/lib" |
| 21 | # Set rpath with env var instead of -Wl,-rpath linker flag |
| 22 | # OpenSSL ignores LDFLAGS when linking bin/openssl |
| 23 | - LD_RUN_PATH="${OPENSSL_DIR}/lib" |
Brett Cannon | bb09c86 | 2017-02-10 14:21:15 -0800 | [diff] [blame] | 24 | |
Donald Stufft | 984eef7 | 2017-02-14 20:21:32 -0500 | [diff] [blame] | 25 | branches: |
| 26 | only: |
| 27 | - master |
| 28 | - /^\d\.\d$/ |
Zachary Ware | 7eb3f82 | 2018-02-18 10:19:37 -0600 | [diff] [blame] | 29 | - buildbot-custom |
Donald Stufft | 984eef7 | 2017-02-14 20:21:32 -0500 | [diff] [blame] | 30 | |
Brett Cannon | bb09c86 | 2017-02-10 14:21:15 -0800 | [diff] [blame] | 31 | matrix: |
Brett Cannon | b52260d | 2017-02-14 16:37:15 -0800 | [diff] [blame] | 32 | fast_finish: true |
Brett Cannon | bb09c86 | 2017-02-10 14:21:15 -0800 | [diff] [blame] | 33 | allow_failures: |
Brett Cannon | 21c2dd7 | 2017-06-03 10:24:17 -0700 | [diff] [blame] | 34 | - env: OPTIONAL=true |
Brett Cannon | bb09c86 | 2017-02-10 14:21:15 -0800 | [diff] [blame] | 35 | include: |
| 36 | - os: linux |
Hiro Asari | a5aa72a | 2017-05-31 18:34:00 -0400 | [diff] [blame] | 37 | language: c |
| 38 | compiler: clang |
| 39 | # 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] | 40 | # compiler here and the other to run the coverage build. Clang is preferred |
| 41 | # in this instance for its better error messages. |
| 42 | env: TESTING=cpython |
Hiro Asari | a5aa72a | 2017-05-31 18:34:00 -0400 | [diff] [blame] | 43 | - os: linux |
Brett Cannon | bb09c86 | 2017-02-10 14:21:15 -0800 | [diff] [blame] | 44 | language: python |
Brett Cannon | 31b3901 | 2017-05-11 10:45:34 -0700 | [diff] [blame] | 45 | # 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] | 46 | python: 3.6 |
Brett Cannon | 21c2dd7 | 2017-06-03 10:24:17 -0700 | [diff] [blame] | 47 | env: TESTING=docs |
Brett Cannon | bb09c86 | 2017-02-10 14:21:15 -0800 | [diff] [blame] | 48 | before_script: |
Zachary Ware | 5325197 | 2017-02-15 16:18:03 -0600 | [diff] [blame] | 49 | - cd Doc |
Mariatta | fca224f | 2017-05-16 13:48:25 -0700 | [diff] [blame] | 50 | # Sphinx is pinned so that new versions that introduce new warnings won't suddenly cause build failures. |
| 51 | # (Updating the version is fine as long as no warnings are raised by doing so.) |
Ned Deily | fcd97d4 | 2017-09-05 00:10:31 -0700 | [diff] [blame] | 52 | - python -m pip install sphinx~=1.6.1 blurb |
Brett Cannon | bb09c86 | 2017-02-10 14:21:15 -0800 | [diff] [blame] | 53 | script: |
Ned Deily | 122fc13 | 2017-11-27 17:07:32 -0500 | [diff] [blame] | 54 | - make check suspicious html SPHINXOPTS="-q -W -j4" |
Brett Cannon | bb09c86 | 2017-02-10 14:21:15 -0800 | [diff] [blame] | 55 | - os: linux |
| 56 | language: c |
Brett Cannon | ad2f9e2 | 2017-03-27 16:39:54 -0700 | [diff] [blame] | 57 | compiler: gcc |
Brett Cannon | 21c2dd7 | 2017-06-03 10:24:17 -0700 | [diff] [blame] | 58 | env: OPTIONAL=true |
Brett Cannon | bb09c86 | 2017-02-10 14:21:15 -0800 | [diff] [blame] | 59 | before_script: |
Zachary Ware | 7eb3f82 | 2018-02-18 10:19:37 -0600 | [diff] [blame] | 60 | - ./configure |
| 61 | - make -s -j4 |
| 62 | # Need a venv that can parse covered code. |
| 63 | - ./python -m venv venv |
| 64 | - ./venv/bin/python -m pip install -U coverage |
| 65 | - ./venv/bin/python -m test.pythoninfo |
Brett Cannon | bb09c86 | 2017-02-10 14:21:15 -0800 | [diff] [blame] | 66 | script: |
| 67 | # Skip tests that re-run the entire test suite. |
Thomas Moreau | e8c368d | 2017-10-03 11:53:17 +0200 | [diff] [blame] | 68 | - ./venv/bin/python -m coverage run --pylib -m test --fail-env-changed -uall,-cpu -x test_multiprocessing_fork -x test_multiprocessing_forkserver -x test_multiprocessing_spawn -x test_concurrent_futures |
Brett Cannon | bb09c86 | 2017-02-10 14:21:15 -0800 | [diff] [blame] | 69 | after_script: # Probably should be after_success once test suite updated to run under coverage.py. |
| 70 | # Make the `coverage` command available to Codecov w/ a version of Python that can parse all source files. |
| 71 | - source ./venv/bin/activate |
| 72 | - bash <(curl -s https://codecov.io/bash) |
Brett Cannon | bb09c86 | 2017-02-10 14:21:15 -0800 | [diff] [blame] | 73 | |
Zachary Ware | 7eb3f82 | 2018-02-18 10:19:37 -0600 | [diff] [blame] | 74 | |
| 75 | before_install: |
| 76 | - set -e |
Berker Peksag | 157c0b8 | 2017-02-14 12:57:26 +0300 | [diff] [blame] | 77 | - | |
Zachary Ware | 7eb3f82 | 2018-02-18 10:19:37 -0600 | [diff] [blame] | 78 | # Check short-circuit conditions |
| 79 | if [ "${TESTING}" != "docs" ] |
Berker Peksag | 157c0b8 | 2017-02-14 12:57:26 +0300 | [diff] [blame] | 80 | then |
Zachary Ware | 7eb3f82 | 2018-02-18 10:19:37 -0600 | [diff] [blame] | 81 | if [ "$TRAVIS_PULL_REQUEST" = "false" ] |
| 82 | then |
| 83 | echo "Not a PR, doing full build." |
| 84 | else |
| 85 | # Pull requests are slightly complicated because $TRAVIS_COMMIT_RANGE |
| 86 | # may include more changes than desired if the history is convoluted. |
| 87 | # Instead, explicitly fetch the base branch and compare against the |
| 88 | # merge-base commit. |
| 89 | git fetch -q origin +refs/heads/$TRAVIS_BRANCH |
| 90 | changes=$(git diff --name-only HEAD $(git merge-base HEAD FETCH_HEAD)) |
| 91 | echo "Files changed:" |
| 92 | echo "$changes" |
| 93 | if ! echo "$changes" | grep -qvE '(\.rst$)|(^Doc)|(^Misc)' |
| 94 | then |
| 95 | echo "Only docs were updated, stopping build process." |
| 96 | exit |
| 97 | fi |
| 98 | fi |
Berker Peksag | 157c0b8 | 2017-02-14 12:57:26 +0300 | [diff] [blame] | 99 | fi |
Zachary Ware | 7eb3f82 | 2018-02-18 10:19:37 -0600 | [diff] [blame] | 100 | |
| 101 | install: |
| 102 | - | |
| 103 | # Install OpenSSL as necessary |
| 104 | if [ "${TESTING}" != "docs" ] |
| 105 | then |
Christian Heimes | ced9cb5 | 2018-01-16 21:02:26 +0100 | [diff] [blame] | 106 | # clang complains about unused-parameter a lot, redirect stderr |
| 107 | python3 Tools/ssl/multissltests.py --steps=library \ |
| 108 | --base-directory ${HOME}/multissl \ |
| 109 | --openssl ${OPENSSL} >/dev/null 2>&1 |
| 110 | fi |
Zachary Ware | 7eb3f82 | 2018-02-18 10:19:37 -0600 | [diff] [blame] | 111 | - openssl version |
| 112 | |
| 113 | # Travis provides only 2 cores, so don't overdo the parallelism and waste memory. |
| 114 | before_script: |
| 115 | - ./configure --with-pydebug |
| 116 | - make -j4 regen-all |
| 117 | - changes=`git status --porcelain` |
| 118 | - | |
| 119 | # Check for changes in regenerated files |
Zachary Ware | 3f8f16d | 2017-06-10 23:04:36 -0500 | [diff] [blame] | 120 | if ! test -z "$changes" |
Zachary Ware | 0afbabe | 2017-06-10 21:37:40 -0500 | [diff] [blame] | 121 | then |
| 122 | echo "Generated files not up to date" |
Zachary Ware | 3f8f16d | 2017-06-10 23:04:36 -0500 | [diff] [blame] | 123 | echo "$changes" |
Zachary Ware | 0afbabe | 2017-06-10 21:37:40 -0500 | [diff] [blame] | 124 | exit 1 |
| 125 | fi |
Zachary Ware | 7eb3f82 | 2018-02-18 10:19:37 -0600 | [diff] [blame] | 126 | - make -j4 |
| 127 | - make pythoninfo |
Brett Cannon | bb09c86 | 2017-02-10 14:21:15 -0800 | [diff] [blame] | 128 | |
| 129 | script: |
Brett Cannon | 70cb187 | 2017-06-24 16:51:23 -0700 | [diff] [blame] | 130 | # Using the built Python as patchcheck.py is built around the idea of using |
| 131 | # a checkout-build of CPython to know things like what base branch the changes |
| 132 | # should be compared against. |
| 133 | # Only run on Linux as the check only needs to be run once. |
| 134 | - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./python Tools/scripts/patchcheck.py --travis $TRAVIS_PULL_REQUEST; fi |
Victor Stinner | 87d332d | 2017-10-24 01:29:53 -0700 | [diff] [blame] | 135 | # Check that all symbols exported by libpython start with "Py" or "_Py" |
| 136 | - make smelly |
Zachary Ware | 7eb3f82 | 2018-02-18 10:19:37 -0600 | [diff] [blame] | 137 | # `-r -w` implicitly provided through `make buildbottest`. |
| 138 | - make buildbottest TESTOPTS="-j4 -uall,-cpu" |
Brett Cannon | bb09c86 | 2017-02-10 14:21:15 -0800 | [diff] [blame] | 139 | |
| 140 | notifications: |
| 141 | email: false |
| 142 | irc: |
| 143 | channels: |
Donald Stufft | 4538ddc | 2017-02-10 19:58:34 -0500 | [diff] [blame] | 144 | # This is set to a secure variable to prevent forks from notifying the |
| 145 | # IRC channel whenever they fail a build. This can be removed when travis |
| 146 | # implements https://github.com/travis-ci/travis-ci/issues/1094. |
| 147 | # The actual value here is: irc.freenode.net#python-dev |
| 148 | - 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] | 149 | on_success: change |
| 150 | on_failure: always |
| 151 | skip_join: true |