-
Notifications
You must be signed in to change notification settings - Fork 145
/
.travis.yml
83 lines (79 loc) · 3.31 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
# Travis (https://travis-ci.org) configuration file
# CI MACOS
# -brew install xz
# --without xz ROOT gives:
# ---Incompatible library version: libCore.so requires version 8.0.0 or later, but liblzma.5.dylib provides version 6.0.0
# ---try to solve by https://github.com/Homebrew/legacy-homebrew/issues/42209 installing xz
# Theano flags were set accordingly to this issue: https://github.com/Theano/Theano/issues/3780
# -rvm get head (it is necessary to avoid error during source thisroot.sh:
# ----http://stackoverflow.com/questions/40105686/root-installation-on-mac-os-el-capitan-in-continuous-integration
# -El Capitan uses brew python, not system python. It is installed with the system biuld on travis. Thus change PyROOT link to the brew python.
sudo: required
services:
- docker
language: generic
matrix:
include:
- os: linux
env: REP_PYTHON_VERSION=2 THEANO_FLAGS='gcc.cxxflags="-march=corei7"'
- os: linux
env: REP_PYTHON_VERSION=3 THEANO_FLAGS='gcc.cxxflags="-march=corei7"'
- os: osx
env: PYTHON_VERSION=2.7
before_install:
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
brew update > /dev/null;
rvm get head;
brew install xz;
which python;
brew install homebrew/science/root;
virtualenv venv -p python${PYTHON_VERSION};
source venv/bin/activate;
echo 'source THISROOT.sh';
source $(brew --prefix root)/libexec/thisroot.sh;
otool -L $(brew --prefix root)/lib/root/libPyROOT.so;
sudo install_name_tool -change /System/Library/Frameworks/Python.framework/Versions/2.7/Python /usr/local/Frameworks/Python.framework/Versions/2.7/Python $(brew --prefix root)/lib/root/libPyROOT.so;
echo 'TRY IMPORT ROOT';
python -c 'import ROOT';
pip install pip -U;
pip install -r requirements.txt;
pip install rootpy root_numpy;
python -c 'import root_numpy';
mkdir -p $HOME/.matplotlib;
echo 'backend:TkAgg' > $HOME/.matplotlib/matplotlibrc;
else
source ci/install_rep_environment.sh $REP_PYTHON_VERSION;
conda list;
fi
# printing DEBUG information
- which python
- echo $LD_LIBRARY_PATH
- echo "{\"url\":\"$MN_URL\",\"token\":\"$MN_TOKEN\"}" > $HOME/.rep-matrixnet.config.json
install:
- pip install .
script:
# listing everything in howto folder recursively
- ls -alR ./howto/
# setting flag: don't proceed if one of commands fails.
- set -e
- mkdir -p ./.cache/rep
# testing matrixnet
- nosetests -v --detailed-errors --nocapture ./tests/m_test_*;
# testing all but notebooks
- nosetests -v --detailed-errors --nocapture ./tests/test_*;
# testing only notebooks
- if [[ $TRAVIS_OS_NAME != 'osx' ]]; then
nosetests -v --detailed-errors --nocapture --stop ./tests/z_test_*;
fi
# if on master and tests passed successfully, trigger rebuilding of docker image.
- if [[ "$TRAVIS_BRANCH" = "master" && "$TRAVIS_OS_NAME" != "osx" && "$REP_PYTHON_VERSION" = "2" ]] ; then make push-latest2 ; fi
# resetting flag
- set +e
notifications:
email: true
webhooks:
urls:
- https://webhooks.gitter.im/e/4eb609958a03b4bc1df5
on_success: always # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: always # options: [always|never|change] default: always