summaryrefslogtreecommitdiff
path: root/.travis.yml
blob: 13ec41be7f7ec2d371ed98cc89728666753ce14e (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
os: linux
language: python

cache:
  pip: true
  directories:
    - $HOME/.ccache
    - libs

python:
  - 3.9
  - 2.7
  - 3.8
  - 3.7
  - 3.6
  - 3.5

env:
  global:
    - USE_CCACHE=1
    - CCACHE_SLOPPINESS=pch_defines,time_macros
    - CCACHE_COMPRESS=1
    - CCACHE_MAXSIZE=70M
    - PATH="/usr/lib/ccache:$PATH"
    - LIBXML2_VERSION=2.9.10
    - LIBXSLT_VERSION=1.1.34
  matrix:
    - STATIC_DEPS=false
    - STATIC_DEPS=true

matrix:
  include:
    - python: 3.8
      env:
        - STATIC_DEPS=false
        - EXTRA_DEPS="docutils pygments sphinx sphinx-rtd-theme"
      script: make html
    - python: 3.8
      env:
        - STATIC_DEPS=false
        - EXTRA_DEPS="coverage<5"
    - python: 3.8
      env:
        - STATIC_DEPS=true
        - LIBXML2_VERSION=2.9.2  # minimum version requirements
        - LIBXSLT_VERSION=1.1.27
    - python: pypy
      env: STATIC_DEPS=false
    - python: pypy3
      env: STATIC_DEPS=false
    - python: 3.8
      env: STATIC_DEPS=false
      arch: arm64
    - python: 3.8
      env: STATIC_DEPS=true
      arch: arm64
    - python: 3.8
      env: STATIC_DEPS=false
      arch: ppc64le
    - python: 3.8
      env: STATIC_DEPS=true
      arch: ppc64le
  allow_failures:
    - python: pypy
    - python: pypy3

install:
    - pip install -U pip wheel
    - if [ -z "${TRAVIS_PYTHON_VERSION##*-dev}" ];
        then pip install --install-option=--no-cython-compile https://github.com/cython/cython/archive/master.zip;
        else pip install -r requirements.txt;
      fi
    - pip install -U beautifulsoup4 cssselect html5lib rnc2rng ${EXTRA_DEPS}

script:
  - CFLAGS="-O0 -g -fPIC" python -u setup.py build_ext --inplace
      $(if [ -n "${TRAVIS_PYTHON_VERSION##2.*}" -a -n "${TRAVIS_PYTHON_VERSION##3.[34]*}" ]; then echo -n " -j7 "; fi )
      $(if [ -n "$EXTRA_DEPS" -a -z "${EXTRA_DEPS##*coverage*}" ]; then echo -n "--with-coverage"; fi )
  - ccache -s || true
  - CFLAGS="-O0 -g -fPIC" PYTHONUNBUFFERED=x make test
  - ccache -s || true