-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy path.travis.yml
More file actions
166 lines (157 loc) · 5.32 KB
/
.travis.yml
File metadata and controls
166 lines (157 loc) · 5.32 KB
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
language: node_js
sudo: false
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test' ]
packages: [ 'libstdc++-5-dev' ]
install:
- node -v
- which node
- clang++ -v
- which clang++
- make ${BUILDTYPE}
# *Here we run tests*
# We prefer running tests in the 'before_script' section rather than 'script' to ensure fast failure.
# Be aware that if you use the 'script' section it will continue running all commands in the section even if one line fails.
# This is documented at https://docs.travis-ci.com/user/customizing-the-build#Breaking-the-Build
# We don't want this behavior because otherwise we might risk publishing builds when the tests did not pass.
# For this reason, we disable the 'script' section below, since we prefer using 'before_script'.
before_script:
- npm test
script:
# after successful tests, publish binaries if specified in commit message
- ./scripts/publish.sh --toolset=${TOOLSET:-} --debug=$([ "${BUILDTYPE}" == 'debug' ] && echo "true" || echo "false")
# the matrix allows you to specify different operating systems and environments to
# run your tests and build binaries
matrix:
include:
## ** Builds that are published **
# linux cfi build node v10/release
- os: linux
env: BUILDTYPE=release TOOLSET=cfi CXXFLAGS="-fsanitize=cfi -fvisibility=hidden" LDFLAGS="-fsanitize=cfi"
node_js: 10
# linux publishable node v12/release
- os: linux
env: BUILDTYPE=release
node_js: 12
# linux publishable node v10/release
- os: linux
env: BUILDTYPE=release
node_js: 10
# linux publishable node v10/debug
- os: linux
env: BUILDTYPE=debug
node_js: 10
# linux publishable node v12/release
- os: linux
env: BUILDTYPE=release
node_js: 12
# linux publishable node v12/debug
- os: linux
env: BUILDTYPE=debug
node_js: 12
# linux publishable node v13/release
- os: linux
env: BUILDTYPE=release
node_js: 13
# linux publishable node v13/debug
- os: linux
env: BUILDTYPE=debug
node_js: 13
# osx publishable node v10/release
- os: osx
osx_image: xcode9.3
env: BUILDTYPE=release
node_js: 10
# osx publishable node v12/release
- os: osx
osx_image: xcode9.3
env: BUILDTYPE=release
node_js: 12
# linux sanitizer build node v10/debug
- os: linux
env: BUILDTYPE=debug TOOLSET=asan
node_js: 10
sudo: required
# Overrides `install` to set up custom asan flags
install:
- make sanitize
# Overrides `before_script` (tests are already run in `make sanitize`)
before_script:
- true
# osx sanitizer build node v10/debug
- os: osx
env: BUILDTYPE=debug TOOLSET=asan
node_js: 10
sudo: required
# Overrides `install` to set up custom asan flags
install:
- make sanitize
# Overrides `before_script` (tests are already run in `make sanitize`)
before_script:
- true
## ** Builds that do not get published **
# g++ build (default builds all use clang++)
- os: linux
env: BUILDTYPE=debug CXX="g++-6" CC="gcc-6" LINK="g++-6" AR="ar" NM="nm"
node_js: 10
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libstdc++-6-dev
- g++-6
# Overrides `install` to avoid initializing clang toolchain
install:
- make ${BUILDTYPE}
# Overrides `script` to disable publishing
script:
- true
# Coverage build
- os: linux
env: BUILDTYPE=debug CXXFLAGS="--coverage" LDFLAGS="--coverage"
node_js: 10
# Overrides `script` to publish coverage data to codecov
script:
- export PATH=$(pwd)/mason_packages/.link/bin/:${PATH}
- which llvm-cov
- curl -S -f https://codecov.io/bash -o codecov
- chmod +x codecov
# Workaround until we can avoid problem after https://github.com/travis-ci/travis-build/pull/1263 lands
- PATH=$(echo "$PATH" | sed 's/.\/node_modules\/.bin://')
- ./codecov -x "llvm-cov gcov" -Z
# Clang format build
- os: linux
# can be generic since we don't need nodejs to run formatting
language: generic
env: CLANG_FORMAT
# Overrides `install` to avoid initializing clang toolchain
install:
# Run the clang-format script. Any code formatting changes
# will trigger the build to fail (idea here is to get us to pay attention
# and get in the habit of running these locally before committing)
- make format
# Overrides `before_script`, no need to run tests
before_script:
- true
# Overrides `script` to disable publishing
script:
- true
# Clang tidy build
- os: linux
env: CLANG_TIDY
node_js: 10
# Overrides `install` to avoid initializing clang toolchain
install:
# First run the clang-tidy target
# Any code formatting fixes automatically applied by clang-tidy
# will trigger the build to fail (idea here is to get us to pay attention
# and get in the habit of running these locally before committing)
- make tidy
# Overrides `before_script`, no need to run tests
before_script:
- true
# Overrides `script` to disable publishing
script:
- true