forked from OISF/suricata
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
211 lines (203 loc) · 5.52 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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
dist: trusty
sudo: false
language: c
addons:
apt:
# Define the required packages without nss/nspr so we can do a
# build without nss/nspr
packages-without-nssnspr: &packages-without-nssnspr
- libpcre3
- libpcre3-dbg
- libpcre3-dev
- build-essential
- autoconf
- automake
- libtool
- libpcap-dev
- libnet1-dev
- libyaml-0-2
- libyaml-dev
- zlib1g
- zlib1g-dev
- libcap-ng-dev
- libcap-ng0
- make
- libmagic-dev
- libnetfilter-queue-dev
- libnetfilter-queue1
- libnfnetlink-dev
- libnfnetlink0
- libhiredis-dev
- libjansson-dev
- libevent-dev
- libevent-pthreads-2.0-5
# Define the required packages without libjansson so we can do a
# build without libjansson.
packages-without-jansson: &packages-without-jansson
- libnss3-dev
- libpcre3
- libpcre3-dbg
- libpcre3-dev
- build-essential
- autoconf
- automake
- libtool
- libpcap-dev
- libnet1-dev
- libyaml-0-2
- libyaml-dev
- zlib1g
- zlib1g-dev
- libcap-ng-dev
- libcap-ng0
- make
- libmagic-dev
- libnetfilter-queue-dev
- libnetfilter-queue1
- libnfnetlink-dev
- libnfnetlink0
- libhiredis-dev
- libevent-dev
- libevent-pthreads-2.0-5
# Now define the default set of packages which is those above, and
# libjansson.
packages: &packages
- *packages-without-jansson
- libjansson-dev
cache:
directories:
- /home/travis/.rustup
- /home/travis/.cargo
- /home/travis/.multirust
# Define the default CFLAGS used by all builds as a YAML anchor.
default-cflags: &default-cflags
CFLAGS="-Wall -Wextra -Werror -Wno-unused-parameter -Wno-unused-function"
env:
global:
# The version of Rust that will be used if not otherwise set.
- RUST_VERSION="stable"
# The minimum version of Rust supported.
- RUST_VERSION_MIN="1.34.2"
# A known recent working version of stable Rust
- RUST_VERSION_KNOWN="1.37.0"
matrix:
allow_failures:
# Allow the rust-stable build to fail. These entries must match
# the env entry in the build matrix exactly.
- env:
- NAME="linux,gcc,rust-stable"
- *default-cflags
- RUST_VERSION="stable"
- ARGS="--enable-rust-strict"
- DO_CHECK_SETUP_SCRIPTS="yes"
- DO_DISTCHECK="yes"
include:
# Linux, gcc, Rust (latest stable).
# This is allowed to fail, update allow_failures if the env changes.
- os: linux
compiler: gcc
env:
- NAME="linux,gcc,rust-stable"
- *default-cflags
- RUST_VERSION="stable"
- ARGS="--enable-rust-strict"
- DO_CHECK_SETUP_SCRIPTS="yes"
- DO_DISTCHECK="yes"
# Linux, gcc, Rust (auto detect).
# - Use latest known working version of Rust.
- os: linux
compiler: gcc
env:
- NAME="linux,gcc,rust-${RUST_VERSION_KNOWN}"
- *default-cflags
- RUST_VERSION="${RUST_VERSION_KNOWN}"
- ARGS="--enable-rust-strict"
- DO_DISTCHECK="yes"
# Linux, gcc, Rust (oldest supported)
- os: linux
compiler: gcc
env:
- NAME="linux,gcc,rust-${RUST_VERSION_MIN}"
- *default-cflags
- RUST_VERSION="${RUST_VERSION_MIN}"
- ARGS="--enable-rust-strict"
- DO_DISTCHECK="yes"
# Linux, gcc, -DNDEBUG.
- os: linux
compiler: gcc
env:
- NAME="linux,gcc,ndebug"
- *default-cflags
- EXTRA_CFLAGS="-DNDEBUG"
# Linux, clang. For this build we'll also enable -Wshadow.
- os: linux
compiler: clang
env:
- NAME="linux,clang"
- *default-cflags
- EXTRA_CFLAGS="-Wshadow"
# Linux, gcc, profiling.
- os: linux
compiler: gcc
env:
- NAME="linux,gcc,profiling"
- *default-cflags
- ARGS="--enable-profiling"
# Linux, gcc, debug.
- os: linux
compiler: gcc
env:
- NAME="linux,gcc,debug"
- *default-cflags
- ARGS="--enable-debug"
- ENABLE_DEBUG="yes"
# Linux, gcc, debug-validate.
- os: linux
compiler: gcc
env:
- NAME="linux,gcc,debug-validate"
- *default-cflags
- ARGS="--enable-debug-validation"
- NO_UNITTESTS="yes"
# Linux, gcc, no jansson.
- os: linux
compiler: gcc
env:
- NAME="linux,gcc,no-jansson"
- *default-cflags
- CONFIGURE_SHOULD_FAIL="yes"
addons:
apt:
packages:
- *packages-without-jansson
# Too old version of Rust.
- os: linux
compiler: gcc
env:
- NAME="Unsupported Rust version"
- RUST_VERSION="1.32.0"
- CONFIGURE_SHOULD_FAIL="yes"
# Linux, gcc, no nss/nspr.
- os: linux
compiler: gcc
env:
- NAME="linux,gcc,no-nssnspr"
- *default-cflags
- ARGS="--disable-nss --disable-nspr"
addons:
apt:
packages:
- *packages-without-nssnspr
script: ./qa/travis.sh
before_install:
- export PATH=$HOME/.cargo/bin:$PATH
- |
# Install the desired Rust toolchain with rustup.
curl https://sh.rustup.rs -sSf | \
sh -s -- -y --default-toolchain "${RUST_VERSION}"
# Set the default, in case a cached version was used that doesn't
# match the requested version.
rustup default "${RUST_VERSION}"
rustc --version
cargo install --force --debug --version 0.14.1 cbindgen
- ./qa/travis-libhtp.sh