forked from CartoDB/node-mapnik
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
91 lines (80 loc) · 3.43 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
language: node_js
sudo: false
# build options and AWS keys for publishing binaries
# note: you'll need to generate your own keys for publishing a separate project
env:
global:
- secure: "cU7cg4lcCKaFh62Rf2cydV1pBENn4waQDe8pfPhdQldFOOxc5plFEpOKhF//2VVDuF6KkXR9Z/OloGIMCjQDTrJRB1gQatRvjC8YOnjvvP2lt0NrdYDO7rsf/JM/W5mcsI/ToRMpUqiKsMOnZ/Ut8cjLVrqVFRIMaAsk5qdDSvQ="
- secure: "Zyv3hCamMjwsZLw6bSaJIlPR9kPZ5a9DpU561ovOZr8RboP3BQGQxEXNRgFTi1rFa3bY8WAYPnuLRF5qVylogWRugj/L+PkAZ/qnDLy+o0xaLXxZIiUQmMhvhoBkGIIBpb52d8IKpuiLUoWNTkwGR/f3lLQyL0M2IH4GoKAE5jU="
# enable c++11/14 builds
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test' ]
packages: [ 'libstdc++-5-dev' ]
install:
# set up the environment by installing mason and clang++
- ./scripts/setup.sh --config local.env
# put mason and clang++ on PATH
- source local.env
- node -v
- which node
- clang++ -v
- which clang++
- make ${BUILDTYPE}
# Build should be standalone now, so remove mason deps
- rm -rf mason_packages
# run tests
# we use before_script rather than script to ensure fast failure (the script section continues even after an error)
# https://docs.travis-ci.com/user/customizing-the-build#Breaking-the-Build
before_script:
- source scripts/postgis/setup_and_run.sh
- npm test
# after successful tests, publish binaries if specified in commit message (with and without symbols)
# NOTE: RELEASE includes symbols, so we publish first as debug, then strip the symbols of the libraries and republish as debug
- ./scripts/publish.sh --debug="true"
- if [[ "${BUILDTYPE}" == 'release' ]]; then make strip && ./scripts/publish.sh --debug="false"; fi;
# override script default (npm test) to do nothing (we test in before_script)
script:
- true
# the matrix allows you to specify different operating systems and environments to
# run your tests and build binaries
# Using BUILDTYPE=release will publish both debug and release (with and without symbols)
matrix:
include:
##### linux node v10
- os: linux
env: BUILDTYPE=release
node_js: 10
##### linux node v12
- os: linux
env: BUILDTYPE=release
node_js: 12
##### linux node 10 - Sanitizer build
- os: linux
env: BUILDTYPE=debug TOOLSET=-asan
node_js: 10
# Overrides `install` to set up custom asan flags
install:
- ./scripts/setup.sh --config local.env
# put mason and clang++ on PATH
- source local.env
# Note: to build without stopping on errors remove the -fno-sanitize-recover=all flag
# You might want to do this if there are multiple errors and you want to see them all before fixing
- export CXXFLAGS="${MASON_SANITIZE_CXXFLAGS} -fno-sanitize-recover=all"
- export LDFLAGS="${MASON_SANITIZE_LDFLAGS}"
- make ${BUILDTYPE}
# Overrides `script` to disable asan LD_PRELOAD before publishing
before_script:
- export LD_PRELOAD=${MASON_LLVM_RT_PRELOAD}
# TODO: re-enable detect_leaks=0 once we can build and test against an asan sanitized libc++
- export ASAN_OPTIONS=fast_unwind_on_malloc=0:detect_leaks=0:${ASAN_OPTIONS}
- source scripts/postgis/setup_and_run.sh
- npm test
- unset LD_PRELOAD
# after successful tests, publish binaries if specified in commit message
- ./scripts/publish.sh --toolset="-asan" --debug="true"
##### osx publishable node v10
- os: osx
osx_image: xcode8.2
env: BUILDTYPE=release
node_js: 10