forked from Project-OSRM/node-osrm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
119 lines (106 loc) · 4.22 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
# We actually depend on this being the generic image
language: generic
git:
depth: 10
# don't re-build for tags so that [publish binary] is not re-run
# https://github.com/travis-ci/travis-ci/issues/1532
branches:
except:
- /^v[0-9]/
cache:
apt: true
ccache: true
notifications:
email: false
slack:
secure: Gnrl9VgCtWnBpN1UgLmE5TLnYR91X/bQQ3OavskN9vMXrDO5l8Aqx78u7pcE42hBYjLh5NaKyhQkbyPa4o5A+HvG1rj/OJyVvDAZwzktKn+O3VbqvT5Pqq/1ohHxVNZz4M2Ho5ROGhd+u1UhrAkANPM4/Xvd0gFiPTuCngeoZnE=
on_success: change
on_failure: change
# TODO: no core files on sudo:false machines until https://github.com/travis-ci/travis-ci/issues/3754 is resolved
sudo: false
matrix:
include:
# Linux
# LLVM APT servers switched off, commenting Clang builds out as they will always fail now
# http://lists.llvm.org/pipermail/llvm-foundation/2016-June/000025.html
# - os: linux
# compiler: ": clang-debug-node-v4-coverage"
# env: NODE="4" COVERAGE=true CC="clang-3.5" CXX="clang++-3.5" PUBLISHABLE=false
# addons:
# apt:
# sources: [ 'ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.5' ]
# packages: [ 'clang-3.5', 'llvm-3.5-dev' ]
- os: linux
compiler: ": gcc-release-node-v4"
env: NODE="4" TARGET=Release CC="gcc-4.8" CXX="g++-4.8" PUBLISHABLE=true
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test' ]
packages: [ 'g++-4.8' ]
- os: linux
compiler: ": gcc-debug-node-v4"
env: NODE="4" TARGET=Debug CC="gcc-4.8" CXX="g++-4.8" PUBLISHABLE=true
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test' ]
packages: [ 'g++-4.8' ]
# OS X
- os: osx
# https://docs.travis-ci.com/user/languages/objective-c/#Supported-OS-X-iOS-SDK-versions
osx_image: xcode7.3 # upgrades clang from 6 -> 7
compiler: clang
env: NODE="4" TARGET=Release PUBLISHABLE=true
- os: osx
osx_image: xcode7.3 # upgrades clang from 6 -> 7
compiler: clang
env: NODE="4" TARGET=Debug PUBLISHABLE=true
env:
global:
- CCACHE_TEMPDIR=/tmp/.ccache-temp
- CCACHE_COMPRESS=1
- JOBS=2
- secure: KitzGZjoDblX/3heajcvssGz0JnJ/k02dr2tu03ksUV+6MogC3RSQudqyKY57+f8VyZrcllN/UOlJ0Q/3iG38Oz8DljC+7RZxtkVmE1SFBoOezKCdhcvWM12G3uqPs7hhrRxuUgIh0C//YXEkulUrqa2H1Aj2xeen4E3FAqEoy0=
- secure: WLGmxl6VTVWhXGm6X83GYNYzPNsvTD+9usJOKM5YBLAdG7cnOBQBNiCCUKc9OZMMZVUr3ec2/iigakH5Y8Yc+U6AlWKzlORyqWLuk4nFuoedu62x6ocQkTkuOc7mHiYhKd21xTGMYauaZRS6kugv4xkpGES2UjI2T8cjZ+LN2jU=
before_install:
- scripts/validate_tag.sh
- export COVERAGE=${COVERAGE:-false}
- if [[ ${TARGET} == 'Debug' ]]; then export NPM_FLAGS="--debug"; else export NPM_FLAGS=""; fi;
- |
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
export PYTHONPATH=$(pwd)/mason_packages/.link/lib/python2.7/site-packages;
elif [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
sudo sysctl -w kern.sysv.shmmax=4294967296
sudo sysctl -w kern.sysv.shmall=1048576
sudo sysctl -w kern.sysv.shmseg=128
export PYTHONPATH=$(pwd)/mason_packages/.link/lib/python/site-packages;
brew install md5sha1sum;
fi
# Mac OS X does not have nvm installed
- source ./scripts/install_node.sh ${NODE}
install:
- if [[ ${COVERAGE} == true ]]; then
PYTHONUSERBASE=$(pwd)/mason_packages/.link pip install --user cpp-coveralls;
fi;
- |
if [[ ${TARGET} == 'Debug' ]]; then
export BUILD_TYPE=Debug && source ./bootstrap.sh
elif [[ ${COVERAGE} == true ]]; then
export BUILD_TYPE=Debug && source ./bootstrap.sh
export LDFLAGS="--coverage" && export CXXFLAGS="--coverage"
else
source ./bootstrap.sh
fi
- npm install --build-from-source ${NPM_FLAGS} --clang=1
before_script:
- ulimit -c unlimited -S
script:
- RESULT=0
- make test || RESULT=$?
- for i in $(find ./ -maxdepth 1 -name 'core*' -print); do gdb $(which node) $i -ex "thread apply all bt" -ex "set pagination 0" -batch; done;
- if [[ ${RESULT} != 0 ]]; then exit $RESULT; fi
- if [[ ${COVERAGE} == true ]]; then
./mason_packages/.link/bin/cpp-coveralls --gcov /usr/bin/llvm-cov-3.5 --exclude __nvm --exclude node_modules --exclude mason_packages --exclude tests --build-root build --gcov-options '\-lp' --exclude doc --exclude build/Release/obj/gen;
fi;
- if [[ ${PUBLISHABLE} == true ]]; then
./scripts/publish.sh;
fi;