forked from numenta/nupic.core-legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
87 lines (75 loc) · 3.16 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
language: cpp
os:
- linux
- osx
compiler:
- clang
- gcc
env:
global:
- PLATFORM=${TRAVIS_OS_NAME}
- NUPIC_DEPLOYMENT_BUILD=true
matrix:
# This excludes OSX builds from the build matrix for gcc
exclude:
- os: osx
compiler: gcc
# Successful builds are archived and uploaded to S3 for nupic builds.
before_deploy:
- "if [ ${TRAVIS_OS_NAME:-'osx'} = 'osx' ]; then PLATFORM='darwin'; fi"
- cd $TRAVIS_BUILD_DIR/build/scripts
- make package
- mkdir -p $TRAVIS_BUILD_DIR/release
- mv nupic_core-${TRAVIS_COMMIT}-${PLATFORM}64.tar.gz $TRAVIS_BUILD_DIR/release/.
deploy:
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 linux/gcc and osx/clang
on:
branch: master
condition:
- "( ${TRAVIS_OS_NAME}--${CC} = 'linux--gcc-4.8' ) || ( ${TRAVIS_OS_NAME}--${CC} = 'linux--gcc' ) || ( ${TRAVIS_OS_NAME}--${CC} = 'osx--clang' )"
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_cpp_region"
# 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"