summaryrefslogtreecommitdiff
path: root/.travis.yml
blob: 75eb8b1472fe0651a7fe47b33e5b7511c395e79b (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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
language: python

env:
  global:
    TWINE_USERNAME: zope.wheelbuilder
    TWINE_PASSWORD:
      secure: "U6CeZtNEPDN3qKXfrLcvHFLrowqNWxmapXLWygZRxKgfR+ypowe1Y0a4kCBEBZKtysbY26MmIkrMV07tEMxny1yUWVCvRvUaQw0Ic3t5CM0R019zjVh9fQUTdWGCwri86Qj/OaeuPeMR0LCr6d9nMSun0GWSWhjOUhkTCdchfQw="

python:
  - 2.7
  - 3.5
  - 3.6
  - 3.7
  - 3.8
  - pypy
  - pypy3

matrix:
  include:

    - name: "Python: 2.7, pure (no C extensions), with ZOPE_WATCH_CHECKERS enabled"
      python: "2.7"
      env: PURE_PYTHON=1 ZOPE_WATCH_CHECKERS=1

    - name: "Python: 3.7, with ZOPE_WATCH_CHECKERS enabled"
      python: 3.7
      env: ZOPE_WATCH_CHECKERS=1

    - name: "Python: 3.7, pure (no C extensions)"
      python: 3.7
      env: PURE_PYTHON=1

    # manylinux wheel builds
    - name: 64-bit manylinux wheels (all Pythons)
      services: docker
      env: DOCKER_IMAGE=quay.io/pypa/manylinux2010_x86_64
      install: docker pull $DOCKER_IMAGE
      script: bash .manylinux.sh

    - name: 32-bit manylinux wheels (all Pythons)
      services: docker
      env: DOCKER_IMAGE=quay.io/pypa/manylinux2010_i686 PRE_CMD=linux32
      install: docker pull $DOCKER_IMAGE
      script: bash .manylinux.sh

    # It's important to use 'macpython' builds to get the least
    # restrictive wheel tag. It's also important to avoid
    # 'homebrew 3' because it floats instead of being a specific version.
    - name: Python 2.7 wheels for MacOS
      os: osx
      language: generic
      env: TERRYFY_PYTHON='macpython 2.7.17'
    - name: Python 3.5 wheels for MacOS
      os: osx
      language: generic
      env: TERRYFY_PYTHON='macpython 3.5'
    - name: Python 3.6 wheels for MacOS
      os: osx
      language: generic
      env: TERRYFY_PYTHON='macpython 3.6.2'
    - name: Python 3.7 wheels for MacOS
      os: osx
      language: generic
      env: TERRYFY_PYTHON='macpython 3.7.0'
    - name: Python 3.8 wheels for MacOS
      os: osx
      language: generic
      env: TERRYFY_PYTHON='macpython 3.8.0'

before_install:
  - |
    if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
      git clone https://github.com/MacPython/terryfy
      source terryfy/travis_tools.sh
      get_python_environment $TERRYFY_PYTHON venv
    fi

install:
  - python -m pip install -U pip setuptools
  - python -m pip install -U coveralls coverage
  # pip install zope.proxy here because because setup_requires will use
  # easy_install, which fails on Python 3.5 on Mac OS
  - python -m pip install -U zope.proxy
  - python -m pip install -U -e .[test,docs]

script:
  - python --version
  - python -m coverage run -m zope.testrunner --test-path=src
  - python -m coverage run -a -m sphinx -b doctest -d docs/_build/doctrees docs docs/_build/doctest
  - python setup.py bdist_wheel

after_success:
  - python -m coveralls
  - |
    if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
      # macpython 3.5 doesn't support recent TLS protocols which causes twine
      # upload to fail, so we use the system Python to run twine
      /usr/bin/python -m ensurepip --user
      /usr/bin/python -m pip install --user -U pip
      /usr/bin/python -m pip install --user -U -I twine
      /usr/bin/python -m twine check dist/*
      if [[ $TRAVIS_TAG ]]; then
        /usr/bin/python -m twine upload --skip-existing dist/*
      fi
    fi
  - |
    if [[ -n "$DOCKER_IMAGE" ]]; then
      pip install twine
      twine check wheelhouse/*
      if [[ $TRAVIS_TAG ]]; then
        twine upload --skip-existing wheelhouse/*
      fi
    fi

notifications:
  email: false

cache: pip
before_cache:
  - rm -f $HOME/.cache/pip/log/debug.log