]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
github-ci: add windows build for libpcap
authorJason Ish <jason.ish@oisf.net>
Fri, 21 Jan 2022 17:55:54 +0000 (11:55 -0600)
committerVictor Julien <vjulien@oisf.net>
Sun, 7 May 2023 17:50:54 +0000 (19:50 +0200)
(cherry picked from commit 5037c86b49707f39f95e4b5b0994cc45de02cf9a)

.github/workflows/builds.yml

index d4f2bf36d0dc5946f4fcf3fbedb2d0494b083196..177766a123d4cf31a05490c8f23bd03198399f42 100644 (file)
@@ -1430,8 +1430,8 @@ jobs:
       - run: suricata-update -V
       - run: suricatasc -h
 
-  windows-msys2-mingw64:
-    name: Windows MSYS2 MINGW64
+  windows-msys2-mingw64-npcap:
+    name: Windows MSYS2 MINGW64 (NPcap)
     runs-on: windows-latest
     needs: [prepare-deps]
     defaults:
@@ -1480,3 +1480,40 @@ jobs:
           PATH="$PATH:$(pwd)" python3 ./suricata-verify/run.py
       - run: make install
       - run: suricata-update -V
+
+  windows-msys2-mingw64-libpcap:
+    name: Windows MSYS2 MINGW64 (libpcap)
+    runs-on: windows-latest
+    needs: [prepare-deps]
+    defaults:
+      run:
+        shell: msys2 {0}
+    steps:
+      - uses: actions/checkout@v2
+      - uses: msys2/setup-msys2@v2
+        with:
+          msystem: MINGW64
+          update: true
+          install: git mingw-w64-x86_64-toolchain automake1.16 automake-wrapper autoconf libtool libyaml-devel pcre-devel jansson-devel make mingw-w64-x86_64-libyaml mingw-w64-x86_64-pcre mingw-w64-x86_64-rust mingw-w64-x86_64-jansson unzip p7zip python-setuptools mingw-w64-x86_64-python-yaml mingw-w64-x86_64-jq mingw-w64-x86_64-libxml2 libpcap-devel mingw-w64-x86_64-libpcap
+      # hack: install our own cbindgen system wide as we can't get the
+      # preinstalled one to be picked up by configure
+      - name: cbindgen
+        run: cargo install --root /usr --force --debug --version 0.14.1 cbindgen
+      - uses: actions/checkout@v2
+      - uses: actions/download-artifact@v2
+        with:
+          name: prep
+          path: prep
+      - run: tar xf prep/libhtp.tar.gz
+      - run: tar xf prep/suricata-update.tar.gz
+      - run: tar xf prep/suricata-verify.tar.gz
+      - name: Build
+        run: |
+          ./autogen.sh
+          CFLAGS="-ggdb -Werror" ./configure --enable-unittests --enable-gccprotect --disable-gccmarch-native --disable-shared --with-libpcap-includes=/npcap/Include --with-libpcap-libraries=/npcap/Lib/x64
+          make -j3
+      - name: Run
+        run: |
+          ./src/suricata --build-info
+          ./src/suricata -u -l /tmp/
+          python3 ./suricata-verify/run.py -q