This repository has been archived by the owner on Sep 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 278
/
.travis.yml
107 lines (95 loc) · 4.34 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
sudo: false
language: cpp
osx_image: xcode6.4
os:
- osx
compiler:
- clang
env:
global:
- NUPICCORE = ${TRAVIS_BUILD_DIR}
- 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: true
# Successful builds are archived and uploaded to S3 for bamboo releases.
before_deploy:
- "PLATFORM='darwin'"
- cd $TRAVIS_BUILD_DIR
- ./ci/travis/before_deploy.sh
- cp $TRAVIS_BUILD_DIR/bindings/py/requirements.txt $TRAVIS_BUILD_DIR/bindings/py/dist/
- mkdir -p $TRAVIS_BUILD_DIR/bindings/py/dist/include/nupic
- cp ${TRAVIS_BUILD_DIR}/build/release/include/nupic/Version.hpp $TRAVIS_BUILD_DIR/bindings/py/dist/include/nupic
- mkdir -p $TRAVIS_BUILD_DIR/bindings/py/dist/bin
- cp ${TRAVIS_BUILD_DIR}/build/release/bin/py_region_test $TRAVIS_BUILD_DIR/bindings/py/dist/bin
- mkdir -p $TRAVIS_BUILD_DIR/release
- tar -zcvf $TRAVIS_BUILD_DIR/release/nupic_core-${TRAVIS_COMMIT}-${PLATFORM}64.tar.gz $TRAVIS_BUILD_DIR/bindings/py/dist
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 osx/clang
on:
branch: master
condition:
- "( ${TRAVIS_OS_NAME}--${CC} = 'osx--clang' )"
notifications:
email:
recipients:
- "discourse-nupic-developers@numenta.org"
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:
- ". ./ci/travis/before_install-osx.sh"
install:
- "mkdir -p $TRAVIS_BUILD_DIR/build/scripts"
- "cd $TRAVIS_BUILD_DIR/build/scripts"
- "mkdir -p $TRAVIS_BUILD_DIR/build/release"
- "cmake --version"
# Enable test coverage for travis-ci build
- "cmake $TRAVIS_BUILD_DIR -DNTA_COV_ENABLED=ON -DCMAKE_INSTALL_PREFIX=${TRAVIS_BUILD_DIR}/build/release -DPY_EXTENSIONS_DIR=$TRAVIS_BUILD_DIR/bindings/py/src/nupic/bindings"
# Configure bash such that a failure in any link in the pipe causes the whole pipe to fail
- "set -o pipefail"
- "VERBOSE=1 make|grep -v -F '\\-\\- Installing:'"
- "make install 2>&1|grep -v -F 'Installing:'"
- "cd $TRAVIS_BUILD_DIR"
- "python setup.py install --user"
script:
# Some tests (e.g., helloregion) expect this to be the current directory and
# this also matches current instructions in nupic.core/README.md
- "cd $TRAVIS_BUILD_DIR/build/release/bin"
# legacy binary tests
- "${TRAVIS_BUILD_DIR}/build/release/bin/connections_performance_test"
- "${TRAVIS_BUILD_DIR}/build/release/bin/cpp_region_test"
- "${TRAVIS_BUILD_DIR}/build/release/bin/py_region_test"
- "${TRAVIS_BUILD_DIR}/build/release/bin/helloregion"
- "${TRAVIS_BUILD_DIR}/build/release/bin/hello_sp_tp"
- "${TRAVIS_BUILD_DIR}/build/release/bin/prototest"
# unit tests
# TODO Why does it mkdir build/scripts/artifacts, but then points gtest_otput to build/artifacts?
- "mkdir -p $TRAVIS_BUILD_DIR/build/scripts/artifacts"
- "${TRAVIS_BUILD_DIR}/build/release/bin/unit_tests --gtest_output=xml:${TRAVIS_BUILD_DIR}/build/artifacts/unit_tests_report.xml"
# run python tests
- "py.test ${TRAVIS_BUILD_DIR}/bindings/py/tests"
# 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"