forked from numenta/nupic.core-legacy
-
Notifications
You must be signed in to change notification settings - Fork 75
/
.travis.yml
121 lines (105 loc) · 5.55 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
language: python
python:
- 3.7
branches:
only:
- master
- /^v.*\..*\..*$/ #regexp for tags "v*.*.*", eg v2.0.1
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
- wget # for downloading artifacts
env:
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
- PLATFORM="linux"
- PYTHONPATH="$PYTHONPATH:$HOME/.local/lib/python3.7/site-packages/"
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"
- secure: "CqicQmoGFaYb3g8KevEQAGC9sV7b7mruh/w3Sgf6xLaEVo6G7vs9Y8iy/g5PbuuREXWpj/xIRi0ao3GniG9R47XU7y7NurfBHv/ret8+wztVlM0viPBZDT8VOVyOsVs+v56QOYAwjr64IHlx3hdSrayLegtoocev0QUzSfvGgsFIdpwWHIU6bFmDdq4FS+8M+NEdi/sqEFTjgqliZzw25tVCN+n3BfCHzUEnzq/fH0v08xG4t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9+Ij+Z9L9gNl2XZwkGmz0S7kxae0WFTBppaBtHarvfl4jKlFb5XpnDpDa9G0mEsGQgUWOa+HeaC8C6EAP8bx3xxJJ43GAd4xY=" # Appveyor CI API token for fetching artifacts
- TOKEN_CIRCLECI:
secure: "YJNMoB6pXJCa8z2dNIvnggogE0Tf0rTxwoVEP6kSMd8jfn694k3RpuS1KtDhyAN42TYuBp0HEpAp2tHVJN8EsZJnVLC5vwYolnx6VfNQU8nw99eG4V6TTwKVeZXP5MJLJcyAS6DamNPXQb2q0U/OPzKfMQ/sDN7w+1M5+mIl6X9D+nJcKtHZlXzC6qagvx1uahgqF6/jTxJzLMrT2+W2EgjW5FV8PgxlAR0UO+YHGIX1yOZXsNPeFRuLrPfZ4k4SeyxgBJu8wqSgHPeog2xTU7KNT+D+vn8eNRcR+f+/SsFFj0rwQCXObAhc0xyQWb5n8NW2NlEC14L6XnSPPWPNJ8w9R30cwada/ZJeVECtk3TUUS2HII5qw1PCGC3JCi+WN5jHLRRT7eW8pTXPxY94pqVxBTVircRSg0r4CP3W1VcUuB7Bv+9QdRjMcO6gB29omeHL9InxlHfE1f/yfEWLCcMJKwsA2PyUJU3VxmV+hpFuuMTInFiPevgPeiC6TByKInz9bZyij0DTe9K+YVCnFQ7N32HeaXdngc/mGqKJdOAc8iBozjnkdzp3nMuw591XSHKcNmWwfxs3z8ifrc79m7GUYlpf+2+ZOtriDj6uUCfeR9rpnVIZpplMT4EAtSFmaNb8G8N1shrBS2FA51e5wd0xhYHwDJvqwRV4gcl+Sos=" # CircleCI API token for fetching artifacts
virtualenv:
system_site_packages: false
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:
# run c++ & python bindings tests
- echo "C++ & Python 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"
# Successful merge/builds of the master are archived and released to pypi.
before_deploy:
- pip install requests twine --upgrade --user
- echo "Generating binary release:"
- echo " Build the Wheel"
- cd $TRAVIS_BUILD_DIR/
- python ./setup.py bdist_wheel
- cd $TRAVIS_BUILD_DIR/build/scripts
- echo " Build the GitHub Package"
- make package
- cd $TRAVIS_BUILD_DIR/
deploy:
## Github releases
# API: https://docs.travis-ci.com/user/deployment/releases/
provider: script
script: Bash ci/deploy.sh $TRAVIS_TAG
skip_cleanup: true
overwrite: 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