]> git.ipfire.org Git - people/ms/suricata.git/blame - .github/workflows/builds.yml
doc: document file-store v1 to v2 configuration changes
[people/ms/suricata.git] / .github / workflows / builds.yml
CommitLineData
3887f8d1
JI
1name: builds
2
3on:
4 - push
5 - pull_request
6
7jobs:
8
9 centos-8:
10 name: CentOS 8
11 runs-on: ubuntu-latest
12 container: centos:8
13 steps:
14
15 # Cache Rust stuff.
16 - name: Cache cargo registry
17 uses: actions/cache@v1
18 with:
19 path: ~/.cargo/registry
20 key: cargo-registry
21
22 - name: Install system packages
23 run: |
24 yum -y install dnf-plugins-core
25 yum config-manager --set-enabled PowerTools
26 yum -y install \
27 autoconf \
28 automake \
29 cargo-vendor \
30 diffutils \
31 file-devel \
32 gcc \
33 gcc-c++ \
34 git \
35 jansson-devel \
36 jq \
37 lua-devel \
38 libtool \
39 libyaml-devel \
40 libnfnetlink-devel \
41 libnetfilter_queue-devel \
42 libnet-devel \
43 libcap-ng-devel \
44 libevent-devel \
45 libmaxminddb-devel \
46 libpcap-devel \
47 libtool \
48 lz4-devel \
49 make \
50 nss-devel \
51 pcre-devel \
52 pkgconfig \
53 python3-devel \
54 python3-sphinx \
55 python3-yaml \
56 rust-toolset \
57 sudo \
58 which \
59 zlib-devel
60 # These packages required to build the PDF.
61 yum -y install \
62 texlive-latex \
63 texlive-cmap \
64 texlive-collection-latexrecommended \
65 texlive-fncychap \
66 texlive-titlesec \
67 texlive-tabulary \
68 texlive-framed \
69 texlive-wrapfig \
70 texlive-upquote \
71 texlive-capt-of \
72 texlive-needspace \
b573c16d 73 - name: Install cbindgen
4318c1de 74 run: cargo install --force --debug --version 0.14.1 cbindgen
56528a38 75 - run: echo "::add-path::$HOME/.cargo/bin"
3887f8d1
JI
76 - uses: actions/checkout@v1
77 - name: Bundling libhtp
78 run: git clone https://github.com/OISF/libhtp -b 0.5.x
79 - name: Bundling suricata-update
80 run: |
81 curl -L \
82 https://github.com/OISF/suricata-update/archive/master.tar.gz | \
83 tar zxvf - --strip-components=1
84 working-directory: suricata-update
85 - name: Configuring
86 run: |
87 ./autogen.sh
211b193e
JI
88 ./configure
89 - run: make -j2 distcheck
90 env:
91 DISTCHECK_CONFIGURE_FLAGS: "--enable-unittests --enable-debug --enable-lua --enable-geoip --enable-profiling --enable-profiling-locks"
92 - run: test -e doc/userguide/suricata.1
93 - name: Preparing distribution
3887f8d1 94 run: |
3887f8d1
JI
95 mkdir dist
96 mv suricata-*.tar.gz dist
97 - uses: actions/upload-artifact@v1
98 name: Uploading distribution
99 with:
100 name: dist
101 path: dist
102
103 centos-7:
104 name: CentOS 7
105 runs-on: ubuntu-latest
106 container: centos:7
107 needs: centos-8
108 steps:
109 - name: Install system dependencies
110 run: |
111 yum -y install epel-release
112 yum -y install \
113 cargo \
114 diffutils \
115 file-devel \
116 gcc \
117 gcc-c++ \
118 jansson-devel \
119 jq \
120 lua-devel \
121 libtool \
122 libyaml-devel \
123 libnfnetlink-devel \
124 libnetfilter_queue-devel \
125 libnet-devel \
126 libcap-ng-devel \
127 libevent-devel \
128 libmaxminddb-devel \
129 libpcap-devel \
130 lz4-devel \
131 make \
132 nss-devel \
133 pcre-devel \
134 pkgconfig \
135 rust \
136 sudo \
137 which \
138 zlib-devel
139 - name: Download suricata.tar.gz
140 uses: actions/download-artifact@v1
141 with:
142 name: dist
83630015
JI
143 - run: tar zxvf ./dist/suricata-*.tar.gz --strip-components=1
144 - run: ./configure
83630015
JI
145 - run: make -j2
146 - run: make install
147 - run: make install-conf
148 - run: make distcheck
0a1d2fce
JI
149 - run: make clean
150 - run: make -j2
3887f8d1
JI
151
152 centos-6:
153 name: CentOS 6
154 runs-on: ubuntu-latest
155 container: centos:6
156 needs: centos-8
157 steps:
158 - name: Install Rust
95e7246b 159 run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.34.2 -y
56528a38 160 - run: echo "::add-path::$HOME/.cargo/bin"
3887f8d1
JI
161 - name: Install system dependencies
162 run: |
163 yum -y install epel-release
164 yum -y install \
165 file-devel \
166 gcc \
167 gcc-c++ \
168 jq \
169 jansson-devel \
170 make \
171 libyaml-devel \
172 libpcap-devel \
173 pcre-devel \
174 python34-PyYAML \
175 nss-devel \
176 sudo \
177 which \
178 zlib-devel
179 - name: Download suricata.tar.gz
180 uses: actions/download-artifact@v1
181 with:
182 name: dist
183 - run: mkdir suricata
184 - working-directory: suricata
185 run: tar zxvf ../dist/suricata-*.tar.gz --strip-components=1
186 - working-directory: suricata
187 run: ./configure
188 - working-directory: suricata
189 run: make -j2
190 - working-directory: suricata
191 run: make install
192 - working-directory: suricata
193 run: make install-conf
194
195 fedora-31:
196 name: Fedora 31
197 runs-on: ubuntu-latest
198 container: fedora:31
199 steps:
200
201 # Cache Rust stuff.
202 - name: Cache cargo registry
203 uses: actions/cache@v1
204 with:
205 path: ~/.cargo/registry
206 key: cargo-registry
207
208 - run: |
209 dnf -y install \
210 autoconf \
211 automake \
212 cargo \
213 ccache \
214 diffutils \
215 file-devel \
216 gcc \
217 gcc-c++ \
218 git \
219 jansson-devel \
220 jq \
221 lua-devel \
222 libtool \
223 libyaml-devel \
224 libnfnetlink-devel \
225 libnetfilter_queue-devel \
226 libnet-devel \
227 libcap-ng-devel \
228 libevent-devel \
229 libmaxminddb-devel \
230 libpcap-devel \
231 libtool \
232 lz4-devel \
233 make \
234 nspr-devel \
235 nss-devel \
236 nss-softokn-devel \
237 pcre-devel \
238 pkgconfig \
239 python3-yaml \
240 sudo \
241 which \
242 zlib-devel
7c0c2e76
JI
243 - name: Installing packages to build documentation
244 run: |
245 dnf -y install \
246 python3-sphinx \
247 texlive-scheme-full
b573c16d 248 - name: Install cbindgen
4318c1de 249 run: cargo install --force --debug --version 0.14.1 cbindgen
56528a38 250 - run: echo "::add-path::$HOME/.cargo/bin"
3887f8d1
JI
251 - uses: actions/checkout@v1
252 - run: git clone https://github.com/OISF/libhtp -b 0.5.x
253 - run: ./autogen.sh
254 - run: ./configure --enable-unittests
255 - run: make -j2
256 - run: make check
7c0c2e76
JI
257 - run: make dist
258 - run: test -e doc/devguide/devguide.pdf
259 - run: test -e doc/userguide/userguide.pdf
2ff963db 260 - run: make distcheck
3887f8d1
JI
261 - name: Fetching suricata-verify
262 run: git clone https://github.com/OISF/suricata-verify.git
263 - name: Running suricata-verify
264 run: python3 ./suricata-verify/run.py
265
266 ubuntu-18-04:
267 name: Ubuntu 18.04 (Cocci)
268 runs-on: ubuntu-18.04
b9515671 269 container: ubuntu:18.04
3887f8d1
JI
270 steps:
271
272 # Cache Rust stuff.
273 - name: Cache cargo registry
274 uses: actions/cache@v1
275 with:
276 path: ~/.cargo/registry
277 key: cargo-registry
278
279 - name: Install dependencies
280 run: |
b9515671
JI
281 apt update
282 apt -y install \
3887f8d1
JI
283 libpcre3 \
284 libpcre3-dev \
285 build-essential \
286 autoconf \
287 automake \
b9515671
JI
288 git \
289 jq \
3887f8d1
JI
290 libtool \
291 libpcap-dev \
292 libnet1-dev \
293 libyaml-0-2 \
294 libyaml-dev \
295 libcap-ng-dev \
296 libcap-ng0 \
297 libmagic-dev \
298 libnetfilter-queue-dev \
299 libnetfilter-queue1 \
300 libnfnetlink-dev \
301 libnfnetlink0 \
302 libhiredis-dev \
303 libjansson-dev \
304 libevent-dev \
305 libevent-pthreads-2.1.6 \
306 libjansson-dev \
b9515671 307 libpython2.7 \
3887f8d1
JI
308 make \
309 parallel \
b9515671
JI
310 python3-yaml \
311 rustc \
3887f8d1
JI
312 software-properties-common \
313 zlib1g \
9b5ccbe4
PA
314 zlib1g-dev \
315 exuberant-ctags
bcbd8c2a
JI
316 - name: Install packages for generating documentation
317 run: |
318 DEBIAN_FRONTEND=noninteractive apt -y install \
319 sphinx-doc \
320 sphinx-common \
321 texlive-latex-base \
322 texlive-fonts-recommended \
323 texlive-fonts-extra \
324 texlive-latex-extra
3887f8d1
JI
325 - name: Install Coccinelle
326 run: |
b9515671
JI
327 add-apt-repository -y ppa:npalix/coccinelle
328 apt -y install coccinelle
b573c16d 329 - name: Install cbindgen
4318c1de 330 run: cargo install --force --debug --version 0.14.1 cbindgen
56528a38 331 - run: echo "::add-path::$HOME/.cargo/bin"
3887f8d1
JI
332 - uses: actions/checkout@v1
333 - run: git clone https://github.com/OISF/libhtp -b 0.5.x
334 - run: ./autogen.sh
335 - run: ./configure --enable-unittests --enable-coccinelle
336 - run: make -j2
9b5ccbe4 337 - run: make tags
3887f8d1
JI
338 - name: Running unit tests and cocci checks
339 # Set the concurrency level for cocci.
340 run: CONCURRENCY_LEVEL=2 make check
bcbd8c2a
JI
341 - run: make dist
342 - name: Checking that documentation was built
343 run: |
344 test -e doc/devguide/devguide.pdf
345 test -e doc/userguide/userguide.pdf
346 test -e doc/userguide/suricata.1
3887f8d1
JI
347 - name: Fetching suricata-verify
348 run: git clone https://github.com/OISF/suricata-verify.git
349 - name: Running suricata-verify
b9515671 350 run: python3 ./suricata-verify/run.py
3887f8d1 351
19fe8d98
VJ
352 # test build with afl and fuzztargets
353 ubuntu-18-04-fuzz:
354 name: Ubuntu 18.04 (Fuzz)
355 runs-on: ubuntu-18.04
356 container: ubuntu:18.04
357 steps:
358
359 # Cache Rust stuff.
360 - name: Cache cargo registry
361 uses: actions/cache@v1
362 with:
363 path: ~/.cargo/registry
364 key: cargo-registry
365
366 - name: Install dependencies
367 run: |
368 apt update
369 apt -y install \
370 afl \
371 afl-clang \
372 libpcre3 \
373 libpcre3-dev \
374 build-essential \
375 autoconf \
376 automake \
377 git \
378 libtool \
379 libpcap-dev \
380 libnet1-dev \
381 libyaml-0-2 \
382 libyaml-dev \
383 libcap-ng-dev \
384 libcap-ng0 \
385 libmagic-dev \
386 libnetfilter-queue-dev \
387 libnetfilter-queue1 \
388 libnfnetlink-dev \
389 libnfnetlink0 \
390 libhiredis-dev \
391 libjansson-dev \
392 libjansson-dev \
393 libpython2.7 \
394 make \
395 rustc \
396 software-properties-common \
397 zlib1g \
398 zlib1g-dev
399 - name: Install cbindgen
4318c1de 400 run: cargo install --force --debug --version 0.14.1 cbindgen
19fe8d98
VJ
401 - run: echo "::add-path::$HOME/.cargo/bin"
402 - uses: actions/checkout@v1
403 - run: git clone https://github.com/OISF/libhtp -b 0.5.x
404 - run: ./autogen.sh
405 - run: AFL_HARDEN=1 ac_cv_func_realloc_0_nonnull=yes ac_cv_func_malloc_0_nonnull=yes CFLAGS="-fsanitize=address -fno-omit-frame-pointer" CXXFLAGS=$CFLAGS CC=afl-clang-fast CXX=afl-clang-fast++ ./configure --enable-fuzztargets --disable-shared
406 - run: AFL_HARDEN=1 make -j2
407
3887f8d1
JI
408 # An Ubuntu 16.04 build using the tarball generated in the CentOS 8
409 # build above.
410 ubuntu-16-04:
411 name: Ubuntu 16.04
412 runs-on: ubuntu-latest
413 container: ubuntu:16.04
414 needs: centos-8
415 steps:
416 - name: Install dependencies
417 run: |
418 apt update
419 apt -y install \
420 build-essential \
421 curl \
422 libcap-ng-dev \
423 libcap-ng0 \
424 libevent-dev \
425 libhiredis-dev \
426 libjansson-dev \
427 libmagic-dev \
428 libnet1-dev \
429 libnetfilter-queue-dev \
430 libnetfilter-queue1 \
431 libnfnetlink-dev \
432 libnfnetlink0 \
433 libnss3-dev \
434 libpcre3 \
435 libpcre3-dev \
436 libpcap-dev \
437 libyaml-0-2 \
438 libyaml-dev \
439 make \
440 python3-yaml \
441 zlib1g \
442 zlib1g-dev
443 - name: Install Rust
95e7246b 444 run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.34.2 -y
56528a38 445 - run: echo "::add-path::$HOME/.cargo/bin"
3887f8d1
JI
446 - name: Download suricata.tar.gz
447 uses: actions/download-artifact@v1
448 with:
449 name: dist
450 - run: mkdir suricata
451 - name: Extract
452 working-directory: suricata
453 run: tar zxvf ../dist/suricata-*.tar.gz --strip-components=1
454 - name: Configure
455 working-directory: suricata
456 run: ./configure
457 - name: Build
458 working-directory: suricata
459 run: make -j2
460 - name: Testing
461 working-directory: suricata
462 run: make check
463 - working-directory: suricata
464 run: make install
465 - working-directory: suricata
466 run: make install-conf
467 - working-directory: suricata
468 run: make install-rules
469
470 debian-10:
471 name: Debian 10
472 runs-on: ubuntu-latest
473 container: debian:10
474 steps:
475 # Cache Rust stuff.
476 - name: Cache cargo registry
477 uses: actions/cache@v1
478 with:
479 path: ~/.cargo/registry
480 key: cargo-registry
481
482 - run: |
483 apt update
484 apt -y install \
485 automake \
486 autoconf \
487 build-essential \
488 ccache \
489 curl \
490 git \
491 gosu \
492 jq \
493 libpcre3 \
494 libpcre3-dbg \
495 libpcre3-dev \
496 libpcap-dev \
497 libnet1-dev \
498 libyaml-0-2 \
499 libyaml-dev \
500 libcap-ng-dev \
501 libcap-ng0 \
502 libmagic-dev \
503 libjansson-dev \
504 libnss3-dev \
505 libgeoip-dev \
506 liblua5.1-dev \
507 libhiredis-dev \
508 libevent-dev \
509 libtool \
510 m4 \
511 make \
512 python-yaml \
513 pkg-config \
514 rustc \
515 sudo \
516 zlib1g \
517 zlib1g-dev
b573c16d 518 - name: Install cbindgen
4318c1de 519 run: cargo install --force --debug --version 0.14.1 cbindgen
56528a38 520 - run: echo "::add-path::$HOME/.cargo/bin"
3887f8d1
JI
521 - uses: actions/checkout@v1
522 - name: Bundling libhtp
523 run: git clone https://github.com/OISF/libhtp -b 0.5.x
524 - name: Bundling suricata-update
525 run: |
526 curl -L \
527 https://github.com/OISF/suricata-update/archive/master.tar.gz | \
528 tar zxvf - --strip-components=1
529 working-directory: suricata-update
530 - run: ./autogen.sh
66181ed2 531 - run: ./configure --enable-unittests --enable-fuzztargets
3887f8d1
JI
532 - run: make -j2
533 - run: make check
534 - name: Fetching suricata-verify
535 run: git clone https://github.com/OISF/suricata-verify.git
536 - name: Running suricata-verify
537 run: ./suricata-verify/run.py
538
539 debian-9:
540 name: Debian 9
541 runs-on: ubuntu-latest
542 container: debian:9
543 steps:
544 - run: |
545 apt update
546 apt -y install \
547 automake \
548 autoconf \
549 build-essential \
550 ccache \
551 curl \
552 git-core \
553 gosu \
554 jq \
555 libpcre3 \
556 libpcre3-dbg \
557 libpcre3-dev \
558 libpcap-dev \
559 libnet1-dev \
560 libyaml-0-2 \
561 libyaml-dev \
562 libcap-ng-dev \
563 libcap-ng0 \
564 libmagic-dev \
565 libjansson-dev \
566 libnss3-dev \
567 libgeoip-dev \
568 liblua5.1-dev \
569 libhiredis-dev \
570 libevent-dev \
571 libtool \
572 m4 \
573 make \
574 python-yaml \
575 pkg-config \
576 sudo \
577 zlib1g \
578 zlib1g-dev
579 - name: Install Rust
95e7246b 580 run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.34.2 -y
56528a38 581 - run: echo "::add-path::$HOME/.cargo/bin"
b573c16d 582 - name: Install cbindgen
4318c1de 583 run: cargo install --force --debug --version 0.14.1 cbindgen
3887f8d1
JI
584 - uses: actions/checkout@v1
585 - name: Bundling libhtp
586 run: git clone https://github.com/OISF/libhtp -b 0.5.x
587 - name: Bundling suricata-update
588 run: |
589 curl -L \
590 https://github.com/OISF/suricata-update/archive/master.tar.gz | \
591 tar zxvf - --strip-components=1
592 working-directory: suricata-update
593 - run: ./autogen.sh
594 - run: ./configure --enable-unittests
595 - run: make -j2
596 - run: make check
597 - name: Fetching suricata-verify
598 run: git clone https://github.com/OISF/suricata-verify.git
599 - name: Running suricata-verify
600 run: ./suricata-verify/run.py
601
602 macos-latest:
603 name: MacOS Latest
604 runs-on: macos-latest
605 steps:
606 # Cache Rust stuff.
607 - name: Cache cargo registry
608 uses: actions/cache@v1
609 with:
610 path: ~/.cargo/registry
611 key: cargo-registry
612 - run: |
613 brew install \
614 autoconf \
615 automake \
616 curl \
617 hiredis \
618 jansson \
619 jq \
620 libmagic \
621 libnet \
622 libtool \
623 libyaml \
624 lua \
625 nss \
626 nspr \
627 pcre \
628 pkg-config \
629 rust \
630 xz
b573c16d 631 - name: Install cbindgen
4318c1de 632 run: cargo install --force --debug --version 0.14.1 cbindgen
56528a38 633 - run: echo "::add-path::$HOME/.cargo/bin"
3887f8d1
JI
634 - run: pip install PyYAML
635 - uses: actions/checkout@v1
636 - run: git clone https://github.com/OISF/libhtp -b 0.5.x
637 - run: ./autogen.sh
638 - run: ./configure --enable-unittests
639 - run: make -j2
640 - run: make check
641 - name: Fetching suricata-verify
642 run: git clone https://github.com/OISF/suricata-verify.git
643 - name: Running suricata-verify
644 run: ./suricata-verify/run.py