forked from numenta/nupic.core-legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
141 lines (131 loc) · 5.66 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
135
136
137
138
139
140
141
language: python
python:
- 2.7 #TODO change to 3.x later
matrix:
include:
- os: linux
compiler: gcc
dist: xenial
# update required packages from Travis setup
# https://docs.travis-ci.com/user/languages/cpp/
addons:
apt:
update: true
sources:
- ubuntu-toolchain-r-test
packages:
- build-essential
- g++-8
- cmake
- cmake-data
- xsltproc #only for doc transform to html , can be removed
- valgrind
env:
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
- PLATFORM="linux"
- PYTHONPATH="$PYTHONPATH:$HOME/.local/lib/python2.7/site-packages/"
# ## OSX builds take very long to start on OSX
# # moved to CircleCI for OSX
# - os: osx
# osx_image: xcode8.3 #default
# compiler: clang
# env:
# - MATRIX_EVAL="CC=clang && CXX=clang++"
# - PLATFORM="darwin"
# - PATH="$HOME/Library/Python/2.7/bin:$PATH"
# - PYTHONPATH="$HOME/Library/Python/2.7/lib/python/site-packages:$PYTHONPATH"
env:
global:
- NUPICCORE = ${TRAVIS_BUILD_DIR}
- BINARY_DIR = ${TRAVIS_BUILD_DIR}/build/scripts
- PATH=${TRAVIS_BUILD_DIR}/python/bin:$PATH
- PLATFORM=${TRAVIS_OS_NAME}
- ARCHFLAGS="-arch x86_64"
# # AWS keys are for manual uploads of wheel to S3.
# - AWS_ACCESS_KEY_ID=AKIAIGHYSEHV3WFKOWNQ
# # AWS_SECRET_ACCESS_KEY encrypted below
# - secure: "Ixm9TYZAZbCQicUTIZTY7XKNK82WF+f1jsaGtIxnGQmn0LKhKBjQnsZmhzQ7LDQeLUjRY3wM6xrX3YdP5T7WWiiqBiNCRz8oFxl/fBSm7LyuNo2CEGD9rsG6ZAY/sKKYNX5TuG78giJXwYZpq4LbVwy3W5ZlC626H7iXLQ6xDxw="
virtualenv:
system_site_packages: false
# Successful builds are archived and uploaded to S3 for bamboo releases.
before_deploy:
- cd $TRAVIS_BUILD_DIR
- ./ci/travis/before_deploy.sh
- tar -zcvf $TRAVIS_BUILD_DIR/build/Release/nupic_core-${TRAVIS_COMMIT}-${PLATFORM}64.tar.gz $BINARY_DIR/dist
deploy:
## AWS S3
# provider: s3
# access_key_id: AKIAIGHYSEHV3WFKOWNQ
# secret_access_key:
# secure: YhyY/6r2LNya8OZEmVOj+fv0lY5bBPqvy8MnsdLlptXa2uqwvezkCMNKiQ+wA+tOu+BS7VRRp86DhUqCpTZ3jUM2Mwdhud/Smq7D2X8vtZBiTVcOKfQcaypDE6Zu9Zp0SjMOSf6yiq6Ruu7D5QtZ4rtaq+5uPlvbgUXRZoZm0Po=
# bucket: artifacts.numenta.org
# region: us-west-2
# local-dir: "$TRAVIS_BUILD_DIR/release"
# upload-dir: "numenta/nupic.core"
# skip_cleanup: true
# # Deploying on master branch from osx/clang
# on:
# branch: master
# condition:
# - "( ${TRAVIS_OS_NAME}--${CC} = 'osx--clang' )"
## Github releases
provider: releases
api_key:
secure: "HyRy03LIiUriPFW3HPmO+rRqmL1uxfsPLj6fqMykMq/Kmy478ROW/uOdNj42OEhsb6GwLngdjcHJtEzMGevnlNbWLLbTCuT2ykebysSt/oIKb/zAc/jYUI3OKuVWVEYFHlZa6fvkWZHKtWCcwa/jeF6bJFuPKkc3c3842aaW1SdEJG6osLGhJM+JtO1zD8+Z6RwL6T1Xbj+RYP/L28mejbphKxYL34bfLYse1lQ6/cFHzw8SdbvkDxWW+MRFHw8Ta8QiiV/7E83Z6N0+IRNi0s//3Affmkcs25modB4Auy8nrkUI4LQQr0NcUQZdo1RrylX9MH1B5KHs1hyNJvhRFiQlSBvXv0ezq6F5N8wamnBX12/2FDFI1nWl05hofQ7X07aWyQLu5v7Q34xX/pW5lca1G3H14auye8gSzC80692fOyId1F4QwcDIkeWiQwAMgE1qSifgTD3dEGJeDbAOPLd7I/fskxUjIvpEWR6dM3IKzMzr1dFilImhdvVsEEeROldpE0JleZFrv39NyMWTx6sGo9MLrtep+5/iRz1T0zKLfQjwUnAm/LW66g9vQ+lnhL9ktElnitnvaj1x5auAIsPNVdfagdwvGdeuZ65uJGtgEVAjOjspCDeYu9ztqPSZ3Hj3SAyELJkuu/RFScLOQayazg03O+zsvhDTtw8xfdo="
file: "$TRAVIS_BUILD_DIR/release/nupic_core-${TRAVIS_COMMIT}-${PLATFORM}64.tar.gz"
skip_cleanup: true
on:
tags: true
branch: master
repo: htm-community/nupic.cpp
notifications:
# email:
# recipients:
# - "[email protected]"
# on_success: never
# on_failure: change
irc:
channels:
- "irc.freenode.net#nupic-hackers"
# webhooks:
# - urls:
# - https://webhooks.gitter.im/e/68f77bae61efa5c931f8
# - https://api.keen.io/3.0/projects/5555161e2fd4b1326f14444a/events/travis-webhooks?api_key=a2e613bbb19b9b1f71a5543b7b677563551b4c3fe98534269546ff666ae453f82505791772faefc48682ee882ac7e99d2c3bfae7c7c19db7b5e7bbda34039119e4b42f5bf41bcea62d4ea9731db4a455141be7d5e8c715cb06366922eae0358e84abc2704ce16bb77b01fec3476cbac6
before_install:
- eval "${MATRIX_EVAL}"
- export CC
- export CXX
- $CXX --version
- echo "Installing pip, setuptools, and wheel"
- pip install --upgrade pip setuptools wheel || exit
install:
# Prepare directories
- mkdir -p "$TRAVIS_BUILD_DIR/build/scripts"
- cd "$TRAVIS_BUILD_DIR/build/scripts"
- mkdir -p "$TRAVIS_BUILD_DIR/build/Release"
- cmake --version
- echo "Configuring..."
# Builds nupic_code library and python2.7 interface. Enable test coverage for travis-ci build
- cmake "$TRAVIS_BUILD_DIR" -DCMAKE_BUILD_TYPE=Release
- set -o pipefail
- echo "Make & Install "
- VERBOSE=0 make |grep -v -F '\\-\\- Installing:'
- make install 2>&1|grep -v -F 'Installing:'
- echo "Installing Python bindings"
- python $TRAVIS_BUILD_DIR/setup.py install
script:
# Some tests (e.g., helloregion) expect this to be the current directory and
# this also matches current instructions in nupic.core/README.md
# unit tests
- "cd $TRAVIS_BUILD_DIR/build/Release/bin"
- "${TRAVIS_BUILD_DIR}/build/Release/bin/unit_tests --gtest_output=xml:${TRAVIS_BUILD_DIR}/build/artifacts/unit_tests_report.xml"
# run python tests
- cd ${TRAVIS_BUILD_DIR}
- "python setup.py test"
# run memory leak tests with valgrind
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${TRAVIS_BUILD_DIR}/build/Release/lib
- valgrind --leak-check=full --show-leak-kinds=all --error-exitcode=3 ${TRAVIS_BUILD_DIR}/build/Release/bin/benchmark_hotgym 5 || exit 1
# output unit tests report
- "cd $TRAVIS_BUILD_DIR/build/artifacts/"
# transform the JUnit-style xml report to html
- "xsltproc $TRAVIS_BUILD_DIR/docs/xunit.xslt unit_tests_report.xml > unit_tests_report.html"