]> git.ipfire.org Git - people/ms/suricata.git/blob - .travis.yml
detect-engine: initialize struct fields
[people/ms/suricata.git] / .travis.yml
1 dist: trusty
2 sudo: false
3 language: c
4
5 addons:
6 apt:
7 # Define the required packages without nss/nspr so we can do a
8 # build without nss/nspr
9 packages-without-nssnspr: &packages-without-nssnspr
10 - libpcre3
11 - libpcre3-dbg
12 - libpcre3-dev
13 - build-essential
14 - autoconf
15 - automake
16 - libtool
17 - libpcap-dev
18 - libnet1-dev
19 - libyaml-0-2
20 - libyaml-dev
21 - zlib1g
22 - zlib1g-dev
23 - libcap-ng-dev
24 - libcap-ng0
25 - make
26 - libmagic-dev
27 - libnetfilter-queue-dev
28 - libnetfilter-queue1
29 - libnfnetlink-dev
30 - libnfnetlink0
31 - libhiredis-dev
32 - libjansson-dev
33 - libevent-dev
34 - libevent-pthreads-2.0-5
35 # Define the required packages without libjansson so we can do a
36 # build without libjansson.
37 packages-without-jansson: &packages-without-jansson
38 - libnss3-dev
39 - libpcre3
40 - libpcre3-dbg
41 - libpcre3-dev
42 - build-essential
43 - autoconf
44 - automake
45 - libtool
46 - libpcap-dev
47 - libnet1-dev
48 - libyaml-0-2
49 - libyaml-dev
50 - zlib1g
51 - zlib1g-dev
52 - libcap-ng-dev
53 - libcap-ng0
54 - make
55 - libmagic-dev
56 - libnetfilter-queue-dev
57 - libnetfilter-queue1
58 - libnfnetlink-dev
59 - libnfnetlink0
60 - libhiredis-dev
61 - libevent-dev
62 - libevent-pthreads-2.0-5
63 # Now define the default set of packages which is those above, and
64 # libjansson.
65 packages: &packages
66 - *packages-without-jansson
67 - libjansson-dev
68
69 cache:
70 directories:
71 - /home/travis/.rustup
72 - /home/travis/.cargo
73 - /home/travis/.multirust
74
75 # Define the default CFLAGS used by all builds as a YAML anchor.
76 default-cflags: &default-cflags
77 CFLAGS="-Wall -Wextra -Werror -Wno-unused-parameter -Wno-unused-function"
78
79 env:
80 global:
81 # The version of Rust that will be used if not otherwise set.
82 - RUST_VERSION="stable"
83 # The minimum version of Rust supported.
84 - RUST_VERSION_MIN="1.34.2"
85 # A known recent working version of stable Rust
86 - RUST_VERSION_KNOWN="1.37.0"
87
88 matrix:
89 allow_failures:
90 # Allow the rust-stable build to fail. These entries must match
91 # the env entry in the build matrix exactly.
92 - env:
93 - NAME="linux,gcc,rust-stable"
94 - *default-cflags
95 - RUST_VERSION="stable"
96 - ARGS="--enable-rust-strict"
97 - DO_CHECK_SETUP_SCRIPTS="yes"
98 - DO_DISTCHECK="yes"
99 include:
100 # Linux, gcc, Rust (latest stable).
101 # This is allowed to fail, update allow_failures if the env changes.
102 - os: linux
103 compiler: gcc
104 env:
105 - NAME="linux,gcc,rust-stable"
106 - *default-cflags
107 - RUST_VERSION="stable"
108 - ARGS="--enable-rust-strict"
109 - DO_CHECK_SETUP_SCRIPTS="yes"
110 - DO_DISTCHECK="yes"
111 # Linux, gcc, Rust (auto detect).
112 # - Use latest known working version of Rust.
113 - os: linux
114 compiler: gcc
115 env:
116 - NAME="linux,gcc,rust-${RUST_VERSION_KNOWN}"
117 - *default-cflags
118 - RUST_VERSION="${RUST_VERSION_KNOWN}"
119 - ARGS="--enable-rust-strict"
120 - DO_DISTCHECK="yes"
121 # Linux, gcc, Rust (oldest supported)
122 - os: linux
123 compiler: gcc
124 env:
125 - NAME="linux,gcc,rust-${RUST_VERSION_MIN}"
126 - *default-cflags
127 - RUST_VERSION="${RUST_VERSION_MIN}"
128 - ARGS="--enable-rust-strict"
129 - DO_DISTCHECK="yes"
130 # Linux, gcc, -DNDEBUG.
131 - os: linux
132 compiler: gcc
133 env:
134 - NAME="linux,gcc,ndebug"
135 - *default-cflags
136 - EXTRA_CFLAGS="-DNDEBUG"
137 # Linux, clang. For this build we'll also enable -Wshadow.
138 - os: linux
139 compiler: clang
140 env:
141 - NAME="linux,clang"
142 - *default-cflags
143 - EXTRA_CFLAGS="-Wshadow"
144 # Linux, gcc, profiling.
145 - os: linux
146 compiler: gcc
147 env:
148 - NAME="linux,gcc,profiling"
149 - *default-cflags
150 - ARGS="--enable-profiling"
151 # Linux, gcc, debug.
152 - os: linux
153 compiler: gcc
154 env:
155 - NAME="linux,gcc,debug"
156 - *default-cflags
157 - ARGS="--enable-debug"
158 - ENABLE_DEBUG="yes"
159 # Linux, gcc, debug-validate.
160 - os: linux
161 compiler: gcc
162 env:
163 - NAME="linux,gcc,debug-validate"
164 - *default-cflags
165 - ARGS="--enable-debug-validation"
166 - NO_UNITTESTS="yes"
167 # Linux, gcc, no jansson.
168 - os: linux
169 compiler: gcc
170 env:
171 - NAME="linux,gcc,no-jansson"
172 - *default-cflags
173 - CONFIGURE_SHOULD_FAIL="yes"
174 addons:
175 apt:
176 packages:
177 - *packages-without-jansson
178 # Too old version of Rust.
179 - os: linux
180 compiler: gcc
181 env:
182 - NAME="Unsupported Rust version"
183 - RUST_VERSION="1.32.0"
184 - CONFIGURE_SHOULD_FAIL="yes"
185 # Linux, gcc, no nss/nspr.
186 - os: linux
187 compiler: gcc
188 env:
189 - NAME="linux,gcc,no-nssnspr"
190 - *default-cflags
191 - ARGS="--disable-nss --disable-nspr"
192 addons:
193 apt:
194 packages:
195 - *packages-without-nssnspr
196
197 script: ./qa/travis.sh
198
199 before_install:
200 - export PATH=$HOME/.cargo/bin:$PATH
201 - |
202 # Install the desired Rust toolchain with rustup.
203 curl https://sh.rustup.rs -sSf | \
204 sh -s -- -y --default-toolchain "${RUST_VERSION}"
205 # Set the default, in case a cached version was used that doesn't
206 # match the requested version.
207 rustup default "${RUST_VERSION}"
208 rustc --version
209
210 cargo install --force --debug --version 0.14.1 cbindgen
211 - ./qa/travis-libhtp.sh