key: ${{ github.job }}-dnf
- run: echo "keepcache=1" >> /etc/dnf/dnf.conf
+ - name: Determine number of CPUs
+ run: echo CPUS=$(nproc --all) >> $GITHUB_ENV
+
- uses: actions/checkout@v3.5.3
# Download and extract dependency archives created during prep
run: |
./autogen.sh
CFLAGS="${DEFAULT_CFLAGS}" ./configure
- - run: make -j2 distcheck
+ - run: make -j ${{ env.CPUS }} distcheck
env:
DISTCHECK_CONFIGURE_FLAGS: "--enable-unittests --enable-debug --enable-lua --enable-geoip --enable-profiling --enable-profiling-locks --enable-dpdk"
+ MAKEFLAGS: "-j ${{ env.CPUS }}"
- run: test -e doc/userguide/suricata.1
- name: Checking includes
run: |
path: ~/.cargo/registry
key: cargo-registry
+ - name: Determine number of CPUs
+ run: echo CPUS=$(nproc --all) >> $GITHUB_ENV
+
- uses: actions/checkout@v3.5.3
# Download and extract dependency archives created during prep
run: |
./autogen.sh
CFLAGS="${DEFAULT_CFLAGS}" ./configure
- make -j2
+ make -j ${{ env.CPUS }}
- run: ./scripts/setup-app-layer.py --parser --logger --detect FooBar payload
- - run: make -j2
+ - run: make -j ${{ env.CPUS }}
- run: ./src/suricata --list-app-layer-protos | grep foobar
- name: Verify rustfmt
run: rustfmt -v --check src/applayerfoobar/*.rs
key: ${{ github.job }}-dnf
- run: echo "keepcache=1" >> /etc/dnf/dnf.conf
+ - name: Determine number of CPUs
+ run: echo CPUS=$(nproc --all) >> $GITHUB_ENV
+
- uses: actions/checkout@v3.5.3
# Prebuild check for duplicate SIDs
run: |
./autogen.sh
CFLAGS="${DEFAULT_CFLAGS}" ./configure
- - run: make -j2 check
+ - run: make -j ${{ env.CPUS }} check
- name: Checking includes
run: |
cppclean src/*.h | grep "does not need to be #included" | python3 scripts/cppclean_check.py
key: ${{ github.job }}-dnf
- run: echo "keepcache=1" >> /etc/dnf/dnf.conf
+ - name: Determine number of CPUs
+ run: echo CPUS=$(nproc --all) >> $GITHUB_ENV
+
- name: Install system packages
run: |
dnf -y install dnf-plugins-core epel-release
- run: tar zxvf suricata-*.tar.gz --strip-components=1
- name: ./configure
run: CFLAGS="${DEFAULT_CFLAGS}" ./configure
- - run: make -j2
+ - run: make -j ${{ env.CPUS }}
- run: make install
- run: make install-conf
- run: suricatasc -h
key: ${{ github.job }}-dnf
- run: echo "keepcache=1" >> /etc/dnf/dnf.conf
+ - name: Determine number of CPUs
+ run: echo CPUS=$(nproc --all) >> $GITHUB_ENV
+
- name: Install system packages
run: |
dnf -y install dnf-plugins-core epel-release
- run: tar zxvf suricata-*.tar.gz --strip-components=1
- name: ./configure
run: CFLAGS="${DEFAULT_CFLAGS}" ./configure
- - run: make -j2
+ - run: make -j ${{ env.CPUS }}
- run: make install
- run: make install-conf
- run: suricatasc -h
key: ${{ github.job }}-dnf
- run: echo "keepcache=1" >> /etc/dnf/dnf.conf
+ - name: Determine number of CPUs
+ run: echo CPUS=$(nproc --all) >> $GITHUB_ENV
+
- run: |
dnf -y install \
autoconf \
CC: "clang"
RUSTFLAGS: "-C instrument-coverage"
CFLAGS: "-fprofile-instr-generate -fcoverage-mapping -O0"
- - run: make -j2
+ - run: make -j ${{ env.CPUS }}
env:
CC: "clang"
RUSTFLAGS: "-C instrument-coverage"
key: ${{ github.job }}-dnf
- run: echo "keepcache=1" >> /etc/dnf/dnf.conf
+ - name: Determine number of CPUs
+ run: echo CPUS=$(nproc --all) >> $GITHUB_ENV
+
- run: |
dnf -y install \
autoconf \
LDFLAGS: "-fsanitize=address"
ac_cv_func_realloc_0_nonnull: "yes"
ac_cv_func_malloc_0_nonnull: "yes"
- - run: make -j2
+ - run: make -j ${{ env.CPUS }}
- run: ASAN_OPTIONS="detect_leaks=0" ./src/suricata -u -l .
- name: Extracting suricata-verify
run: tar xf prep/suricata-verify.tar.gz
path: ~/.cargo/registry
key: cargo-registry
+ - name: Determine number of CPUs
+ run: echo CPUS=$(nproc --all) >> $GITHUB_ENV
+
- run: |
dnf -y install \
autoconf \
LDFLAGS: "-fsanitize=address"
ac_cv_func_realloc_0_nonnull: "yes"
ac_cv_func_malloc_0_nonnull: "yes"
- - run: make -j2
+ - run: make -j ${{ env.CPUS }}
- run: ASAN_OPTIONS="detect_leaks=0" ./src/suricata -u -l .
- name: Extracting suricata-verify
run: tar xf prep/suricata-verify.tar.gz
key: ${{ github.job }}-dnf
- run: echo "keepcache=1" >> /etc/dnf/dnf.conf
+ - name: Determine number of CPUs
+ run: echo CPUS=$(nproc --all) >> $GITHUB_ENV
+
- run: |
dnf -y install \
autoconf \
LDFLAGS: "-fsanitize=address"
ac_cv_func_realloc_0_nonnull: "yes"
ac_cv_func_malloc_0_nonnull: "yes"
- - run: make -j2
+ - run: make -j ${{ env.CPUS }}
- run: ASAN_OPTIONS="detect_leaks=0" ./src/suricata -u -l .
- name: Extracting suricata-verify
run: tar xf prep/suricata-verify.tar.gz
path: ~/.cargo/registry
key: cargo-registry
+ - name: Determine number of CPUs
+ run: echo CPUS=$(nproc --all) >> $GITHUB_ENV
+
- run: |
dnf -y install \
autoconf \
LDFLAGS: "-fsanitize=address"
ac_cv_func_realloc_0_nonnull: "yes"
ac_cv_func_malloc_0_nonnull: "yes"
- - run: make -j2
+ - run: make -j ${{ env.CPUS }}
- run: ASAN_OPTIONS="detect_leaks=0" ./src/suricata -u -l .
- name: Extracting suricata-verify
run: tar xf prep/suricata-verify.tar.gz
container: fedora:39
needs: [prepare-deps]
steps:
+ - name: Determine number of CPUs
+ run: echo CPUS=$(nproc --all) >> $GITHUB_ENV
+
- run: |
dnf -y install \
autoconf \
CC: "clang"
CFLAGS: "${{ env.DEFAULT_CFLAGS }} -Wshadow -fsanitize=address -fno-omit-frame-pointer"
- - run: sudo -u suricata -s env PATH="/home/suricata/.cargo/bin:$PATH" make -j2
+ - run: sudo -u suricata -s env PATH="/home/suricata/.cargo/bin:$PATH" make -j ${{ env.CPUS }}
working-directory: /home/suricata/suricata
- run: sudo -u suricata -s make check
key: ${{ github.job }}-dnf
- run: echo "keepcache=1" >> /etc/dnf/dnf.conf
+ - name: Determine number of CPUs
+ run: echo CPUS=$(nproc --all) >> $GITHUB_ENV
+
- run: |
dnf -y install dnf-plugins-core epel-release
dnf config-manager --set-enable crb
with:
path: ~/.cargo
key: ${{ github.job }}-cargo
+ - name: Determine number of CPUs
+ run: echo CPUS=$(nproc --all) >> $GITHUB_ENV
+
- name: Install dependencies
run: |
apt update
RUSTFLAGS: "-C instrument-coverage"
CFLAGS: "-fprofile-instr-generate -fcoverage-mapping -O0"
CXXFLAGS: "-fprofile-instr-generate -fcoverage-mapping -O0"
- - run: make -j2
+ - run: make -j ${{ env.CPUS }}
env:
CC: "clang-14"
CXX: "clang++-14"
with:
path: ~/.cargo
key: ${{ github.job }}-cargo
+ - name: Determine number of CPUs
+ run: echo CPUS=$(nproc --all) >> $GITHUB_ENV
+
- name: Install dependencies
run: |
apt update
CXXFLAGS: "-fprofile-instr-generate -fcoverage-mapping -O0 -g -fno-strict-aliasing -fsanitize=address -fno-omit-frame-pointer -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION=1 -stdlib=libc++ -Wimplicit-int-float-conversion -Wimplicit-int-conversion"
ac_cv_func_malloc_0_nonnull: "yes"
ac_cv_func_realloc_0_nonnull: "yes"
- - run: make -j2
+ - run: make -j ${{ env.CPUS }}
env:
CC: "clang-14"
CXX: "clang++-14"
path: ~/.cargo
key: ${{ github.job }}-cargo
+ - name: Determine number of CPUs
+ run: echo CPUS=$(nproc --all) >> $GITHUB_ENV
+
- name: Install dependencies
run: |
apt update
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- run: ./autogen.sh
- run: CFLAGS="$DEFAULT_CFLAGS -DNDEBUG" ./configure --enable-unittests
- - run: make -j2
+ - run: make -j ${{ env.CPUS }}
- run: make check
- run: make dist
- name: Extracting suricata-verify
with:
path: ~/.cargo
key: ${{ github.job }}-cargo
+ - name: Determine number of CPUs
+ run: echo CPUS=$(nproc --all) >> $GITHUB_ENV
+
- name: Install dependencies
run: |
apt update
path: ~/.cargo
key: ${{ github.job }}-cargo
+ - name: Determine number of CPUs
+ run: echo CPUS=$(nproc --all) >> $GITHUB_ENV
+
- name: Install dependencies
run: |
apt update
LDFLAGS: "-fsanitize=address"
ac_cv_func_malloc_0_nonnull: "yes"
ac_cv_func_realloc_0_nonnull: "yes"
- - run: make -j2
+ - run: make -j ${{ env.CPUS }}
- run: make check
- name: Extracting suricata-verify
run: tar xf prep/suricata-verify.tar.gz
path: ~/.cargo
key: ${{ github.job }}-cargo
+ - name: Determine number of CPUs
+ run: echo CPUS=$(nproc --all) >> $GITHUB_ENV
+
- name: Install dependencies
run: |
apt update
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- run: ./autogen.sh
- 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++ LDFLAGS="-fsanitize=address" ./configure --enable-fuzztargets --disable-shared
- - run: AFL_HARDEN=1 make -j2
+ - run: AFL_HARDEN=1 make -j ${{ env.CPUS }}
ubuntu-22-04-netmap-build:
name: Ubuntu 22.04 (Netmap build)
path: ~/.cargo/registry
key: cargo-registry
+ - name: Determine number of CPUs
+ run: echo CPUS=$(nproc --all) >> $GITHUB_ENV
+
- name: Install dependencies
run: |
sudo apt update
run: |
cd $GITHUB_WORKSPACE/netmap/LINUX
./configure --no-drivers
- make -j2
+ make -j ${{ env.CPUS }}
sudo make install
- uses: actions/checkout@v3.5.3
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- run: ./autogen.sh
- run: CFLAGS="${DEFAULT_CFLAGS}" ./configure --enable-netmap
- - run: make -j2
+ - run: make -j ${{ env.CPUS }}
- run: ./src/suricata --build-info | grep -E "Netmap support:\s+yes"
ubuntu-22-04-dpdk-build:
path: ~/.cargo/registry
key: cargo-registry
+ - name: Determine number of CPUs
+ run: echo CPUS=$(nproc --all) >> $GITHUB_ENV
+
- name: Install dependencies
run: |
apt update
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- run: ./autogen.sh
- run: CFLAGS="${DEFAULT_CFLAGS}" ./configure --enable-dpdk
- - run: make -j2
+ - run: make -j ${{ env.CPUS }}
- run: make check
debian-12:
path: ~/.cargo
key: ${{ github.job }}-cargo
+ - name: Determine number of CPUs
+ run: echo CPUS=$(nproc --all) >> $GITHUB_ENV
+
- run: apt update
- run: |
apt -y install \
- run: tar xf prep/suricata-verify.tar.gz
- run: ./autogen.sh
- run: CFLAGS="${DEFAULT_CFLAGS}" ./configure --enable-unittests
- - run: make -j2
+ - run: make -j ${{ env.CPUS }}
- run: make check
# -j2 caused random failures during cargo vendor
- run: make distcheck
path: ~/.cargo
key: ${{ github.job }}-cargo
+ - name: Determine number of CPUs
+ run: echo CPUS=$(nproc --all) >> $GITHUB_ENV
+
- run: apt update
- run: |
apt -y install \
path: ~/.cargo
key: ${{ github.job }}-cargo
+ - name: Determine number of CPUs
+ run: echo CPUS=$(nproc --all) >> $GITHUB_ENV
+
- run: apt update
- run: |
apt -y install \
- run: tar xf prep/suricata-verify.tar.gz
- run: ./autogen.sh
- run: CFLAGS="${DEFAULT_CFLAGS}" ./configure --enable-unittests --enable-debug --enable-lua --enable-geoip --enable-profiling --enable-profiling-locks --enable-dpdk
- - run: make -j2
+ - run: make -j ${{ env.CPUS }}
- run: make check
- name: Building Rust documentation
run: make doc
path: ~/.cargo
key: ${{ github.job }}-cargo
+ - name: Determine number of CPUs
+ run: echo CPUS=$(nproc --all) >> $GITHUB_ENV
+
- run: |
echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/sources.list
apt update
chmod 755 $HOME/.cargo/bin/cbindgen
- run: ./autogen.sh
- run: CFLAGS="${DEFAULT_CFLAGS}" ./configure --enable-unittests --enable-fuzztargets --enable-ebpf --enable-ebpf-build
- - run: make -j2
+ - run: make -j ${{ env.CPUS }}
- run: make check
- run: tar xf prep/suricata-verify.tar.gz
- name: Running suricata-verify
path: ~/.cargo
key: ${{ github.job }}-cargo
+ - name: Determine number of CPUs
+ run: echo CPUS=$(nproc --all) >> $GITHUB_ENV
+
- run: |
apt update
apt -y install \
chmod 755 $HOME/.cargo/bin/cbindgen
- run: ./autogen.sh
- run: CFLAGS="${DEFAULT_CFLAGS}" ./configure --enable-unittests --enable-fuzztargets
- - run: make -j2
+ - run: make -j ${{ env.CPUS }}
- run: make check
- run: tar xf prep/suricata-verify.tar.gz
- name: Running suricata-verify
- run: tar xvf prep/suricata-update.tar.gz
- run: ./autogen.sh
- run: CFLAGS="${DEFAULT_CFLAGS}" ./configure --enable-unittests
- - run: make -j2
+ - run: make -j ${{ env.CPUS }}
# somehow it gets included by some C++ stdlib header (case unsensitive)
- run: rm libhtp/VERSION && make check
- run: tar xf prep/suricata-verify.tar.gz