forked from vispy/vispy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
179 lines (158 loc) · 7.09 KB
/
.travis.yml
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
language: generic
os: linux
dist: xenial
addons:
apt:
packages:
- &mesa_apt [libgl1-mesa-dri]
- &full_apt [libgl1-mesa-dri, libegl1-mesa, cmake, xorg-dev, libglu1-mesa-dev, mercurial, libdbus-1-dev, libgl1-mesa-dev, libglu1-mesa-dev, libpulse-dev, libx11-dev, libxcursor-dev, libxext-dev, libxi-dev, libxinerama-dev, libxrandr-dev, libxss-dev, libxt-dev, libxv-dev, libxxf86vm-dev, libasound2-dev, libudev-dev, libsdl2-2.0-0]
# full_apt should also have 'libts-dev' but it is not available on xenial
# liblgfw2 is not whitelisted by Travis, so we don't try using it here (not usable anyway)
# Size testing can be skipped by adding "[size skip]" within a commit message.
matrix:
include:
- env: PYTHON_VERSION=3.7 DEPS=minimal TEST=standard
CONDA_DEPENDENCIES="numpy scipy pytest cython coveralls pytest-cov pytest-sugar meshio pillow"
CONDA_CHANNELS=conda-forge
CONDA_CHANNEL_PRIORITY=strict
PIP_DEPENDENCIES="numpydoc"
os: osx
osx_image: xcode10.1
- env: PYTHON_VERSION=3.7 DEPS=full TEST=standard
CONDA_DEPENDENCIES="numpy scipy pytest cython coveralls pytest-cov pytest-sugar pyopengl networkx pysdl2 matplotlib jupyter pyqt=5 scikit-image meshio pillow"
CONDA_CHANNELS=conda-forge
CONDA_CHANNEL_PRIORITY=strict
os: osx
osx_image: xcode10.1
# also tests file sizes, style, line endings
- env: PYTHON_VERSION=3.7 DEPS=minimal TEST=standard
CONDA_DEPENDENCIES="numpy scipy pytest cython coveralls pytest-cov pytest-sugar flake8 meshio pillow"
CONDA_CHANNELS=conda-forge
CONDA_CHANNEL_PRIORITY=strict
PIP_DEPENDENCIES="numpydoc"
addons:
apt:
packages:
# XXX eventually we need to support GLFW 3.3.1...
- env: PYTHON_VERSION=3.7 DEPS=full TEST=standard
CONDA_DEPENDENCIES="numpy scipy pytest cython coveralls pytest-cov pytest-sugar pyopengl networkx pysdl2 matplotlib jupyter pyqt=5 pillow decorator six scikit-image glfw!=3.3.1 freetype-py imageio freetype<2.10.0 meshio"
CONDA_CHANNELS=conda-forge
CONDA_CHANNEL_PRIORITY=strict
PIP_DEPENDENCIES="husl pypng cassowary"
addons:
apt:
packages:
- *mesa_apt
- *full_apt
# test examples
- env: PYTHON_VERSION=3.7 DEPS=full TEST=examples
CONDA_DEPENDENCIES="numpy scipy pytest cython coveralls pytest-cov pytest-sugar pyopengl networkx pysdl2 matplotlib jupyter pyqt=5 pillow decorator six scikit-image glfw!=3.3.1 freetype-py imageio freetype<2.10.0 meshio"
CONDA_CHANNELS=conda-forge
CONDA_CHANNEL_PRIORITY=strict
PIP_DEPENDENCIES="husl pypng cassowary"
addons:
apt:
packages:
- *mesa_apt
- *full_apt
# OSMesa requires a specific Travis run because since the system also
# has (on-screen) OpenGL installed, we need to setup environment variable
# to avoid having the linker load the wrong libglapi.so which would cause
# OSMesa to crash
- env: PYTHON_VERSION=3.7 DEPS=osmesa TEST=osmesa
CONDA_DEPENDENCIES="numpy scipy pytest cython coveralls pytest-cov pytest-sugar mesalib libglu meshio pillow"
CONDA_CHANNELS=conda-forge
CONDA_CHANNEL_PRIORITY=strict
addons:
apt:
packages:
# Generate HTML website
# also tests file sizes, style, line endings
- env: PYTHON_VERSION=3.7 DEPS=minimal TEST=website
CONDA_DEPENDENCIES="numpy pillow scipy pytest cython coveralls pytest-cov pytest-sugar flake8 meshio sphinx sphinx_bootstrap_theme"
CONDA_CHANNELS=conda-forge
CONDA_CHANNEL_PRIORITY=strict
PIP_DEPENDENCIES="numpydoc"
addons:
apt:
packages:
before_install:
- git clone https://github.com/astropy/ci-helpers.git
- source ci-helpers/travis/setup_conda.sh
- SRC_DIR=$(pwd)
- if [ "${TEST}" == "website" ]; then
openssl aes-256-cbc -K $encrypted_26a3009aece7_key -iv $encrypted_26a3009aece7_iv -in ci/vispy_travis_website_upload.enc -out vispy_travis_website_upload -d;
export PAGES_DEPLOY_KEY="${SRC_DIR}/vispy_travis_website_upload";
fi;
install:
# On Python3, install system-wide copies of bundled libraries instead
# Also install PyQt5, imaging (PIL or pillow), scipy, mpl, egl
# wxpython available from conda-forge but not for OSX:
# https://github.com/conda-forge/wxpython-feedstock/issues/2
# Don't test pyside2 because it seems to segfault on travis
# If we only need a single backend (DEPS=backend), then use PyQT5
# Don't test Pyglet because it currently segfaults (but AppVeyor checks it)
# WX requires OSMesa (mesa on conda) which has typically been an
# additional test environment. With llvm=3.3 the combination of
# EGL and mesa causes segmentation faults. See issue #1401.
- if [ "${DEPS}" == "full" ] && [ "${TRAVIS_OS_NAME}" == "linux" ] && [ "${PYTHON_VERSION}" == "3.7" ]; then
rm -rf ${SRC_DIR}/vispy/ext/_bundled;
fi;
# Install vispy
- cd ${SRC_DIR}
- python setup.py install
- python setup.py develop
- cd ~
before_script:
# We need to create a (fake) display on Travis, let's use a funny resolution
# For OSX: https://github.com/travis-ci/travis-ci/issues/7313#issuecomment-279914149
- if [ "${TEST}" != "osmesa" ]; then
export DISPLAY=:99.0;
if [ "${TRAVIS_OS_NAME}" = "osx" ]; then ( sudo Xvfb :99 -ac -screen 0 1400x900x24 +render +iglx; echo ok )& fi;
if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render;
fi;
fi;
- if [ "${TEST}" == "osmesa" ]; then
export OSMESA_LIBRARY=$CONDA_PREFIX/lib/libOSMesa32.so;
fi;
script:
- cd ${SRC_DIR}
- python -c "import vispy; print(vispy.sys_info())"
- if [ "${TEST}" == "standard" ]; then
python make test unit --tb=short;
fi;
# FIXME: This never actually runs examples for DEPS=minimal because there is no backend
- if [ "${TEST}" == "examples" ] || [ "${DEPS}" == "minimal" ]; then
make examples;
fi;
- if [ "${DEPS}" == "minimal" ]; then
make extra;
fi;
- if [ "${TEST}" == "osmesa" ]; then
make osmesa;
fi;
- if [ "${TEST}" == "website" ]; then
source ./ci/build_website.sh;
fi;
after_success:
# Need to run from source dir to execute appropriate "git" commands
- if [ "${TEST}" == "standard" ]; then
COVERAGE_FILE=.vispy-coverage coverage combine;
mv .vispy-coverage .coverage;
coveralls;
fi;
deploy:
- provider: pages:git
repo: vispy/vispy.github.com
target_branch: master
fqdn: vispy.org
commit_message: "Deploy %{project_name} website for SHA:%{git_sha} (Tag: %{git_tag})"
edge: true
keep_history: true
cleanup: false
local_dir: doc/_build/html
on:
repo: vispy/vispy
tags: true
condition: $TEST == website