/
.travis.yml
107 lines (100 loc) · 4.37 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
language: cpp
matrix:
include:
# Coverage
- os: osx
compiler: clang
env: NODE_VERSION="1.2.0" COVERAGE=true # node abi 43
# Linux
- os: linux
compiler: clang
env: NODE_VERSION="1.2.0" # node abi 43
- os: linux
compiler: clang
env: NODE_VERSION="1.0.4" # node abi 42
- os: linux
compiler: clang
env: NODE_VERSION="0.12.0" # node abi 14
- os: linux
compiler: clang
env: NODE_VERSION="0.11.14" # node abi 14, but versioned on major.minor.patch since it is an unstable series
- os: linux
compiler: clang
env: NODE_VERSION="0.10.36" # node abi 11
# OS X
- os: osx
compiler: clang
env: NODE_VERSION="1.2.0" # node abi 43
- os: osx
compiler: clang
env: NODE_VERSION="1.0.4" # node abi 42
- os: osx
compiler: clang
env: NODE_VERSION="0.12.0" # node abi 14
- os: osx
compiler: clang
env: NODE_VERSION="0.11.14" # node abi 14, but versioned on major.minor.patch since it is an unstable series
- os: osx
compiler: clang
env: NODE_VERSION="0.10.36" # node abi 11
env:
global:
- JOBS: "8"
- MAPNIK_GIT: v3.0.0-rc1-608-g81a3be6
- secure: F42vcZEgWgCMDvQXlmyYmWwFo86fUjlJbsvXEwyliaMfasjCNsbmeILU61aScn8daiCGD+vRUaRlmv+XxUSS2G8FaoI8ZjwgMo2guMwthAQJ1ohTvf4bZI0JqVYKnnZpzhGPv2zD0DTdt31l30qn2GZnnGrF4yFpPU1HW2HcMuE=
- secure: WRWrn3KjCaevRo2htdvn26euALTZNCDtcSlQvtH6Bc7yLdhlH5apj+qSuWqlN59f1cprFH+5aQ2zmBkVmAV2DT4IbsfszMIR6k6EetuY6VOugo/qsPW2x/MQbpFgjCbl95bYty4eUH9Bcf70Pz/S+XVewABXHWikJiLUiZBbLyE=
before_install:
- export COVERAGE=${COVERAGE:-false}
- platform=$(uname -s | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/")
# upgrade libstdc++ to support C++11
- if [[ ${platform} == 'linux' ]]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test;sudo apt-get update -y;sudo apt-get install -y libstdc++6; fi;
- if [[ ${platform} == 'darwin' ]]; then xcrun --sdk macosx --show-sdk-version; fi;
# check if tag exists and matches package.json
- scripts/validate_tag.sh
- COMMIT_MESSAGE=$(git show -s --format=%B $TRAVIS_COMMIT | tr -d '\n')
# put node-pre-gyp on path
- export PATH=./node_modules/.bin/:$PATH
# here we set up the node version on the fly based on the matrix value.
# This is done manually so that it is easy to flip the 'language' to
# objective-c in another branch (to run the same travis.yml on OS X)
- git clone https://github.com/creationix/nvm.git ../.nvm
- source ../.nvm/nvm.sh
- nvm install $NODE_VERSION
- nvm use $NODE_VERSION
- node --version
- npm --version
- PUBLISH_BINARY=false
- REPUBLISH_BINARY=false
- if [[ ${COVERAGE} == true ]]; then
brew update;
brew install pyenv;
eval "$(pyenv init -)";
pyenv install 2.7.6;
pyenv global 2.7.6;
pyenv rehash;
pip install cpp-coveralls;
pyenv rehash;
fi;
install:
- if [[ "${CXX}" =~ "g++" ]]; then export JOBS=2; fi;
- if [[ ${COVERAGE} == false ]];
then
if [[ ${COMMIT_MESSAGE} =~ "[test binary]" ]];
then npm install --fallback-to-build=false;
else ./scripts/build_against_sdk.sh && rm -rf sdk;
fi;
else ./scripts/build_against_sdk.sh --coverage=true;
fi;
- npm test
before_script:
- if [[ ${COMMIT_MESSAGE} =~ "[publish binary]" ]] && [[ ${CXX} =~ "clang" ]] && [[ ${COVERAGE} == false ]]; then PUBLISH_BINARY=true; fi;
- if [[ ${COMMIT_MESSAGE} =~ "[republish binary]" ]] && [[ ${CXX} =~ "clang" ]] && [[ ${COVERAGE} == false ]]; then REPUBLISH_BINARY=true; fi;
script:
- node-pre-gyp package testpackage
- if [[ ${COVERAGE} == true ]]; then cpp-coveralls --exclude node_modules --exclude tests --build-root build --gcov-options '\-lp' --exclude tools --exclude docs --exclude sdk --exclude build/Release/obj/gen --exclude src/mapnik_featureset.hpp --exclude src/mapnik_logger.hpp --exclude src/mapnik_image_view.hpp --exclude src/mapnik_geometry.hpp; fi;
- if [[ ${PUBLISH_BINARY} == true ]]; then node-pre-gyp publish; fi;
- if [[ ${REPUBLISH_BINARY} == true ]]; then node-pre-gyp unpublish && node-pre-gyp publish; fi;
- if [[ ${PUBLISH_BINARY} == true ]] || [[ ${REPUBLISH_BINARY} == true ]]; then node-pre-gyp info; rm -rf {build,lib/binding}; node-pre-gyp install; npm test; fi
# always killed by travis
#- nice -n 19 node --expose-gc bench/error/test_vt_abort.js
- nice -n 19 node --expose-gc bench/error/test_vt_abort2.js