forked from silx-kit/silx
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
114 lines (96 loc) · 2.89 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
language: python
git:
depth: 1
matrix:
include:
- python: 2.7
os: linux
env:
- BUILD_COMMAND=sdist
- WITH_QT_TEST=False
- python: 3.4
os: linux
env:
- BUILD_COMMAND=sdist
- WITH_QT_TEST=False
- python: 3.5
os: linux
env:
- BUILD_COMMAND=sdist
- WITH_QT_TEST=True
- language: generic
os: osx
env:
- BUILD_COMMAND=bdist_wheel
- WITH_QT_TEST=True
- PYTHON_VERSION=2
- language: generic
os: osx
env:
- BUILD_COMMAND=bdist_wheel
- WITH_QT_TEST=True
- PYTHON_VERSION=3
cache:
apt: true
addons:
apt:
packages:
- libhdf5-serial-1.8.4
- libhdf5-serial-dev
- libegl1-mesa # Required by Qt xcb platform plugin
- libboost-python-dev # for PyOpenCL
- opencl-headers
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
# 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 Virtual Framebuffer useful for GUI testing
# Doc: https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-xvfb-to-Run-Tests-That-Require-a-GUI
- if [ "$TRAVIS_OS_NAME" == "linux" ];
then
export DISPLAY=:99.0;
sh -e /etc/init.d/xvfb start;
sleep 3;
fi
script:
# Install optional dependencies for running test
- pip install --trusted-host www.silx.org --find-links http://www.silx.org/pub/wheelhouse/ pyopencl==2015.1
# 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
# 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
# Run the tests
- echo "WITH_QT_TEST="$WITH_QT_TEST
- if [ "$TRAVIS_OS_NAME" == "osx" ];
then
export SILX_TEST_LOW_MEM=True;
fi
- python run_tests.py -v