summaryrefslogtreecommitdiffstats
path: root/.travis.yml
blob: 515cc8f52595273056bd3ca3c237c012160cc400 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
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="-n -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