forked from silx-kit/silx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
144 lines (121 loc) · 3.91 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
dist: trusty
sudo: required
language: python
git:
depth: 1
matrix:
include:
- python: 2.7
os: linux
env:
- BUILD_COMMAND=sdist
- WITH_QT_TEST=False
- PYOPENCL_VERSION=2015.1
- SILX_OPENCL=1
- python: 3.4
os: linux
env:
- BUILD_COMMAND=sdist
- WITH_QT_TEST=False
- PIP_INSTALL_EXTRA_ARGS="--global-option build --global-option --debug"
- PYOPENCL_VERSION=2015.1
- SILX_OPENCL=1
- python: 3.5
os: linux
env:
- BUILD_COMMAND=sdist
- WITH_QT_TEST=True
- PYOPENCL_VERSION=2015.1
- SILX_OPENCL=1
- python: 3.6
os: linux
env:
- BUILD_COMMAND=sdist
- WITH_QT_TEST=True
- PYOPENCL_VERSION=2018.1
- SILX_OPENCL=1
- language: generic
os: osx
env:
- BUILD_COMMAND=bdist_wheel
- WITH_QT_TEST=True
- PYOPENCL_VERSION=2017.2
cache:
apt: true
addons:
apt:
packages:
- libegl1-mesa # Required by Qt xcb platform plugin
- opencl-headers
- ocl-icd-libopencl1
- opencl-headers
- libgl1-mesa-glx # For OpenGL
- xserver-xorg-video-dummy # For OpenGL
before_install:
# On Linux: install OpenCL
# On MacOS: install python3 if needed
- source ./ci/before_install-${TRAVIS_OS_NAME}.sh
install:
# Upgrade distribution modules
- python -m pip install --upgrade pip
- pip install --upgrade setuptools
# Install build dependencies
- pip install --upgrade wheel
- pip install --upgrade numpy
- pip install --upgrade cython
# Print Python info
- python ./ci/info_platform.py
- pip list
- if [ "$TRAVIS_OS_NAME" == "linux" ];
then
dpkg -l;
fi
# Generate source package or wheel
- python setup.py $BUILD_COMMAND
- ls dist
before_script:
# Start X server with dummy video dirver
# Use this instead of Xvfb to have RANDR extension
# Otherwise there is a bug with Qt5.10.0
- if [ "$TRAVIS_OS_NAME" == "linux" ];
then
export DISPLAY=:99.0;
Xorg -noreset +extension GLX +extension RANDR +extension RENDER -logfile ./99.log -config ./ci/travis-xorg.conf :99 &
sleep 3;
fi
# First install any temporary pinned/additional requirements
- if [ -s "ci/requirements-pinned.txt" ];
then
pip install -r ci/requirements-pinned.txt;
fi
# Install optional dependencies for running test
- pip install --trusted-host www.silx.org --find-links http://www.silx.org/pub/wheelhouse/ pyopencl==$PYOPENCL_VERSION
# This installs PyQt and scipy if wheels are available
- pip install --pre -r requirements.txt
# Install built package
# Make sure silx does not come from cache or pypi
# At this point all install_requires dependencies MUST be installed
# as this is installing only from dist
- pip install --pre --find-links dist/ --no-cache-dir --no-index silx $PIP_INSTALL_EXTRA_ARGS
# Print Python info
- python ci/info_platform.py
- pip list
- if [ "$TRAVIS_OS_NAME" == "linux" ];
then
ldd $(python -c "import h5py;print(h5py.h5d.__file__)");
fi
- if [ "$TRAVIS_OS_NAME" == "osx" ];
then
pip install --upgrade pynput;
python ci/close_popup.py;
fi
script:
- echo "WITH_QT_TEST="$WITH_QT_TEST
- if [ "$TRAVIS_OS_NAME" == "osx" ];
then
export SILX_TEST_LOW_MEM=True;
fi
- python run_tests.py --installed -v
after_failure:
# Display result as base64, while it is not possible to expose files
- "for f in ./build/test-debug/*.png; do echo $f as base64; echo $( base64 $f) | fold -w 400; done"