99 packages : [ 'libstdc++-4.9-dev' ]
1010
1111install :
12- # set up the environment by installing mason and clang++
13- - ./scripts/setup.sh --config local.env
14- # put mason and clang++ on PATH
15- - source local.env
1612 - node -v
1713 - which node
1814 - clang++ -v
@@ -27,70 +23,70 @@ install:
2723# For this reason, we disable the 'script' section below, since we prefer using 'before_script'.
2824before_script :
2925 - npm test
30- # after successful tests, publish binaries if specified in commit message
31- - ./scripts/publish.sh --toolset=${TOOLSET:-} --debug=$([ "${BUILDTYPE}" == 'debug' ] && echo "true" || echo "false")
3226
33- # We set 'script' here to an empty array to prevent this section from automatically running 'npm test'
34- # The reason we do this is mentioned above in the comment about the 'before_script' stage.
35- # For reference, the default travis behavior which we override comes from https://github.com/travis-ci/travis-build/blob/e5a45cbf49e0d9e27398e76e5f25dd7706feb6aa/lib/travis/build/script/node_js.rb#L62-L69.
3627script :
28+ # after successful tests, publish binaries if specified in commit message
29+ - ./scripts/publish.sh --toolset=${TOOLSET:-} --debug=$([ "${BUILDTYPE}" == 'debug' ] && echo "true" || echo "false")
3730
3831# the matrix allows you to specify different operating systems and environments to
3932# run your tests and build binaries
4033matrix :
4134 include :
42- # linux publishable node v8
35+
36+ # # ** Builds that are published **
37+
38+ # linux cfi build node v6/release
4339 - os : linux
44- env : BUILDTYPE=release
45- node_js : 8
46- # linux publishable node v8/debug
40+ env : BUILDTYPE=release TOOLSET=cfi CXXFLAGS="-fsanitize=cfi -fvisibility=hidden" LDFLAGS="-fsanitize=cfi"
41+ node_js : 10
42+ # linux publishable node v12/release
4743 - os : linux
48- env : BUILDTYPE=debug
49- node_js : 8
50- # linux publishable node v10
44+ env : BUILDTYPE=release
45+ node_js : 12
46+ # linux publishable node v10/release
5147 - os : linux
5248 env : BUILDTYPE=release
5349 node_js : 10
5450 # linux publishable node v10/debug
5551 - os : linux
5652 env : BUILDTYPE=debug
5753 node_js : 10
58- # osx publishable node v8
54+ # osx publishable node v10/release
5955 - os : osx
60- osx_image : xcode8 .3
56+ osx_image : xcode9 .3
6157 env : BUILDTYPE=release
62- node_js : 8
63- # osx publishable node v10
58+ node_js : 10
59+ # osx publishable node v12/release
6460 - os : osx
65- osx_image : xcode8 .3
61+ osx_image : xcode9 .3
6662 env : BUILDTYPE=release
67- node_js : 10
68- # Sanitizer build node v10/Debug
63+ node_js : 12
64+ # linux sanitizer build node v6/debug
6965 - os : linux
7066 env : BUILDTYPE=debug TOOLSET=asan
71- sudo : required # workaround https://github.com/mapbox/node-cpp-skel/issues/93
7267 node_js : 10
68+ sudo : required
7369 # Overrides `install` to set up custom asan flags
7470 install :
75- - ./scripts/setup.sh --config local.env
76- # put mason and clang++ on PATH
77- - source local.env
78- # Note: to build without stopping on errors remove the -fno-sanitize-recover=all flag
79- # You might want to do this if there are multiple errors and you want to see them all before fixing
80- - export CXXFLAGS="${MASON_SANITIZE_CXXFLAGS} -fno-sanitize-recover=all"
81- - export LDFLAGS="${MASON_SANITIZE_LDFLAGS}"
82- - make ${BUILDTYPE}
83- # Overrides `script` to disable asan LD_PRELOAD before publishing
71+ - make sanitize
72+ # Overrides `before_script` (tests are already run in `make sanitize`)
73+ before_script :
74+ # osx sanitizer build node v6/debug
75+ - os : osx
76+ env : BUILDTYPE=debug TOOLSET=asan
77+ node_js : 10
78+ sudo : required
79+ # Overrides `install` to set up custom asan flags
80+ install :
81+ - make sanitize
82+ # Overrides `before_script` (tests are already run in `make sanitize`)
8483 before_script :
85- - export LD_PRELOAD=${MASON_LLVM_RT_PRELOAD}
86- - export ASAN_OPTIONS=fast_unwind_on_malloc=0:${ASAN_OPTIONS}
87- - npm test
88- - unset LD_PRELOAD
89- # after successful tests, publish binaries if specified in commit message
90- - ./scripts/publish.sh --toolset=${TOOLSET:-} --debug=$([ "${BUILDTYPE}" == 'debug' ] && echo "true" || echo "false")
84+
85+ # # ** Builds that do not get published **
86+
9187 # g++ build (default builds all use clang++)
9288 - os : linux
93- env : BUILDTYPE=debug CXX="g++-6" CC="gcc-6" CXXFLAGS="-Weffc++ "
89+ env : BUILDTYPE=debug CXX="g++-6" CC="gcc-6" LINK="g++-6" AR="ar" NM="nm "
9490 node_js : 10
9591 addons :
9692 apt :
@@ -103,23 +99,17 @@ matrix:
10399 install :
104100 - make ${BUILDTYPE}
105101 # Overrides `script` to disable publishing
106- before_script :
107- - npm test
102+ script :
108103 # Coverage build
109104 - os : linux
110105 env : BUILDTYPE=debug CXXFLAGS="--coverage" LDFLAGS="--coverage"
111106 node_js : 10
112107 # Overrides `script` to publish coverage data to codecov
113- before_script :
114- - pip install --user codecov
115- - mason install llvm-cov ${MASON_LLVM_RELEASE}
116- - mason link llvm-cov ${MASON_LLVM_RELEASE}
117- - which llvm-cov
118- - curl -S -f https://codecov.io/bash -o codecov
119- - chmod +x codecov
120108 script :
121- - make coverage
122- - ./codecov -x "llvm-cov gcov" -Z
109+ - export PATH=$(pwd)/mason_packages/.link/bin/:${PATH}
110+ - which llvm-cov
111+ - pip install --user codecov
112+ - codecov --gcov-exec "llvm-cov gcov -l"
123113 # Clang format build
124114 - os : linux
125115 # can be generic since we don't need nodejs to run formatting
@@ -131,8 +121,10 @@ matrix:
131121 # will trigger the build to fail (idea here is to get us to pay attention
132122 # and get in the habit of running these locally before committing)
133123 - make format
134- # Overrides `script `, no need to run tests
124+ # Overrides `before_script `, no need to run tests
135125 before_script :
126+ # Overrides `script` to disable publishing
127+ script :
136128 # Clang tidy build
137129 - os : linux
138130 env : CLANG_TIDY
@@ -144,5 +136,7 @@ matrix:
144136 # will trigger the build to fail (idea here is to get us to pay attention
145137 # and get in the habit of running these locally before committing)
146138 - make tidy
147- # Overrides `script `, no need to run tests
139+ # Overrides `before_script `, no need to run tests
148140 before_script :
141+ # Overrides `script` to disable publishing
142+ script :
0 commit comments