forked from psychopy/psychopy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
134 lines (111 loc) · 5.22 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
# vim ft=yaml
# travis-ci.org and coveralls definition for PsychoPy tests
dist: precise # the default (trusty) causing problem with SSL as of Aug 2017
sudo: true
language: python
matrix:
include:
- os: linux
python: "2.7_with_system_site_packages"
env: DISPLAY=:99.0 AUDIODEV=null
- os: linux
python: 2.7
env: ANACONDA=true WXPYTHON=3 OPENPYXL=2.4 DISPLAY=:99.0 AUDIODEV=null
- os: linux
python: 2.7
env: ANACONDA=true WXPYTHON=4 OPENPYXL=2.4 DISPLAY=:99.0 AUDIODEV=null
- os: linux
python: 2.7
env: ANACONDA=true WXPYTHON=3 OPENPYXL=2.5 DISPLAY=:99.0 AUDIODEV=null
- os: linux
python: 3.6
env: ANACONDA=true DISPLAY=:99.0 AUDIODEV=null
allow_failures:
- os: linux
python: 2.7
env: ANACONDA=true WXPYTHON=3 OPENPYXL=2.5 DISPLAY=:99.0 AUDIODEV=null
- os: linux
python: 2.7
env: ANACONDA=true WXPYTHON=4 OPENPYXL=2.4 DISPLAY=:99.0 AUDIODEV=null
- os: linux
python: 3.6
env: ANACONDA=true DISPLAY=:99.0 AUDIODEV=null
before_install:
# System setup
- travis_retry sudo apt-get update -qq
- travis_retry sudo apt-get install -qq lsb-release
- source /etc/lsb-release
- echo ${DISTRIB_CODENAME}
- wget -O- http://neuro.debian.net/lists/${DISTRIB_CODENAME}.us-nh.full | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list
- wget -q -O- http://neuro.debian.net/_static/neuro.debian.net.asc | sudo apt-key add -
- travis_retry sudo apt-get update -qq
- sudo apt-cache policy # What is actually available?
# This might come in handy once we switch to Trusty, as its Xvfb
# doesn't properly support the RANDR extension
# - travis_retry sudo apt-get install -qq xpra xserver-xorg-video-dummy
- travis_retry sudo apt-get install -qq xvfb xauth libgl1-mesa-dri libavbin0
- travis_retry sudo apt-get install -qq libportaudio2
- travis_retry sudo apt-get install -qq flac
- flac -version
# Locales
# - travis_retry sudo apt-get install -qq language-pack-en-base # English locales
- travis_retry sudo apt-get install -qq language-pack-ja-base # Japanese locale
# - sudo dpkg-reconfigure locales
# - locale -a # list available locales
- travis_retry sudo apt-get install -qq libasound2-dev alsa-utils alsa-oss
- sudo modprobe snd-dummy
- sudo lsmod
- if [ -z $ANACONDA ]; then
echo "Installing PsychoPy dependencies via apt...";
travis_retry sudo apt-get install -qq python-xlib python-pygame python-opengl;
travis_retry sudo apt-get install -qq python-numpy python-scipy python-matplotlib python-pandas;
travis_retry sudo apt-get install -qq python-yaml python-lxml python-configobj;
travis_retry sudo apt-get install -qq python-imaging python-mock;
travis_retry sudo apt-get install -qq python-qt4 python-wxgtk2.8;
travis_retry sudo apt-get install -qq python-pyo python-opencv;
travis_retry sudo apt-get install -qq python-mock;
echo "Installing PsychoPy dependencies via pip...";
travis_retry sudo pip install --upgrade -force-reinstall -qq pip;
travis_retry sudo pip install --upgrade -force-reinstall -qq -r requirements_travis.txt;
fi
- if [ -n "$ANACONDA" ]; then
echo "Installing Miniconda environment...";
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
bash miniconda.sh -b -p $HOME/miniconda;
export PATH="$HOME/miniconda/bin:$PATH";
hash -r;
conda config --set always_yes yes --set changeps1 no;
fi
- if [ -n "$ANACONDA" ]; then conda update -q conda; fi
- if [ -n "$ANACONDA" ]; then conda info -a; fi
- if [ -n "$ANACONDA" ]; then ls -la ./conda/environment-$TRAVIS_PYTHON_VERSION.yml; fi
- if [ -n "$ANACONDA" ]; then conda env create -n psychopy-conda -f ./conda/environment-$TRAVIS_PYTHON_VERSION.yml; fi
- if [ -n "$ANACONDA" ]; then conda env list; fi
- if [ -n "$ANACONDA" ]; then source activate psychopy-conda; fi
- if [ -n "$ANACONDA" ]; then if [ -n "$WXPYTHON" ]; then conda install wxpython=$WXPYTHON; fi; fi
- if [ -n "$ANACONDA" ]; then if [ -n "$OPENPYXL" ]; then conda install openpyxl=$OPENPYXL; fi; 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
- python setup.py install
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
# 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