summaryrefslogtreecommitdiff
path: root/.travis.yml
diff options
context:
space:
mode:
authorBrett Cannon <brettcannon@users.noreply.github.com>2017-02-10 14:21:15 -0800
committerGitHub <noreply@github.com>2017-02-10 14:21:15 -0800
commitbb09c863e94b40d6169481b89e708949252e4756 (patch)
tree256632f7ff351512c56acb995c27793a9b13554e /.travis.yml
parent6f0eb93183519024cb360162bdd81b9faec97ba6 (diff)
downloadcpython-git-bb09c863e94b40d6169481b89e708949252e4756.tar.gz
Add a Travis configuration file
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml81
1 files changed, 81 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000000..af0f28dd35
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,81 @@
+language: c
+dist: trusty
+sudo: false
+group: beta
+
+# To cache doc-building dependencies.
+cache: pip
+
+os:
+ - linux
+ # macOS builds are disabled as the machines are under-provisioned on Travis,
+ # adding up to an extra hour completing a full CI run.
+ #- osx
+
+compiler:
+ - clang
+ - gcc
+
+env:
+ - TESTING=cpython
+
+matrix:
+ allow_failures:
+ - env:
+ - TESTING=coverage
+ include:
+ - os: linux
+ language: python
+ python: 3.5
+ env:
+ - TESTING=docs
+ before_script:
+ - cd Doc
+ - make venv PYTHON=python3
+ script:
+ - make html SPHINXBUILD="./venv/bin/python3 -m sphinx" SPHINXOPTS="-nW -q -b linkcheck"
+ - os: linux
+ language: c
+ compiler: clang
+ env:
+ - TESTING=coverage
+ before_script:
+ - ./configure
+ - make -s -j4
+ # Need a venv that can parse covered code.
+ - ./python -m venv venv
+ - ./venv/bin/python -m pip install -U coverage
+ script:
+ # Skip tests that re-run the entire test suite.
+ - ./venv/bin/python -m coverage run --pylib -m test -uall -x test_multiprocessing_fork -x test_multiprocessing_forkserver -x test_multiprocessing_spawn
+ after_script: # Probably should be after_success once test suite updated to run under coverage.py.
+ # Make the `coverage` command available to Codecov w/ a version of Python that can parse all source files.
+ - source ./venv/bin/activate
+ - bash <(curl -s https://codecov.io/bash)
+ - os: linux
+ language: cpp
+ compiler: clang
+ env:
+ - TESTING="C++ header compatibility"
+ before_script:
+ - ./configure
+ script:
+ - echo '#include "Python.h"' > test.cc && $CXX -c test.cc -o /dev/null -I ./Include -I .
+
+# Travis provides only 2 cores, so don't overdue the parallelism and waste memory.
+before_script:
+ - ./configure --with-pydebug
+ - make -j4
+
+script:
+ # `-r -w` implicitly provided through `make buildbottest`.
+ - make buildbottest TESTOPTS="-j4"
+
+notifications:
+ email: false
+ irc:
+ channels:
+ - "irc.freenode.net#python-dev"
+ on_success: change
+ on_failure: always
+ skip_join: true