]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
github-ci: Fedora 32 builder with asan enabled
authorJason Ish <jason.ish@oisf.net>
Wed, 12 Aug 2020 15:06:23 +0000 (09:06 -0600)
committerVictor Julien <victor@inliniac.net>
Fri, 4 Sep 2020 11:13:38 +0000 (13:13 +0200)
Also enables -Wshadow and rust-strict to cover those cases
from Travis.

Redmine issue:
https://redmine.openinfosecfoundation.org/issues/3868

.github/workflows/builds.yml

index ee030b550335c43af82183b93a923a1fe0be042b..d4cc5022f5165e6732cdbde5ad66cb6f1345c385 100644 (file)
@@ -17,6 +17,8 @@ env:
   DEFAULT_SV_BRANCH: master
   DEFAULT_SV_PR:
 
+  DEFAULT_CFLAGS: "-Wall -Wextra -Werror -Wno-unused-parameter -Wno-unused-function"
+
 jobs:
 
   prep:
@@ -291,6 +293,78 @@ jobs:
         run: make doc
         working-directory: rust
 
+  fedora-32:
+    name: Fedora 32 (clang, asan, wshadow, rust-strict)
+    runs-on: ubuntu-latest
+    container: fedora:32
+    needs: prep
+    steps:
+
+      # Cache Rust stuff.
+      - name: Cache cargo registry
+        uses: actions/cache@v1
+        with:
+          path: ~/.cargo/registry
+          key: cargo-registry
+
+      - run: |
+          dnf -y install \
+                autoconf \
+                automake \
+                cargo \
+                ccache \
+                clang \
+                diffutils \
+                file-devel \
+                gcc \
+                gcc-c++ \
+                git \
+                jansson-devel \
+                jq \
+                lua-devel \
+                libasan \
+                libtool \
+                libyaml-devel \
+                libnfnetlink-devel \
+                libnetfilter_queue-devel \
+                libnet-devel \
+                libcap-ng-devel \
+                libevent-devel \
+                libmaxminddb-devel \
+                libpcap-devel \
+                libtool \
+                lz4-devel \
+                make \
+                nspr-devel \
+                nss-devel \
+                nss-softokn-devel \
+                pcre-devel \
+                pkgconfig \
+                python3-yaml \
+                sudo \
+                which \
+                zlib-devel
+      - run: |
+          cargo install --debug cbindgen
+          echo "::add-path::$HOME/.cargo/bin"
+      - uses: actions/checkout@v2
+      - uses: actions/download-artifact@v2
+        with:
+          name: prep
+          path: prep
+      - run: tar xf prep/libhtp.tar.gz
+      - run: ./autogen.sh
+      - run: CC="clang" CFLAGS="$DEFAULT_CFLAGS -Wshadow -fsanitize=address -fno-omit-frame-pointer" ./configure --enable-unittests --disable-shared --enable-rust-strict
+        env:
+          ac_cv_func_realloc_0_nonnull: "yes"
+          ac_cv_func_malloc_0_nonnull: "yes"
+      - run: make -j2
+      - run: ASAN_OPTIONS="detect_leaks=0" ./src/suricata -u -l .
+      - name: Extracting suricata-verify
+        run: tar xf prep/suricata-verify.tar.gz
+      - name: Running suricata-verify
+        run: python3 ./suricata-verify/run.py
+
   fedora-31:
     name: Fedora 31
     runs-on: ubuntu-latest