]> granicus.if.org Git - python/commitdiff
Add a Travis configuration file
authorBrett Cannon <brettcannon@users.noreply.github.com>
Fri, 10 Feb 2017 22:21:15 +0000 (14:21 -0800)
committerGitHub <noreply@github.com>
Fri, 10 Feb 2017 22:21:15 +0000 (14:21 -0800)
.travis.yml [new file with mode: 0644]

diff --git a/.travis.yml b/.travis.yml
new file mode 100644 (file)
index 0000000..af0f28d
--- /dev/null
@@ -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