forked from psychopy/psychopy
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
115 lines (97 loc) · 4.67 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
# 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: USE_ANACONDA=false DISPLAY=:99.0 AUDIODEV=null
- os: linux
python: 2.7
env: USE_ANACONDA=true DISPLAY=:99.0 AUDIODEV=null
- os: linux
python: 3.6
env: USE_ANACONDA=true DISPLAY=:99.0 AUDIODEV=null
allow_failures:
- os: linux
python: 3.6
env: USE_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 Xvfb on precise
# 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 [ $USE_ANACONDA != "true" ]; 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 [ $USE_ANACONDA == "true" ]; 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 [ $USE_ANACONDA == "true" ]; then conda update -q conda; fi
- if [ $USE_ANACONDA == "true" ]; then conda info -a; fi
- if [ $USE_ANACONDA == "true" ]; then ls -la ./conda/environment-$TRAVIS_PYTHON_VERSION.yml; fi
- if [ $USE_ANACONDA == "true" ]; then conda env create -n psychopy-conda -f ./conda/environment-$TRAVIS_PYTHON_VERSION.yml; fi
- if [ $USE_ANACONDA == "true" ]; then conda env list; fi
- if [ $USE_ANACONDA == "true" ]; then source activate psychopy-conda; 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