mirror of https://github.com/OISF/suricata
github-ci: non-root builder
All the GitHub CI jobs run as root inside a container. This means the testing is done in a different environment than a developer typically uses, running as a user. Add a job that does the build as a non-root user.pull/8217/head
parent
91617f479a
commit
64fab3be04
@ -0,0 +1,47 @@
|
||||
#! /usr/bin/env bash
|
||||
#
|
||||
# Helper script for Fedora build as a non-root user.
|
||||
#
|
||||
# We break the build up into parts that need to be called individually
|
||||
# to avoid outputting too much data in a single step so we can see the
|
||||
# output in the UI.
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
|
||||
case "$1" in
|
||||
cbindgen)
|
||||
# Setup cbindgen.
|
||||
mkdir -p $HOME/.cargo/bin
|
||||
cp prep/cbindgen $HOME/.cargo/bin
|
||||
chmod 755 $HOME/.cargo/bin/cbindgen
|
||||
;;
|
||||
autogen)
|
||||
./autogen.sh
|
||||
;;
|
||||
configure)
|
||||
ac_cv_func_realloc_0_nonnull="yes" \
|
||||
ac_cv_func_malloc_0_nonnull="yes" \
|
||||
LDFLAGS="-fsanitize=address" \
|
||||
CC="clang" \
|
||||
CFLAGS="$DEFAULT_CFLAGS -Wshadow -fsanitize=address -fno-omit-frame-pointer" \
|
||||
./configure \
|
||||
--enable-debug \
|
||||
--enable-unittests \
|
||||
--disable-shared \
|
||||
--enable-rust-strict \
|
||||
--enable-hiredis \
|
||||
--enable-nfqueue
|
||||
;;
|
||||
make)
|
||||
make -j2
|
||||
;;
|
||||
unit-test)
|
||||
ASAN_OPTIONS="detect_leaks=0" ./src/suricata -u -l .
|
||||
;;
|
||||
verify)
|
||||
python3 ./suricata-verify/run.py
|
||||
;;
|
||||
esac
|
Loading…
Reference in New Issue