forked from libtcod/python-tcod
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
79 lines (75 loc) · 2.47 KB
/
.travis.yml
File metadata and controls
79 lines (75 loc) · 2.47 KB
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
language: python
matrix:
include:
- os: linux
python: 2.7
env: CC=gcc-8 CXX=g++-8
- os: linux
python: 3.5
env: CC=gcc-8 CXX=g++-8
- os: osx
language: generic
env: USE_OPENMP=true
- os: osx
language: generic
env: BREW_PYTHON3=old
- os: osx
language: generic
env: USE_OPENMP=true BREW_PYTHON3=latest
- os: osx
language: generic
env: MB_PYTHON_VERSION=2.7.15
- os: osx
language: generic
env: MB_PYTHON_VERSION=3.7.1
allow_failures:
- env: USE_OPENMP=true BREW_PYTHON3=latest
- env: MB_PYTHON_VERSION=2.7.15
- env: USE_OPENMP=true
- python: pypy3.5
- python: 2.7
fast_finish: true
# sudo is required to prevent xvfb crashes from container-based workers.
sudo: required
dist: trusty
cache: pip
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-8
- libsdl2-dev
before_install:
- source .travis/before_install.sh
- 'if [[ "$BREW_PYTHON3" == "old" ]]; then HOMEBREW_NO_AUTO_UPDATE=1 brew install python3; fi'
- 'if [[ "$BREW_PYTHON3" == "latest" ]]; then brew upgrade python3; fi'
- 'if [[ -n "$BREW_PYTHON3" ]]; then python3 -m pip install virtualenv; fi'
- 'if [[ -n "$BREW_PYTHON3" ]]; then python3 -m virtualenv venv; fi'
- 'if [[ -n "$BREW_PYTHON3" ]]; then source venv/bin/activate; fi'
- 'if [[ "$TRAVIS_OS_NAME" == "osx" && "$USE_OPENMP" == "true" ]]; then source .travis/install_openmp.sh; fi'
- source .travis/install_python.sh
- 'wget https://bootstrap.pypa.io/get-pip.py'
- python get-pip.py
- pip install --upgrade setuptools
- pip install --pre --upgrade wheel
- pip install --requirement requirements.txt
install:
- if [[ -z "$TRAVIS_TAG" ]]; then export BUILD_FLAGS="-g"; fi
- python setup.py build $BUILD_FLAGS develop bdist_wheel --py-limited-api=cp35
- 'if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then python -m pip install delocate; fi'
- 'if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then delocate-wheel -v dist/*.whl; fi'
- 'if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then delocate-listdeps --all dist/*.whl; fi'
before_script:
# pytest==3.7.3 breaks MacOS doc-tests.
- pip install 'pytest!=3.7.3' pytest-cov
script:
- pytest -v
after_success:
- pip install codacy-coverage python-coveralls codecov
- codecov
- coveralls
- coverage xml
- if [[ -n "$CODACY_PROJECT_TOKEN" ]]; then python-codacy-coverage -r coverage.xml; fi
- if [[ -n "$TRAVIS_TAG" ]]; then pip install --upgrade twine pyOpenSSL; fi
- if [[ -n "$TRAVIS_TAG" && "$TRAVIS_OS_NAME" == "osx" ]]; then twine upload --skip-existing dist/*; fi