-
Notifications
You must be signed in to change notification settings - Fork 32
/
.travis.yml
61 lines (54 loc) · 1.81 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
# try to get a tag for param.version
git:
depth: 300
language: python
# doesn't mean much as we install miniconda
python:
- "2.7"
#cache:
# directories:
# - $HOME/.cache/pip
matrix:
include:
- os: linux
dist: trusty
- os: osx
# python doesn't seem to work on osx images
language: generic
osx_image: xcode8.3
before_script:
- git fetch --unshallow --tags # try some more to get a tag for param.version
# copied from https://docs.travis-ci.com/user/gui-and-headless-browsers/
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
export DISPLAY=:99.0 && sh -e /etc/init.d/xvfb start && sleep 3;
fi
install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update conda
# Useful for debugging any issues with conda
- conda info -a
- conda env create --file environment.yml -n testenv
- source activate testenv
- python setup.py build_ext
- conda env export
script:
# no gui tests on osx
# some kind of tk/matplotlib problem on osx? not setting tkagg early enough?
# https://stackoverflow.com/questions/32019556/matplotlib-crashing-tkinter-application/34109240#34109240
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
export TOPO_SKIP_RUNTESTS_GUI_IF_NO_DISPLAY=1 && export DISPLAY=;
fi
# only run exhaustive tests for cron builds (travis web setting: once a week)
- if [[ "$TRAVIS_EVENT_TYPE" == "cron" ]]; then
./topographica -t all;
else
./topographica -t quick;
fi