forked from htm-community/htm.core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
118 lines (107 loc) · 4.43 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
language: python
python:
- 3.7
matrix:
include:
- os: linux
compiler: gcc
dist: bionic
# update required packages from Travis setup
# https://docs.travis-ci.com/user/languages/cpp/
addons:
apt:
update: false
# 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/python3.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}
- PATH=${TRAVIS_BUILD_DIR}/python/bin:$PATH
- PLATFORM=${TRAVIS_OS_NAME}
- ARCHFLAGS="-arch x86_64"
- BUNDLE_NAME="htm_core-${TRAVIS_COMMIT}-${PLATFORM}64"
- GH_RELEASE_AUTH="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="
virtualenv:
system_site_packages: false
# Successful merge/builds of the master are archived and released to pypi.
before_deploy:
- cd $TRAVIS_BUILD_DIR/build/scripts
- python $TRAVIS_BUILD_DIR/setup.py bdist_wheel
- echo "Generating binary release:"
- make package
- echo "Release: ${BUNDLE_NAME}"
deploy:
## Github releases
provider: releases
api_key:
secure: "$GH_RELEASE_AUTH"
file: "$TRAVIS_BUILD_DIR/build/scripts/*.tar.gz"
skip_cleanup: true
on:
tags: true #GH requires tagged release
branch: master
repo: htm-community/htm.core
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:
- cmake --version
# Builds htm_code library and python interface.
- cd "$TRAVIS_BUILD_DIR"
- python setup.py install
script:
# Some tests (e.g., helloregion) expect this to be the current directory and
# this also matches current instructions in htm.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 bindings tests
- echo "Python bindings tests"
- cd ${TRAVIS_BUILD_DIR}
- "python setup.py test"
# run memory leak tests with valgrind
- echo "Memory leak detection 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"