py2cairo/.travis.yml

85 lines
3.4 KiB
YAML

matrix:
include:
- os: linux
dist: trusty
language: python
python: "2.7"
env: CFLAGS="-Werror -coverage"
- os: linux
dist: trusty
language: python
python: "3.4"
env: CFLAGS="-Werror -coverage"
- os: linux
dist: trusty
language: python
python: "3.5"
env: CFLAGS="-Werror -coverage"
- os: linux
dist: trusty
language: python
python: "3.6"
env: CFLAGS="-Werror -coverage"
- os: linux
dist: xenial
language: python
python: "3.7"
env: CFLAGS="-Werror -coverage"
- os: linux
dist: xenial
language: python
python: "3.8"
env: CFLAGS="-Werror -coverage"
- os: linux
dist: xenial
language: python
python: "pypy2.7-6.0"
env: CFLAGS="-Werror -coverage"
- os: linux
dist: xenial
language: python
python: "pypy3.5-6.0"
env: CFLAGS="-Werror -coverage"
- os: osx
osx_image: xcode10.3
language: generic
env: PYVER="3" CFLAGS="-Werror -coverage"
- os: osx
osx_image: xcode10.3
language: generic
env: PYVER="2" CFLAGS="-Werror -coverage"
install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then travis_retry sudo apt-get update -q; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then travis_retry sudo apt-get install -y libcairo2-dev; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install pkg-config || brew upgrade pkg-config || true; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install cairo || brew upgrade cairo || true; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$PYVER" == "2" ]]; then brew install python@2 || brew upgrade python@2 || true; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$PYVER" == "2" ]]; then python2 -m pip install virtualenv; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$PYVER" == "2" ]]; then virtualenv ../venv -p python2; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$PYVER" == "3" ]]; then brew install python || brew upgrade python || true; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$PYVER" == "3" ]]; then python3 -m pip install virtualenv; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$PYVER" == "3" ]]; then virtualenv ../venv -p python3; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then source ../venv/bin/activate; fi
- python -m pip install --upgrade setuptools
- python -m pip install --upgrade pytest flake8 sphinx sphinx_rtd_theme coverage codecov hypothesis attrs
- python -m pip install --upgrade mypy || true
- if [[ "$TRAVIS_OS_NAME" != "osx" ]] && [[ "$TRAVIS_PYTHON_VERSION" != "3.8" ]] && [[ "${TRAVIS_PYTHON_VERSION:0:4}" != "pypy" ]]; then python -m pip install --upgrade pygame; fi
script:
- python -m coverage run --branch setup.py test
- python -m codecov --required || true
- python -m flake8 .
- python setup.py sdist
- python setup.py bdist
- python setup.py install --root=_root
- python setup.py install --root="$(pwd)"/_root_abs
- python setup.py bdist_egg
- python setup.py bdist_wheel
- python setup.py install --root=_root_setup
- if [[ "${TRAVIS_PYTHON_VERSION:0:4}" != "pypy" ]] ; then python -m pip install .; fi
- python -m sphinx -W -a -E -b html -n docs docs/_build