blob: dc3a00d1f4b5a337196264bb35b76da098708c0e [file] [log] [blame]
INADA Naoki3337d332017-02-19 14:11:59 +09001language: c
2dist: trusty
3sudo: false
4group: beta
5
6# To cache doc-building dependencies.
7cache: pip
8
9os:
10 - linux
11 # macOS builds are disabled as the machines are under-provisioned on Travis,
12 # adding up to an extra hour completing a full CI run.
13 #- osx
14
15compiler:
16 - clang
17 - gcc
18
19env:
20 - TESTING=cpython
21
22matrix:
23 allow_failures:
24 - env:
25 - TESTING=coverage
26 include:
27 - os: linux
28 language: python
29 python: 3.5
30 env:
31 - TESTING=docs
32 before_script:
33 - |
34 if git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '^Doc/'
35 then
36 echo "Docs weren't updated, stopping build process."
37 exit
38 fi
39 cd Doc
40 make venv PYTHON=python3
41 script:
42 - make html SPHINXBUILD="./venv/bin/python3 -m sphinx" SPHINXOPTS="-q"
43 - make check
44 - os: linux
45 language: c
46 compiler: clang
47 env:
48 - TESTING=coverage
49 before_script:
50 - |
51 if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.(rst|yml)$)|(^Doc)/'
52 then
53 echo "Only docs were updated, stopping build process."
54 exit
55 fi
56 ./configure
57 make -s -j4
58 # Need a venv that can parse covered code.
59 ./python -m venv venv
60 ./venv/bin/python -m pip install -U coverage
61 script:
62 # Skip tests that re-run the entire test suite.
63 - ./venv/bin/python -m coverage run --pylib -m test -uall -x test_multiprocessing_fork -x test_multiprocessing_forkserver -x test_multiprocessing_spawn
64 after_script: # Probably should be after_success once test suite updated to run under coverage.py.
65 # Make the `coverage` command available to Codecov w/ a version of Python that can parse all source files.
66 - source ./venv/bin/activate
67 - bash <(curl -s https://codecov.io/bash)
68 - os: linux
69 language: cpp
70 compiler: clang
71 env:
72 - TESTING="C++ header compatibility"
73 before_script:
74 - ./configure
75 script:
76 - echo '#include "Python.h"' > test.cc && $CXX -c test.cc -o /dev/null -I ./Include -I .
77
78# Travis provides only 2 cores, so don't overdue the parallelism and waste memory.
79before_script:
80 - |
81 if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.(rst|yml)$)|(^Doc)/'
82 then
83 echo "Only docs were updated, stopping build process."
84 exit
85 fi
86 ./configure --with-pydebug
87 make -j4
88
89script:
90 # `-r -w` implicitly provided through `make buildbottest`.
91 - make buildbottest TESTOPTS="-j4"
92
93notifications:
94 email: false
95 irc:
96 channels:
97 # This is set to a secure variable to prevent forks from notifying the
98 # IRC channel whenever they fail a build. This can be removed when travis
99 # implements https://github.com/travis-ci/travis-ci/issues/1094.
100 # The actual value here is: irc.freenode.net#python-dev
101 - secure: "s7kAkpcom2yUJ8XqyjFI0obJmhAGrn1xmoivdaPdgBIA++X47TBp1x4pgDsbEsoalef7bEwa4l07KdT4qa+DOd/c4QxaWom7fbN3BuLVsZuVfODnl79+gYq/TAbGfyH+yDs18DXrUfPgwD7C5aW32ugsqAOd4iWzfGJQ5OrOZzqzGjYdYQUEkJFXgxDEIb4aHvxNDWGO3Po9uKISrhb5saQ0l776yLo1Ur7M4oxl8RTbCdgX0vf5TzPg52BgvZpOgt3DHOUYPeiJLKNjAE6ibg0U95sEvMfHX77nz4aFY4/3UI6FFaRla34rZ+mYKrn0TdxOhera1QOgPmM6HzdO4K44FpfK1DS0Xxk9U9/uApq+cG0bU3W+cVUHDBe5+90lpRBAXHeHCgT7TI8gec614aiT8lEr3+yH8OBRYGzkjNK8E2LJZ/SxnVxDe7aLF6AWcoWLfS6/ziAIBFQ5Nc4U72CT8fGVSkl8ywPiRlvixKdvTODMSZo0jMqlfZSNaAPTsNRx4wu5Uis4qekwe32Fz4aB6KGpsuuVjBi+H6v0RKxNJNGY3JKDiEH2TK0UE2auJ5GvLW48aUVFcQMB7euCWYXlSWVRHh3WLU8QXF29Dw4JduRZqUpOdRgMHU79UHRq+mkE0jAS/nBcS6CvsmxCpTSrfVYuMOu32yt18QQoTyU="
102 on_success: change
103 on_failure: always
104 skip_join: true