forked from numenta/nupic-legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
110 lines (96 loc) · 4.47 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
branches:
except:
- gh-pages
language: cpp
os:
- linux
- osx
compiler:
- clang
- gcc
env:
global:
- NUPIC=$TRAVIS_BUILD_DIR
- NTA=$HOME/nta/eng
- PATH=$TRAVIS_BUILD_DIR/python/bin:$PATH
matrix:
- PY_VER=2.7
- PY_VER=2.6
matrix:
# This excludes OSX builds from the build matrix for gcc and Python 2.6
exclude:
- os: osx
env: PY_VER=2.6
- os: osx
compiler: gcc
git:
submodules: false
notifications:
irc:
channels:
- "irc.freenode.net#nupic-hackers"
webhooks: http://issues.numenta.org:8081/travis
before_install:
# Get Darwin64 libs for OSX
- "if [ $TRAVIS_OS_NAME = 'osx' ]; then git clone https://github.com/numenta/nupic-darwin64.git; fi"
- "if [ $TRAVIS_OS_NAME = 'osx' ]; then (cd nupic-darwin64 && git reset --hard c2908602fbea5f832c7edfa251f490807b429cc3); fi"
- "if [ $TRAVIS_OS_NAME = 'osx' ]; then source nupic-darwin64/bin/activate; fi"
# Install cmake on OSX
- "if [ $TRAVIS_OS_NAME = 'osx' ]; then brew install cmake; fi"
# Install MySQL on OSX
- "if [ $TRAVIS_OS_NAME = 'osx' ]; then brew install mysql; fi"
- "if [ $TRAVIS_OS_NAME = 'osx' ]; then mysql.server start; fi"
# Necessary Linux prep work
- "if [ $TRAVIS_OS_NAME = 'linux' ]; then sudo add-apt-repository -y ppa:fkrull/deadsnakes; fi"
- "if [ $TRAVIS_OS_NAME = 'linux' ]; then sudo apt-get update; fi"
# Install virtualenv
- "if [ $TRAVIS_OS_NAME = 'linux' ]; then sudo apt-get install python$PY_VER python$PY_VER-dev python-virtualenv; fi"
- "if [ $TRAVIS_OS_NAME = 'linux' ]; then sudo ls -laFh /usr/lib/libpython$PY_VER.so; fi"
# Prefix env with our own python installation
- "if [ $TRAVIS_OS_NAME = 'linux' ]; then export PYTHONPATH=$PYTHONPATH:$NTA/lib/python$PY_VER/site-packages; fi"
# Execute virtualenv
- "if [ $TRAVIS_OS_NAME = 'linux' ]; then virtualenv --python=`which python$PY_VER` .; fi"
- "if [ $TRAVIS_OS_NAME = 'linux' ]; then source bin/activate; fi"
# Workaround for multiprocessing.Queue SemLock error from run_opf_bechmarks_test.
# See: https://github.com/travis-ci/travis-cookbooks/issues/155
- "if [ $TRAVIS_OS_NAME = 'linux' ]; then sudo rm -rf /dev/shm && sudo ln -s /run/shm /dev/shm; fi"
# Install NuPIC python dependencies
- "if [ $TRAVIS_OS_NAME = 'linux' ]; then pip install -q -r $NUPIC/external/common/requirements.txt; fi"
install:
- "mkdir -p $TRAVIS_BUILD_DIR/build/scripts"
- "cd $TRAVIS_BUILD_DIR/build/scripts"
# Verify cmake version
- "cmake --version"
# Verify python version
- "python --version"
# Build NuPIC
- "if [ $TRAVIS_OS_NAME = 'osx' ]; then cmake $NUPIC -DPROJECT_BUILD_RELEASE_DIR:STRING=$NTA; fi"
- "if [ $TRAVIS_OS_NAME = 'linux' ]; then PYTHON=`which python$PY_VER` cmake $NUPIC -DPYTHON_LIBRARY=/usr/lib/libpython$PY_VER.so -DPROJECT_BUILD_RELEASE_DIR:STRING=$NTA; fi"
- "make -j3"
- "cd"
script:
- "cd $TRAVIS_BUILD_DIR/build/scripts"
# legacy binary tests
- "make tests_pyhtm"
# actual unit tests
- "make tests_run_all"
- "cd"
# run all example files
# examples/bindings
- "python$PY_VER $NUPIC/examples/bindings/sparse_matrix_how_to.py"
# - "python $NUPIC/examples/bindings/svm_how_to.py" # tkinter missing in Travis build machine
# - "python $NUPIC/examples/bindings/temporal_pooler_how_to.py" # tkinter too
# examples/opf (run atleast 1 from each category)
- "python$PY_VER $NUPIC/examples/opf/bin/OpfRunExperiment.py $NUPIC/examples/opf/experiments/anomaly/spatial/2field_few_skewed/"
- "python$PY_VER $NUPIC/examples/opf/bin/OpfRunExperiment.py $NUPIC/examples/opf/experiments/anomaly/temporal/saw_200/"
- "python$PY_VER $NUPIC/examples/opf/bin/OpfRunExperiment.py $NUPIC/examples/opf/experiments/classification/category_TP_1/"
- "python$PY_VER $NUPIC/examples/opf/bin/OpfRunExperiment.py $NUPIC/examples/opf/experiments/missing_record/simple_0/"
- "python$PY_VER $NUPIC/examples/opf/bin/OpfRunExperiment.py $NUPIC/examples/opf/experiments/multistep/hotgym/"
- "python$PY_VER $NUPIC/examples/opf/bin/OpfRunExperiment.py $NUPIC/examples/opf/experiments/opfrunexperiment_test/simpleOPF/hotgym_1hr_agg/"
# opf/experiments/params - skip now
- "python$PY_VER $NUPIC/examples/opf/bin/OpfRunExperiment.py $NUPIC/examples/opf/experiments/spatial_classification/category_1/"
# examples/prediction
- "python$PY_VER $NUPIC/examples/prediction/RunExperiment.py $NUPIC/examples/prediction/experiments/dutyCycle/problem/"
# examples/tp
- "python$PY_VER $NUPIC/examples/tp/hello_tp.py"
- "python$PY_VER $NUPIC/examples/tp/tp_test.py"