summaryrefslogtreecommitdiff
path: root/.travis.yml
blob: f9683ff64aff2e017df0d8b2d7ff8a735d62dcbd (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
language: python
sudo: false
matrix:
    include:
        - os: linux
          python: 2.7
        - os: linux
          python: 3.3
        - os: linux
          python: 3.4
        - os: linux
          python: 3.5
        - os: linux
          python: 3.6
        - os: linux
          python: pypy
        - os: linux
          python: pypy3
        # 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.
        - os: osx
          language: generic
          env: TERRYFY_PYTHON='macpython 2.7'
        - os: osx
          language: generic
          env: TERRYFY_PYTHON='macpython 3.4'
        - os: osx
          language: generic
          env: TERRYFY_PYTHON='macpython 3.5'
        - os: osx
          language: generic
          env: TERRYFY_PYTHON='macpython 3.6.0'
before_install:
    - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then git clone https://github.com/MacPython/terryfy; fi
    - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then source terryfy/travis_tools.sh; fi
    - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then get_python_environment $TERRYFY_PYTHON venv; fi
    - if [[ "$TERRYFY_PYTHON" == "homebrew 3" ]]; then alias pip=`which pip3` ; fi
install:
    - pip install -e .[test]
script:
    - python setup.py test -q
notifications:
    email: false
after_success:
    - echo [distutils]                                  > ~/.pypirc
    - echo index-servers = pypi                        >> ~/.pypirc
    - echo [pypi]                                      >> ~/.pypirc
    - echo repository=https://pypi.python.org/pypi     >> ~/.pypirc
    - echo username=zope.wheelbuilder                  >> ~/.pypirc
    - echo password=$PYPIPASSWORD                      >> ~/.pypirc
    - if [[ $TRAVIS_TAG && "$TRAVIS_OS_NAME" == "osx" ]]; then pip install twine; fi
    - if [[ $TRAVIS_TAG && "$TRAVIS_OS_NAME" == "osx" ]]; then python setup.py bdist_wheel; fi
    - if [[ $TRAVIS_TAG && "$TRAVIS_OS_NAME" == "osx" ]]; then twine upload dist/*; fi

env:
    global:
        secure: "CeOq8/6F8IlbRpKEk2z3RPD/q5cBCPXGOUgjYryG/c+7P6SCTxaTKfxiJPqT3sGgO8x/HcJVuvZghyqCPvysk3cbnq4SiMtI1S0hS/N3DFsGZHn25YQBipAYjA4YDUb6GqCpsSUIXdbGMEzG7DOSB6c+49+//wkjbBFHmPNWvMQ="