-
Notifications
You must be signed in to change notification settings - Fork 139
/
.travis.yml
186 lines (165 loc) · 5.91 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
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
language: cpp
dist: focal
os: linux
cache:
directories:
- $HOME/deps
compiler:
- gcc
- clang
before_install:
- bash install_deps.sh
- if [ "$DO_COVERAGE" = "coverage" ]; then pip install --user cpp-coveralls; fi
- eval "${MATRIX_EVAL}"
before_script:
- export PATH=$HOME/deps/cmake-install:$HOME/deps/cmake-install/bin:$HOME/deps/nats-server:$HOME/deps/nats-streaming-server:$PATH
- mkdir build && cd build
env:
- DO_COVERAGE="coverage" BUILD_OPT="-DNATS_COVERAGE=ON -DNATS_BUILD_ARCH=64 -DCMAKE_BUILD_TYPE=Debug -DNATS_BUILD_TLS_USE_OPENSSL_1_1_API=ON"
jobs:
include:
- name: "NATS server - latest release"
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- sourceline: ppa:ubuntu-toolchain-r/test
packages:
- g++-9
env:
- NATS_TEST_SERVER_VERSION=latest
- MATRIX_EVAL="CC=gcc-9"
- BUILD_OPT="-DNATS_BUILD_ARCH=64 -DCMAKE_BUILD_TYPE=Release" DO_COVERAGE="no"
- name: "NATS server - main"
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- sourceline: ppa:ubuntu-toolchain-r/test
packages:
- g++-9
env:
- NATS_TEST_SERVER_VERSION=main
- MATRIX_EVAL="CC=gcc-9"
- BUILD_OPT="-DNATS_BUILD_ARCH=64 -DCMAKE_BUILD_TYPE=Release" DO_COVERAGE="no"
- name: "gcc-9 - TLS OFF"
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- sourceline: ppa:ubuntu-toolchain-r/test
packages:
- g++-9
env:
- NATS_TEST_SERVER_VERSION=main
- MATRIX_EVAL="CC=gcc-9"
- BUILD_OPT="-DNATS_BUILD_WITH_TLS=OFF -DNATS_BUILD_ARCH=64 -DCMAKE_BUILD_TYPE=Release" DO_COVERAGE="no"
- name: "gcc-9 - Streaming OFF"
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- sourceline: ppa:ubuntu-toolchain-r/test
packages:
- g++-9
env:
- MATRIX_EVAL="CC=gcc-9"
- BUILD_OPT="-DNATS_BUILD_STREAMING=OFF -DNATS_BUILD_ARCH=64 -DCMAKE_BUILD_TYPE=Release" DO_COVERAGE="no" CTEST_OPT="-I 1,1"
- name: "gcc-9 - Default - sanitize address"
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- sourceline: ppa:ubuntu-toolchain-r/test
packages:
- g++-9
env:
- NATS_TEST_SERVER_VERSION=main
- MATRIX_EVAL="CC=gcc-9"
- BUILD_OPT="-DNATS_BUILD_ARCH=64 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS=-fsanitize=address" NATS_TEST_VALGRIND=yes DO_COVERAGE="no"
- name: "gcc-9 - Lib msg delivery - sanitize address"
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- sourceline: ppa:ubuntu-toolchain-r/test
packages:
- g++-9
env:
- NATS_TEST_SERVER_VERSION=main
- MATRIX_EVAL="CC=gcc-9"
- NATS_DEFAULT_TO_LIB_MSG_DELIVERY=yes BUILD_OPT="-DNATS_BUILD_ARCH=64 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS=-fsanitize=address" NATS_TEST_VALGRIND=yes DO_COVERAGE="no"
- name: "gcc-9 - Write deadline - sanitize address"
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- sourceline: ppa:ubuntu-toolchain-r/test
packages:
- g++-9
env:
- NATS_TEST_SERVER_VERSION=main
- MATRIX_EVAL="CC=gcc-9"
- NATS_DEFAULT_LIB_WRITE_DEADLINE=2000 BUILD_OPT="-DNATS_BUILD_ARCH=64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS=-fsanitize=address" NATS_TEST_VALGRIND=yes DO_COVERAGE="no"
# - name: "gcc-9 - Default - sanitize thread"
# compiler: gcc
# addons:
# apt:
# sources:
# - ubuntu-toolchain-r-test
# - sourceline: ppa:ubuntu-toolchain-r/test
# packages:
# - g++-9
# env:
# - MATRIX_EVAL="CC=gcc-9"
# - BUILD_OPT="-DNATS_BUILD_ARCH=64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS=-fsanitize=thread" NATS_TEST_VALGRIND=yes DO_COVERAGE="no"
- name: "clang-8 - TLS OFF"
compiler: clang
addons:
apt:
sources:
- llvm-toolchain-xenial-8
packages:
- clang-8
env:
- MATRIX_EVAL="CC=clang-8"
# Run only one test, this matrix is just to make sure that we compile ok.
- BUILD_OPT="-DNATS_BUILD_WITH_TLS=OFF -DNATS_BUILD_ARCH=64 -DCMAKE_BUILD_TYPE=Release" DO_COVERAGE="no" CTEST_OPT="-I 1,1"
- name: "clang-8 - Default - sanitize address"
compiler: clang
addons:
apt:
sources:
- llvm-toolchain-xenial-8
packages:
- clang-8
env:
- NATS_TEST_SERVER_VERSION=main
- MATRIX_EVAL="CC=clang-8"
- BUILD_OPT="-DNATS_BUILD_ARCH=64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS=-fsanitize=address" NATS_TEST_VALGRIND=yes DO_COVERAGE="no"
- name: "clang-8 - Default - sanitize thread"
compiler: clang
addons:
apt:
sources:
- llvm-toolchain-xenial-8
packages:
- clang-8
env:
- NATS_TEST_SERVER_VERSION=main
- MATRIX_EVAL="CC=clang-8"
- BUILD_OPT="-DNATS_BUILD_ARCH=64 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_FLAGS=-fsanitize=thread" NATS_TEST_VALGRIND=yes DO_COVERAGE="no"
script:
- $TRAVIS_BUILD_DIR/buildOnTravis.sh "$CC" "$DO_COVERAGE" "$BUILD_OPT -DNATS_SANITIZE=ON -DNATS_BUILD_TLS_USE_OPENSSL_1_1_API=ON -DNATS_PROTOBUF_DIR=$HOME/deps/pbuf -DNATS_BUILD_USE_SODIUM=ON -DNATS_SODIUM_DIR=$HOME/deps/sodium" "$CTEST_OPT"
after_success:
- cd ..
- if [[ "$DO_COVERAGE" == "coverage" && "$TRAVIS_COMPILER" == "gcc" ]]; then coveralls --gcov-options '\-lp' -r . -i "src/" -e "src/win/" -e "src/unix/" -e "src/stan/protocol.pb-c.c" -E ".*\.h$"; fi
notifications:
email: false