Skip to content

Commit bd89aca

Browse files
committed
github-ci: add almalinux 10 build
Based on the current AlmaLinux 9 build, with plugin tests, etc. Remove cppclean as its not installed and was previously disabled with commit 2d308c0.
1 parent 6bbba95 commit bd89aca

1 file changed

Lines changed: 170 additions & 0 deletions

File tree

.github/workflows/builds.yml

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,176 @@ 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: Building Rust documentation
163+
run: make doc
164+
working-directory: rust
165+
- run: make install install-conf
166+
- run: suricatasc -h
167+
- run: suricata-update -V
168+
- run: suricata-update
169+
170+
- name: Check if Suricata-Update example configuration files are installed
171+
run: |
172+
test -e /usr/local/lib/suricata/python/suricata/update/configs/disable.conf
173+
test -e /usr/local/lib/suricata/python/suricata/update/configs/drop.conf
174+
test -e /usr/local/lib/suricata/python/suricata/update/configs/enable.conf
175+
test -e /usr/local/lib/suricata/python/suricata/update/configs/modify.conf
176+
test -e /usr/local/lib/suricata/python/suricata/update/configs/threshold.in
177+
test -e /usr/local/lib/suricata/python/suricata/update/configs/update.yaml
178+
179+
- name: Test capture plugin
180+
working-directory: examples/plugins/ci-capture
181+
run: |
182+
make
183+
../../../src/suricata -S /dev/null --set plugins.0=./capture.so --capture-plugin=ci-capture --runmode=single -l . -c ../../../suricata.yaml
184+
cat eve.json | jq -c 'select(.dns)'
185+
test $(cat eve.json | jq -c 'select(.dns)' | wc -l) = "1"
186+
187+
- name: Test app-layer plugin
188+
working-directory: examples/plugins/altemplate
189+
run: |
190+
cargo build
191+
../../../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
192+
cat eve.json | jq -c 'select(.altemplate)'
193+
test $(cat eve.json | jq -c 'select(.altemplate)' | wc -l) = "3"
194+
# we get 2 alerts and 1 altemplate events
195+
196+
- name: Test library build in tree
197+
working-directory: examples/lib/simple
198+
run: make clean all
199+
200+
- name: Test plugin build in tree
201+
working-directory: examples/plugins/c-json-filetype
202+
run: make clean all
203+
204+
- name: Build example C custom logger plugin
205+
working-directory: examples/plugins/c-custom-loggers
206+
run: make clean all
207+
208+
- name: Install Suricata and library
209+
run: make install install-headers install-library
210+
211+
- name: Test library build out of tree
212+
working-directory: examples/lib/simple
213+
run: PATH=/usr/local/bin:$PATH make -f Makefile.example clean all
214+
215+
- name: Test custom lib example
216+
run: |
217+
make
218+
./custom -- ../../../qa/docker/pcaps/tls.pcap
219+
test $(cat eve.json |jq 'select(.stats) | .stats.decoder.pkts') = 110
220+
working-directory: examples/lib/custom
221+
222+
- name: Cleaning source directory for standalone plugin test.
223+
run: make clean
224+
225+
- name: Test plugin against installed headers
226+
working-directory: examples/plugins/c-json-filetype
227+
run: |
228+
# First use sed to pretend we are a user following our
229+
# directions for building a standalone plugin.
230+
sed -i 's/^#LIBSURICATA_CONFIG/LIBSURICATA_CONFIG/' Makefile
231+
sed -i 's/^#CPPFLAGS/CPPFLAGS/' Makefile
232+
sed -i 's/^CPPFLAGS.*HAVE_CONFIG_H//' Makefile
233+
234+
# And build.
235+
PATH=/usr/local/bin:$PATH make clean all
236+
237+
- name: Check EVE schema ordering
238+
run: ./scripts/schema-sort.py --check ./etc/schema.json
239+
70240
almalinux-9:
71241
name: AlmaLinux 9 (schema)
72242
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)