Skip to content

Commit 26a7965

Browse files
committed
github-ci: add almalinux 10 build
Based on the current AlmaLinux 9 build, with plugin tests, etc.
1 parent 6bbba95 commit 26a7965

1 file changed

Lines changed: 174 additions & 0 deletions

File tree

.github/workflows/builds.yml

Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,180 @@ jobs:
6767
name: cbindgen
6868
path: .
6969

70+
almalinux-10:
71+
name: AlmaLinux 10 (schema, plugins)
72+
runs-on: ubuntu-latest
73+
container: almalinux:10
74+
needs: [prepare-deps, prepare-cbindgen]
75+
steps:
76+
# Cache Rust stuff.
77+
- name: Cache cargo registry
78+
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57
79+
with:
80+
path: ~/.cargo/registry
81+
key: cargo-registry
82+
83+
- name: Determine number of CPUs
84+
run: echo CPUS=$(nproc --all) >> $GITHUB_ENV
85+
86+
- name: Install system packages
87+
run: |
88+
dnf -y install dnf-plugins-core epel-release
89+
dnf config-manager --set-enabled crb
90+
dnf -y install \
91+
autoconf \
92+
automake \
93+
cargo-vendor \
94+
cbindgen \
95+
diffutils \
96+
numactl-devel \
97+
dpdk-devel \
98+
file-devel \
99+
gcc \
100+
gcc-c++ \
101+
git \
102+
hwloc \
103+
hwloc-devel \
104+
jansson-devel \
105+
jq \
106+
libtool \
107+
libyaml-devel \
108+
libnfnetlink-devel \
109+
libnetfilter_queue-devel \
110+
libnet-devel \
111+
libcap-ng-devel \
112+
libevent-devel \
113+
libmaxminddb-devel \
114+
libpcap-devel \
115+
libtool \
116+
lz4-devel \
117+
make \
118+
pcre2-devel \
119+
pkgconfig \
120+
python3-devel \
121+
python3-sphinx \
122+
python3-yaml \
123+
rust-toolset \
124+
sudo \
125+
which \
126+
zlib-devel
127+
# These packages required to build the PDF.
128+
dnf -y install \
129+
texlive-latex \
130+
texlive-cmap \
131+
texlive-collection-latexrecommended \
132+
texlive-fncychap \
133+
texlive-titlesec \
134+
texlive-tabulary \
135+
texlive-framed \
136+
texlive-wrapfig \
137+
texlive-upquote \
138+
texlive-capt-of \
139+
texlive-needspace
140+
141+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
142+
- run: git config --global --add safe.directory /__w/suricata/suricata
143+
- uses: ./.github/actions/install-cbindgen
144+
# Download and extract dependency archives created during prep
145+
# job.
146+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
147+
with:
148+
name: prep
149+
path: prep
150+
- run: tar xvf prep/suricata-update.tar.gz
151+
- run: tar xvf prep/suricata-verify.tar.gz
152+
- name: Configuring
153+
run: |
154+
./autogen.sh
155+
CFLAGS="${DEFAULT_CFLAGS}" ./configure --enable-warnings
156+
- run: make -j ${{ env.CPUS }} distcheck
157+
env:
158+
DISTCHECK_CONFIGURE_FLAGS: "--enable-unittests --enable-debug --enable-geoip --enable-profiling --enable-profiling-locks --enable-dpdk"
159+
MAKEFLAGS: "-j ${{ env.CPUS }}"
160+
- run: test -e doc/userguide/suricata.1
161+
162+
- name: Checking includes
163+
run: |
164+
cppclean src/*.h | grep "does not need to be #included" | python3 scripts/cppclean_check.py
165+
166+
- name: Building Rust documentation
167+
run: make doc
168+
working-directory: rust
169+
- run: make install install-conf
170+
- run: suricatasc -h
171+
- run: suricata-update -V
172+
- run: suricata-update
173+
174+
- name: Check if Suricata-Update example configuration files are installed
175+
run: |
176+
test -e /usr/local/lib/suricata/python/suricata/update/configs/disable.conf
177+
test -e /usr/local/lib/suricata/python/suricata/update/configs/drop.conf
178+
test -e /usr/local/lib/suricata/python/suricata/update/configs/enable.conf
179+
test -e /usr/local/lib/suricata/python/suricata/update/configs/modify.conf
180+
test -e /usr/local/lib/suricata/python/suricata/update/configs/threshold.in
181+
test -e /usr/local/lib/suricata/python/suricata/update/configs/update.yaml
182+
183+
- name: Test capture plugin
184+
working-directory: examples/plugins/ci-capture
185+
run: |
186+
make
187+
../../../src/suricata -S /dev/null --set plugins.0=./capture.so --capture-plugin=ci-capture --runmode=single -l . -c ../../../suricata.yaml
188+
cat eve.json | jq -c 'select(.dns)'
189+
test $(cat eve.json | jq -c 'select(.dns)' | wc -l) = "1"
190+
191+
- name: Test app-layer plugin
192+
working-directory: examples/plugins/altemplate
193+
run: |
194+
cargo build
195+
../../../src/suricata -S altemplate.rules --set plugins.0=./target/debug/libsuricata_altemplate.so --runmode=single -l . -c altemplate.yaml -k none -r ../../../rust/src/applayertemplate/template.pcap
196+
cat eve.json | jq -c 'select(.altemplate)'
197+
test $(cat eve.json | jq -c 'select(.altemplate)' | wc -l) = "3"
198+
# we get 2 alerts and 1 altemplate events
199+
200+
- name: Test library build in tree
201+
working-directory: examples/lib/simple
202+
run: make clean all
203+
204+
- name: Test plugin build in tree
205+
working-directory: examples/plugins/c-json-filetype
206+
run: make clean all
207+
208+
- name: Build example C custom logger plugin
209+
working-directory: examples/plugins/c-custom-loggers
210+
run: make clean all
211+
212+
- name: Install Suricata and library
213+
run: make install install-headers install-library
214+
215+
- name: Test library build out of tree
216+
working-directory: examples/lib/simple
217+
run: PATH=/usr/local/bin:$PATH make -f Makefile.example clean all
218+
219+
- name: Test custom lib example
220+
run: |
221+
make
222+
./custom -- ../../../qa/docker/pcaps/tls.pcap
223+
test $(cat eve.json |jq 'select(.stats) | .stats.decoder.pkts') = 110
224+
working-directory: examples/lib/custom
225+
226+
- name: Cleaning source directory for standalone plugin test.
227+
run: make clean
228+
229+
- name: Test plugin against installed headers
230+
working-directory: examples/plugins/c-json-filetype
231+
run: |
232+
# First use sed to pretend we are a user following our
233+
# directions for building a standalone plugin.
234+
sed -i 's/^#LIBSURICATA_CONFIG/LIBSURICATA_CONFIG/' Makefile
235+
sed -i 's/^#CPPFLAGS/CPPFLAGS/' Makefile
236+
sed -i 's/^CPPFLAGS.*HAVE_CONFIG_H//' Makefile
237+
238+
# And build.
239+
PATH=/usr/local/bin:$PATH make clean all
240+
241+
- name: Check EVE schema ordering
242+
run: ./scripts/schema-sort.py --check ./etc/schema.json
243+
70244
almalinux-9:
71245
name: AlmaLinux 9 (schema)
72246
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)