1language: c 2dist: trusty 3sudo: false 4group: beta 5 6# To cache doc-building dependencies and C compiler output. 7cache: 8 - pip 9 - ccache 10 - directories: 11 - $HOME/multissl 12 13env: 14 global: 15 - OPENSSL=1.1.0i 16 - OPENSSL_DIR="$HOME/multissl/openssl/${OPENSSL}" 17 - PATH="${OPENSSL_DIR}/bin:$PATH" 18 # Use -O3 because we don't use debugger on Travis-CI 19 - CFLAGS="-I${OPENSSL_DIR}/include -O3" 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" 24 25branches: 26 only: 27 - master 28 - /^\d\.\d$/ 29 - buildbot-custom 30 31matrix: 32 fast_finish: true 33 allow_failures: 34 - env: OPTIONAL=true 35 include: 36 - os: linux 37 language: c 38 compiler: clang 39 # gcc also works, but to keep the # of concurrent builds down, we use one C 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 43 addons: 44 apt: 45 packages: 46 - xvfb 47 - os: linux 48 language: python 49 # Build the docs against a stable version of Python so code bugs don't hold up doc-related PRs. 50 python: 3.6 51 env: TESTING=docs 52 before_script: 53 - cd Doc 54 # Sphinx is pinned so that new versions that introduce new warnings won't suddenly cause build failures. 55 # (Updating the version is fine as long as no warnings are raised by doing so.) 56 - python -m pip install sphinx==1.8.2 blurb 57 script: 58 - make check suspicious html SPHINXOPTS="-q -W -j4" 59 - os: linux 60 language: c 61 compiler: gcc 62 env: OPTIONAL=true 63 addons: 64 apt: 65 packages: 66 - xvfb 67 before_script: 68 - ./configure 69 - make -s -j4 70 # Need a venv that can parse covered code. 71 - ./python -m venv venv 72 - ./venv/bin/python -m pip install -U coverage 73 - ./venv/bin/python -m test.pythoninfo 74 script: 75 # Skip tests that re-run the entire test suite. 76 - xvfb-run ./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 77 after_script: # Probably should be after_success once test suite updated to run under coverage.py. 78 # Make the `coverage` command available to Codecov w/ a version of Python that can parse all source files. 79 - source ./venv/bin/activate 80 - bash <(curl -s https://codecov.io/bash) 81 82 83before_install: 84 - set -e 85 - | 86 # Check short-circuit conditions 87 if [ "${TESTING}" != "docs" ] 88 then 89 if [ "$TRAVIS_PULL_REQUEST" = "false" ] 90 then 91 echo "Not a PR, doing full build." 92 else 93 # Pull requests are slightly complicated because $TRAVIS_COMMIT_RANGE 94 # may include more changes than desired if the history is convoluted. 95 # Instead, explicitly fetch the base branch and compare against the 96 # merge-base commit. 97 git fetch -q origin +refs/heads/$TRAVIS_BRANCH 98 changes=$(git diff --name-only HEAD $(git merge-base HEAD FETCH_HEAD)) 99 echo "Files changed:" 100 echo "$changes" 101 if ! echo "$changes" | grep -qvE '(\.rst$)|(^Doc)|(^Misc)' 102 then 103 echo "Only docs were updated, stopping build process." 104 exit 105 fi 106 fi 107 fi 108 109install: 110 - | 111 # Install OpenSSL as necessary 112 if [ "${TESTING}" != "docs" ] 113 then 114 # clang complains about unused-parameter a lot, redirect stderr 115 python3 Tools/ssl/multissltests.py --steps=library \ 116 --base-directory ${HOME}/multissl \ 117 --openssl ${OPENSSL} >/dev/null 2>&1 118 fi 119 - openssl version 120 121# Travis provides only 2 cores, so don't overdo the parallelism and waste memory. 122before_script: 123 - ./configure --with-pydebug 124 - make -j4 regen-all 125 - changes=`git status --porcelain` 126 - | 127 # Check for changes in regenerated files 128 if ! test -z "$changes" 129 then 130 echo "Generated files not up to date" 131 echo "$changes" 132 exit 1 133 fi 134 - make -j4 135 - make pythoninfo 136 137script: 138 # Using the built Python as patchcheck.py is built around the idea of using 139 # a checkout-build of CPython to know things like what base branch the changes 140 # should be compared against. 141 # Only run on Linux as the check only needs to be run once. 142 - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./python Tools/scripts/patchcheck.py --travis $TRAVIS_PULL_REQUEST; fi 143 # Check that all symbols exported by libpython start with "Py" or "_Py" 144 - make smelly 145 # `-r -w` implicitly provided through `make buildbottest`. 146 - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then XVFB_RUN=xvfb-run; fi; $XVFB_RUN make buildbottest TESTOPTS="-j4 -uall,-cpu" 147 148notifications: 149 email: false 150 irc: 151 channels: 152 # This is set to a secure variable to prevent forks from notifying the 153 # IRC channel whenever they fail a build. This can be removed when travis 154 # implements https://github.com/travis-ci/travis-ci/issues/1094. 155 # The actual value here is: irc.freenode.net#python-dev 156 - secure: "s7kAkpcom2yUJ8XqyjFI0obJmhAGrn1xmoivdaPdgBIA++X47TBp1x4pgDsbEsoalef7bEwa4l07KdT4qa+DOd/c4QxaWom7fbN3BuLVsZuVfODnl79+gYq/TAbGfyH+yDs18DXrUfPgwD7C5aW32ugsqAOd4iWzfGJQ5OrOZzqzGjYdYQUEkJFXgxDEIb4aHvxNDWGO3Po9uKISrhb5saQ0l776yLo1Ur7M4oxl8RTbCdgX0vf5TzPg52BgvZpOgt3DHOUYPeiJLKNjAE6ibg0U95sEvMfHX77nz4aFY4/3UI6FFaRla34rZ+mYKrn0TdxOhera1QOgPmM6HzdO4K44FpfK1DS0Xxk9U9/uApq+cG0bU3W+cVUHDBe5+90lpRBAXHeHCgT7TI8gec614aiT8lEr3+yH8OBRYGzkjNK8E2LJZ/SxnVxDe7aLF6AWcoWLfS6/ziAIBFQ5Nc4U72CT8fGVSkl8ywPiRlvixKdvTODMSZo0jMqlfZSNaAPTsNRx4wu5Uis4qekwe32Fz4aB6KGpsuuVjBi+H6v0RKxNJNGY3JKDiEH2TK0UE2auJ5GvLW48aUVFcQMB7euCWYXlSWVRHh3WLU8QXF29Dw4JduRZqUpOdRgMHU79UHRq+mkE0jAS/nBcS6CvsmxCpTSrfVYuMOu32yt18QQoTyU=" 157 on_success: change 158 on_failure: always 159 skip_join: true 160