]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
github-ci: add minimal build for Ubuntu and AlmaLinux
authorLukas Sismis <lsismis@oisf.net>
Thu, 11 Apr 2024 20:55:22 +0000 (22:55 +0200)
committerLukas Sismis <lukas.sismis@gmail.com>
Sat, 22 Jun 2024 06:40:01 +0000 (08:40 +0200)
(cherry picked from commit cd7c35eb5a047d7bf10c2abadb458b4140db9676)

.github/workflows/builds.yml
scripts/docs-almalinux9-minimal-build.sh [new file with mode: 0755]
scripts/docs-ubuntu-debian-minimal-build.sh [new file with mode: 0755]

index 9888d3664c8d80f4f62040b9242bab088d82a77d..c82d7eae62426ff511e9a15dda23787a7533a113 100644 (file)
@@ -1262,6 +1262,57 @@ jobs:
           else
             exit 0
           fi
+  almalinux-9-minimal-recommended-dependecies:
+    name: AlmaLinux 9 (Minimal/Recommended Build)
+    runs-on: ubuntu-latest
+    container: almalinux:9
+    needs: [prepare-deps]
+    steps:
+      # Cache Rust stuff.
+      - name: Cache cargo registry
+        uses: actions/cache@v3.3.1
+        with:
+          path: ~/.cargo
+          key: ${{ github.job }}-cargo
+
+      - name: Cache RPMs
+        uses: actions/cache@v3.3.1
+        with:
+          path: /var/cache/dnf
+          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 git dependencies
+        run: |
+          dnf -y install \
+            sudo \
+            git \
+            libtool \
+            which
+
+      - name: Install Almalinux 9 extra repositories
+        run : |
+          dnf -y update
+          dnf -y install dnf-plugins-core epel-release
+          dnf config-manager --set-enabled crb
+
+      - uses: actions/checkout@v3.5.3
+      - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
+        with:
+          name: prep
+          path: prep
+      - run: tar xf prep/libhtp.tar.gz
+      - run: ./autogen.sh
+
+      - name: Install minimal dependencies
+        run: ./scripts/docs-almalinux9-minimal-build.sh
+
+      - run: CFLAGS="${DEFAULT_CFLAGS}" ./configure
+      - run: make -j ${{ env.CPUS }}
+      - run: ./src/suricata --build-info # check if we can run Suricata
 
   ubuntu-22-04-cov-ut:
     name: Ubuntu 22.04 (unittests coverage)
@@ -1870,6 +1921,45 @@ jobs:
       - run: make -j2
       - run: ./src/suricata --build-info | grep -E "Netmap support:\s+yes"
 
+  ubuntu-22-04-minimal-recommended-build:
+    name: Ubuntu 22.04 (Minimal/Recommended Build)
+    needs: [prepare-deps, prepare-cbindgen]
+    runs-on: ubuntu-22.04
+    steps:
+      # Cache Rust stuff.
+      - name: Cache cargo registry
+        uses: actions/cache@v3.3.1
+        with:
+          path: ~/.cargo/registry
+          key: cargo-registry
+
+      - name: Determine number of CPUs
+        run: echo CPUS=$(nproc --all) >> $GITHUB_ENV
+
+      - name: Install git dependencies
+        run: |
+          sudo apt update
+          sudo apt -y install \
+            git \
+            libtool
+
+      - uses: actions/checkout@v3.5.3
+      - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
+        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
+      - run: ./autogen.sh
+      
+      - name: Install minimal dependencies
+        run: ./scripts/docs-ubuntu-debian-minimal-build.sh
+
+      - run: CFLAGS="${DEFAULT_CFLAGS}" ./configure
+      - run: make -j ${{ env.CPUS }}
+      - run: ./src/suricata --build-info # check if we can run Suricata
+
   ubuntu-22-04-dpdk-build:
     name: Ubuntu 22.04 (DPDK Build)
     runs-on: ubuntu-22.04
diff --git a/scripts/docs-almalinux9-minimal-build.sh b/scripts/docs-almalinux9-minimal-build.sh
new file mode 100755 (executable)
index 0000000..2b569ff
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+# Serves for RPM-based docs and is verified by Github Actions
+
+# install-guide-documentation tag start: Minimal RPM-based dependencies
+sudo dnf install -y rustc cargo cbindgen
+sudo dnf install -y gcc gcc-c++ jansson-devel libpcap-devel \
+    libyaml-devel make pcre2-devel zlib-devel
+# install-guide-documentation tag end: Minimal RPM-based dependencies
\ No newline at end of file
diff --git a/scripts/docs-ubuntu-debian-minimal-build.sh b/scripts/docs-ubuntu-debian-minimal-build.sh
new file mode 100755 (executable)
index 0000000..41d163a
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+# Serves for Ubuntu/Debian docs and is verified by Github Actions
+
+# install-guide-documentation tag start: Minimal dependencies
+sudo apt -y install autoconf automake build-essential cargo \
+    cbindgen libjansson-dev libpcap-dev libpcre2-dev libtool \
+    libyaml-dev make pkg-config rustc zlib1g-dev
+# install-guide-documentation tag end: Minimal dependencies
\ No newline at end of file