forked from psychopy/psychopy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
106 lines (85 loc) · 3.66 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
# vim ft=yaml
# travis-ci.org and coveralls definition for PsychoPy tests
dist: trusty # trusty is giving an error on bitsShaders test (glReadpixels()?)
sudo: true
language: python
matrix:
include:
# - os: linux
# python: "2.7_with_system_site_packages"
# env: DISPLAY=:99.0 AUDIODEV=null
- os: linux
env: CONDA=true PYTHON_VERSION=2.7 WXPYTHON=3 OPENPYXL=2.4 DISPLAY=:99.0 AUDIODEV=null
- os: linux
env: CONDA=true PYTHON_VERSION=2.7 WXPYTHON=4 OPENPYXL=2.4 DISPLAY=:99.0 AUDIODEV=null
- os: linux
env: CONDA=true PYTHON_VERSION=2.7 WXPYTHON=3 OPENPYXL=2.5 DISPLAY=:99.0 AUDIODEV=null
- os: linux
env: CONDA=true PYTHON_VERSION=3.6 DISPLAY=:99.0 AUDIODEV=null
- os: linux
env: CONDA=true PYTHON_VERSION=3.7 DISPLAY=:99.0 AUDIODEV=null
# allow_failures:
# - python: "2.7_with_system_site_packages"
before_install:
- pwd
- ./travis/00_set_up_packaging_system.sh
- ./travis/10_install_system_dependencies.sh
# Install & activate conda environment, if requested; otherwise,
# install system Python dependencies.
- |
if [ -n "$CONDA" ]; then
./travis/20_install_miniconda_python.sh
source ~/miniconda/etc/profile.d/conda.sh # Initialize shell.
conda activate psychopy-conda
else
./travis/20_install_system_python.sh
fi
- echo $PATH
- which python
- python --version
- python -c 'import pyglet; print(pyglet.version)'
- python -c 'import matplotlib; print(matplotlib.__version__)'
- python -c 'import PIL; print(PIL.__version__)'
- python -c 'import wx; print(wx.__version__)'
- python -c 'import openpyxl; print(openpyxl.__version__)'
- python -c 'import tables; print(tables.__version__)'
install:
- python setup.py build
# Build & install sdist.
- python setup.py sdist
- pip install --no-deps dist/PsychoPy-*.tar.gz
- pip uninstall --yes psychopy
# Build & install wheel.
- python setup.py bdist_wheel
- pip install --no-deps dist/PsychoPy-*.whl
# Test entry point.
- psychopy --version
- pip uninstall --yes psychopy
- rm -rf build/ dist/
before_script:
- |
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 1024x768x24 -ac +extension GLX +extension RANDR +render -noreset
fi
# To enable core.rush() functionality, we need to set capabilities on the Python
# executable. However, setcap'd binaries ignore LD_LIBRARY_PATH; this will
# break conda Python. The solution is to add the conda libraries to the "global"
# library search paths in /etc/ld.so.conf.d, and update the caches by calling
# ldconfig. Then, the capabilities can be set using setcap. Note that `python`
# in a conda env is merely a symlink to the actual binary; therefore, setcap
# will refuse work on it. Solution is to find find the "real"
# path to the Python binary by resolving the symlink via `os.path.realpath()`.
- echo $HOME/miniconda/envs/psychopy-conda/lib | sudo tee /etc/ld.so.conf.d/psychopy-conda-lib.conf
- sudo ldconfig
- export PYTHON_EXECUTABLE=`python -c "import os; import sys; print(os.path.realpath(sys.executable))"`
- sudo setcap cap_sys_nice+ep ${PYTHON_EXECUTABLE}
- getcap ${PYTHON_EXECUTABLE}
# This might come in handy once we switch to Trusty
# - if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
# xpra --xvfb="Xorg +extension GLX +extension RANDR +extension RENDER -config `pwd`/dummy_xorg.conf -logfile ${HOME}/.xpra/xorg.log" start :99;
# fi;
script:
- pytest --cov-config .travis_coveragerc --cov=psychopy -v -s -m "not needs_sound" psychopy
after_success:
- coveralls
- codecov