forked from numenta/nupic.core-legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
57 lines (49 loc) · 2.08 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
language: cpp
os:
- linux
- osx
compiler:
- clang
- gcc
matrix:
# This excludes OSX builds from the build matrix for gcc
exclude:
- os: osx
compiler: gcc
notifications:
irc:
channels:
- "irc.freenode.net#nupic-hackers"
webhooks:
- urls:
- http://issues.numenta.org:8081/travis
- https://webhooks.gitter.im/e/68f77bae61efa5c931f8
before_install:
# install gcc-4.8 for C++11 compatibility, #TODO remove when Travis has gcc>=4.8, (it's used for clang too, in coveralls)
- "if [ ${TRAVIS_OS_NAME:-'linux'} = 'linux' ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; sudo apt-get -qq update; sudo apt-get -qq install g++-4.8; alias gcc='gcc-4.8'; alias g++='g++-4.8'; fi"
- "if [ $CC = 'gcc' ]; then export CC='gcc-4.8'; export CXX='g++-4.8'; fi"
- "if [ $CC = 'clang' ]; then export CXX=clang++; fi"
# Install cpp-coveralls for reporting test coverage under only linux, see https://github.com/eddyxu/cpp-coveralls
- "if [ ${TRAVIS_OS_NAME:-'linux'} = 'linux' ]; then sudo pip install cpp-coveralls; fi"
install:
- "mkdir -p $TRAVIS_BUILD_DIR/build/scripts"
- "cd $TRAVIS_BUILD_DIR/build/scripts"
# Enable test coverage for travis-ci build
- "cmake $TRAVIS_BUILD_DIR/src -DNTA_COV_ENABLED=ON"
script:
- "cd $TRAVIS_BUILD_DIR/build/scripts"
- "make -j3"
# legacy binary tests
- "make tests_htm"
# unit tests
- "make tests_unit"
# output unit tests report
- "cd $TRAVIS_BUILD_DIR/build/artifacts/"
# install xsltproc only on linux, mac has pre-installed it
- "if [ ${TRAVIS_OS_NAME:-'linux'} = 'linux' ]; then sudo apt-get install xsltproc; fi"
# transform the JUnit-style xml report to html
- "xsltproc $TRAVIS_BUILD_DIR/doc/xunit.xslt unit_tests_report.xml > unit_tests_report.html"
after_success:
- "cd $TRAVIS_BUILD_DIR"
# Send test coverage report to http://coveralls.io under only linux
- "if [ ${TRAVIS_OS_NAME:-'linux'} = 'linux' ]; then coveralls --gcov /usr/bin/gcov-4.8 --exclude external --exclude doc --exclude src/test > /dev/null 2>/dev/stdout|grep -v 'gcno:version'|grep -v 'gcda:version'; fi"