From 5d185d4cf1a346c773481aaeb5735cf20880bf88 Mon Sep 17 00:00:00 2001 From: Easton97-Jens <66330090+Easton97-Jens@users.noreply.github.com> Date: Tue, 27 Oct 2026 05:51:01 +0100 Subject: [PATCH 1/5] ci: remove duplicate Windows build job The Windows job in ci.yml duplicates the windows-2022 x64 Release build and test matrix already provided by ci_new.yml. Remove the redundant job so each of the six configurations runs once per event while retaining the existing Windows coverage. --- .github/workflows/ci.yml | 58 ---------------------------------------- 1 file changed, 58 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dee0ae05d..f6ca3516f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -104,61 +104,3 @@ jobs: run: make -j `nproc` - name: check run: make check - - build-windows: - name: Windows (${{ matrix.platform.label }}, ${{ matrix.configure.label }}) - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [windows-2022] - platform: - - {label: "x64", arch: "x86_64"} - configuration: [Release] - configure: - - {label: "full", opt: "" } - - {label: "wo curl", opt: "-DWITH_CURL=OFF" } - - {label: "wo lua", opt: "-DWITH_LUA=OFF" } - - {label: "wo maxmind", opt: "-DWITH_MAXMIND=OFF" } - - {label: "wo libxml", opt: "-DWITH_LIBXML2=OFF" } - - {label: "with lmdb", opt: "-DWITH_LMDB=ON" } - steps: - - uses: actions/checkout@v6 - with: - submodules: recursive - fetch-depth: 0 - - name: Install Conan - run: | - pip3 install conan --upgrade - conan profile detect - - uses: ammaraskar/msvc-problem-matcher@master - - name: Build ${{ matrix.configuration }} ${{ matrix.platform.arch }} ${{ matrix.configure.label }} - shell: cmd - run: vcbuild.bat ${{ matrix.configuration }} ${{ matrix.platform.arch }} NO_ASAN "${{ matrix.configure.opt }}" - - name: Set up test environment - working-directory: build\win32\build\${{ matrix.configuration }} - env: - BASE_DIR: ..\..\..\.. - shell: cmd - run: | - copy unit_tests.exe %BASE_DIR%\test - copy regression_tests.exe %BASE_DIR%\test - copy libModSecurity.dll %BASE_DIR%\test - copy %BASE_DIR%\unicode.mapping %BASE_DIR%\test - md \tmp - md \bin - copy "C:\Program Files\Git\usr\bin\echo.exe" \bin - copy "C:\Program Files\Git\usr\bin\echo.exe" \bin\echo - - name: Disable tests that don't work on Windows - working-directory: test\test-cases\regression - shell: cmd - run: | - jq "map(if .title == \"Test match variable (1/n)\" then .enabled = 0 else . end)" issue-2423-msg-in-chain.json > tmp.json && move /Y tmp.json issue-2423-msg-in-chain.json - jq "map(if .title == \"Test match variable (2/n)\" then .enabled = 0 else . end)" issue-2423-msg-in-chain.json > tmp.json && move /Y tmp.json issue-2423-msg-in-chain.json - jq "map(if .title == \"Test match variable (3/n)\" then .enabled = 0 else . end)" issue-2423-msg-in-chain.json > tmp.json && move /Y tmp.json issue-2423-msg-in-chain.json - jq "map(if .title == \"Variable offset - FILES_NAMES\" then .enabled = 0 else . end)" offset-variable.json > tmp.json && move /Y tmp.json offset-variable.json - - name: Run tests - working-directory: build\win32\build - run: | - ctest -C ${{ matrix.configuration }} --output-on-failure - From 6b9e695e291b21ae092c199e983f26e50300fa61 Mon Sep 17 00:00:00 2001 From: Easton97-Jens Date: Tue, 27 Oct 2026 20:31:06 +0100 Subject: [PATCH 2/5] ci: consolidate QA and preserve legacy Linux coverage Move the existing Ubuntu 22.04 x32/x64 matrix into a self-contained build-linux-old job in ci_new.yml. Give its checks distinct old/OS names and preserve the existing compiler, feature, multiarch and build steps. Remove ci.yml so the legacy matrix runs once alongside the current QA jobs. --- .github/workflows/ci.yml | 106 ----------------------------------- .github/workflows/ci_new.yml | 102 +++++++++++++++++++++++++++++++++ 2 files changed, 102 insertions(+), 106 deletions(-) delete mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index f6ca3516f..000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,106 +0,0 @@ -name: Quality Assurance - -on: - push: - pull_request: - -jobs: - build-linux: - name: Linux (${{ matrix.platform.label }}, ${{ matrix.compiler.label }}, ${{ matrix.configure.label }}) - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-22.04] - platform: - - {label: "x64", arch: "amd64", configure: ""} - - {label: "x32", arch: "i386", configure: "PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig CFLAGS=-m32 CXXFLAGS=-m32 LDFLAGS=-m32"} - compiler: - - {label: "gcc", cc: "gcc", cxx: "g++"} - - {label: "clang", cc: "clang", cxx: "clang++"} - configure: - - {label: "with parser generation", opt: "--enable-parser-generation" } - - {label: "wo curl", opt: "--without-curl" } - - {label: "wo lua", opt: "--without-lua" } - - {label: "wo maxmind", opt: "--without-maxmind" } - - {label: "wo libxml", opt: "--without-libxml" } - - {label: "wo geoip", opt: "--without-geoip" } - - {label: "wo ssdeep", opt: "--without-ssdeep" } - - {label: "with lmdb", opt: "--with-lmdb" } - - {label: "with pcre", opt: "--with-pcre" } - exclude: - - platform: {label: "x32"} - configure: {label: "wo geoip"} - - platform: {label: "x32"} - configure: {label: "wo ssdeep"} - steps: - - name: Detect latest Lua dev package - id: detect_lua - shell: bash - run: | - set -euo pipefail - - sudo apt-get update -y -qq - - CANDIDATES="$(apt-cache pkgnames | grep -E '^liblua[0-9]+\.[0-9]+-dev$' || true)" - - if [ -z "$CANDIDATES" ]; then - echo "No libluaX.Y-dev package found" - exit 1 - fi - - BEST_PKG="$( - printf '%s\n' "$CANDIDATES" \ - | sed -E 's/^liblua([0-9]+\.[0-9]+)-dev$/\1 &/' \ - | sort -V \ - | tail -n1 \ - | awk '{print $2}' - )" - - if [ -z "$BEST_PKG" ]; then - echo "Failed to determine Lua package" - exit 1 - fi - - echo "lua_pkg=$BEST_PKG" >> "$GITHUB_OUTPUT" - echo "Using $BEST_PKG" - - - name: Setup Dependencies (common) - run: | - sudo dpkg --add-architecture ${{ matrix.platform.arch }} - sudo apt-get update -y -qq - sudo apt-get install -y libyajl-dev:${{ matrix.platform.arch }} \ - libcurl4-openssl-dev:${{ matrix.platform.arch }} \ - liblmdb-dev:${{ matrix.platform.arch }} \ - ${{ steps.detect_lua.outputs.lua_pkg }}:${{ matrix.platform.arch }} \ - libmaxminddb-dev:${{ matrix.platform.arch }} \ - libpcre2-dev:${{ matrix.platform.arch }} \ - pcre2-utils:${{ matrix.platform.arch }} \ - bison flex python3 python3-venv - - name: Setup Dependencies (x32) - if: ${{ matrix.platform.label == 'x32' }} - run: | - sudo apt-get install g++-multilib - sudo apt-get install -y libxml2-dev:${{ matrix.platform.arch }} \ - libpcre3-dev:${{ matrix.platform.arch }} - - name: Setup Dependencies (x64) - if: ${{ matrix.platform.label == 'x64' }} - run: | - sudo apt-get install -y libfuzzy-dev:${{ matrix.platform.arch }} - - - uses: actions/checkout@v6 - with: - submodules: recursive - fetch-depth: 0 - - name: build.sh - run: ./build.sh - - name: configure - env: - CC: ${{ matrix.compiler.cc }} - CXX: ${{ matrix.compiler.cxx }} - run: ./configure ${{ matrix.platform.configure }} ${{ matrix.configure.opt }} --enable-assertions=yes - - uses: ammaraskar/gcc-problem-matcher@master - - name: make - run: make -j `nproc` - - name: check - run: make check diff --git a/.github/workflows/ci_new.yml b/.github/workflows/ci_new.yml index fd0845243..2d0dd621d 100644 --- a/.github/workflows/ci_new.yml +++ b/.github/workflows/ci_new.yml @@ -5,6 +5,108 @@ on: pull_request: jobs: + # Keep legacy Ubuntu 22.04 coverage, including x32, in a self-contained job. + # Remove this job when the legacy matrix is no longer needed. + build-linux-old: + name: Linux (old, ${{ matrix.os }}, ${{ matrix.platform.label }}, ${{ matrix.compiler.label }}, ${{ matrix.configure.label }}) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-22.04] + platform: + - {label: "x64", arch: "amd64", configure: ""} + - {label: "x32", arch: "i386", configure: "PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig CFLAGS=-m32 CXXFLAGS=-m32 LDFLAGS=-m32"} + compiler: + - {label: "gcc", cc: "gcc", cxx: "g++"} + - {label: "clang", cc: "clang", cxx: "clang++"} + configure: + - {label: "with parser generation", opt: "--enable-parser-generation" } + - {label: "wo curl", opt: "--without-curl" } + - {label: "wo lua", opt: "--without-lua" } + - {label: "wo maxmind", opt: "--without-maxmind" } + - {label: "wo libxml", opt: "--without-libxml" } + - {label: "wo geoip", opt: "--without-geoip" } + - {label: "wo ssdeep", opt: "--without-ssdeep" } + - {label: "with lmdb", opt: "--with-lmdb" } + - {label: "with pcre", opt: "--with-pcre" } + exclude: + - platform: {label: "x32"} + configure: {label: "wo geoip"} + - platform: {label: "x32"} + configure: {label: "wo ssdeep"} + steps: + - name: Detect latest Lua dev package + id: detect_lua + shell: bash + run: | + set -euo pipefail + + sudo apt-get update -y -qq + + CANDIDATES="$(apt-cache pkgnames | grep -E '^liblua[0-9]+\.[0-9]+-dev$' || true)" + + if [ -z "$CANDIDATES" ]; then + echo "No libluaX.Y-dev package found" + exit 1 + fi + + BEST_PKG="$( + printf '%s\n' "$CANDIDATES" \ + | sed -E 's/^liblua([0-9]+\.[0-9]+)-dev$/\1 &/' \ + | sort -V \ + | tail -n1 \ + | awk '{print $2}' + )" + + if [ -z "$BEST_PKG" ]; then + echo "Failed to determine Lua package" + exit 1 + fi + + echo "lua_pkg=$BEST_PKG" >> "$GITHUB_OUTPUT" + echo "Using $BEST_PKG" + + - name: Setup Dependencies (common) + run: | + sudo dpkg --add-architecture ${{ matrix.platform.arch }} + sudo apt-get update -y -qq + sudo apt-get install -y libyajl-dev:${{ matrix.platform.arch }} \ + libcurl4-openssl-dev:${{ matrix.platform.arch }} \ + liblmdb-dev:${{ matrix.platform.arch }} \ + ${{ steps.detect_lua.outputs.lua_pkg }}:${{ matrix.platform.arch }} \ + libmaxminddb-dev:${{ matrix.platform.arch }} \ + libpcre2-dev:${{ matrix.platform.arch }} \ + pcre2-utils:${{ matrix.platform.arch }} \ + bison flex python3 python3-venv + - name: Setup Dependencies (x32) + if: ${{ matrix.platform.label == 'x32' }} + run: | + sudo apt-get install g++-multilib + sudo apt-get install -y libxml2-dev:${{ matrix.platform.arch }} \ + libpcre3-dev:${{ matrix.platform.arch }} + - name: Setup Dependencies (x64) + if: ${{ matrix.platform.label == 'x64' }} + run: | + sudo apt-get install -y libfuzzy-dev:${{ matrix.platform.arch }} + + - uses: actions/checkout@v6 + with: + submodules: recursive + fetch-depth: 0 + - name: build.sh + run: ./build.sh + - name: configure + env: + CC: ${{ matrix.compiler.cc }} + CXX: ${{ matrix.compiler.cxx }} + run: ./configure ${{ matrix.platform.configure }} ${{ matrix.configure.opt }} --enable-assertions=yes + - uses: ammaraskar/gcc-problem-matcher@master + - name: make + run: make -j `nproc` + - name: check + run: make check + build-linux: name: Linux (${{ matrix.platform.label }}, ${{ matrix.compiler.label }}, ${{ matrix.configure.label }}) From bddc33e364bb1ccaaf5725987454ceb305763cd7 Mon Sep 17 00:00:00 2001 From: Easton97-Jens Date: Tue, 27 Oct 2026 20:40:43 +0100 Subject: [PATCH 3/5] ci: expand Linux and macOS runner coverage Add Ubuntu 26.04 and xcode-27 from PR #3653 while keeping PCRE1 on Ubuntu 24.04 only in the modern Linux matrix. Include the OS in Linux and macOS check names, and use checkout v7 throughout the QA workflow. Keep legacy Ubuntu 22.04 x32/x64 coverage in its independent old job. --- .github/workflows/ci_new.yml | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci_new.yml b/.github/workflows/ci_new.yml index 2d0dd621d..104170db8 100644 --- a/.github/workflows/ci_new.yml +++ b/.github/workflows/ci_new.yml @@ -90,7 +90,7 @@ jobs: run: | sudo apt-get install -y libfuzzy-dev:${{ matrix.platform.arch }} - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 with: submodules: recursive fetch-depth: 0 @@ -108,15 +108,16 @@ jobs: run: make check build-linux: - name: Linux (${{ matrix.platform.label }}, ${{ matrix.compiler.label }}, ${{ matrix.configure.label }}) + name: Linux (${{ matrix.os }}, ${{ matrix.platform.label }}, ${{ matrix.compiler.label }}, ${{ matrix.configure.label }}) # Ubuntu 24.04 does not provide native 32-bit (i386) installation images. # Only amd64 (x86_64) is officially supported. 32-bit has been removed from this matrix. - runs-on: ubuntu-24.04 + runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: + os: [ubuntu-24.04,ubuntu-26.04] platform: - { label: "x64", arch: "amd64", configure: "" } @@ -135,9 +136,13 @@ jobs: - { label: "with lmdb", opt: "--with-lmdb" } - { label: "with pcre2 (default)", opt: "" } - { label: "with pcre", opt: "--with-pcre" } + exclude: + # Ubuntu 26.04 no longer provides the PCRE1 development package. + - os: ubuntu-26.04 + configure: { label: "with pcre", opt: "--with-pcre" } steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 with: fetch-depth: 0 submodules: recursive @@ -186,13 +191,16 @@ jobs: libxml2-dev \ libfuzzy-dev \ pcre2-utils \ - libpcre3-dev \ bison \ flex \ pkg-config \ python3 \ python3-venv + - name: Install PCRE1 development package + if: matrix.os != 'ubuntu-26.04' + run: sudo apt-get install -y libpcre3-dev + - name: Show Lua installation run: | which lua || true @@ -217,13 +225,13 @@ jobs: run: make check build-macos: - name: macOS (${{ matrix.configure.label }}) + name: macOS (${{ matrix.os }}, ${{ matrix.configure.label }}) runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - os: [macos-15, macos-26] + os: [macos-15,macos-26,xcode-27] configure: - { label: "with parser generation", opt: "--enable-parser-generation" } - { label: "without curl", opt: "--without-curl" } @@ -237,7 +245,7 @@ jobs: - { label: "with pcre", opt: "--with-pcre" } steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 with: fetch-depth: 0 submodules: recursive @@ -291,7 +299,7 @@ jobs: - { label: "with lmdb", opt: "-DWITH_LMDB=ON" } steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 with: fetch-depth: 0 submodules: recursive @@ -340,7 +348,7 @@ jobs: runs-on: macos-26 steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 with: fetch-depth: 0 submodules: recursive @@ -371,7 +379,7 @@ jobs: - name: Mark repo as safe for git run: git config --global --add safe.directory $GITHUB_WORKSPACE - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 with: fetch-depth: 0 submodules: recursive From 64def1feb561dc7b6cdc5e3b627ad0964b9a06ad Mon Sep 17 00:00:00 2001 From: Easton97-Jens Date: Sat, 31 Oct 2026 10:39:02 +0100 Subject: [PATCH 4/5] ci: address consolidation review feedback Keep the README badge working by retaining the Quality Assurance workflow name and make the legacy x32 package installation non-interactive. Run the default and parser-generation configurations on Xcode 27 while preserving full coverage on the two macOS runners. --- .github/workflows/ci_new.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_new.yml b/.github/workflows/ci_new.yml index 77f12922b..dbae8ef3c 100644 --- a/.github/workflows/ci_new.yml +++ b/.github/workflows/ci_new.yml @@ -1,4 +1,4 @@ -name: Quality Assurance new +name: Quality Assurance on: push: @@ -82,7 +82,7 @@ jobs: - name: Setup Dependencies (x32) if: ${{ matrix.platform.label == 'x32' }} run: | - sudo apt-get install g++-multilib + sudo apt-get install -y g++-multilib sudo apt-get install -y libxml2-dev:${{ matrix.platform.arch }} \ libpcre3-dev:${{ matrix.platform.arch }} - name: Setup Dependencies (x64) @@ -231,7 +231,7 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-15,macos-26,xcode-27] + os: [macos-15,macos-26] configure: - { label: "with parser generation", opt: "--enable-parser-generation" } - { label: "without curl", opt: "--without-curl" } @@ -244,6 +244,12 @@ jobs: - { label: "with pcre2 (default)", opt: "" } - { label: "with pcre", opt: "--with-pcre" } + include: + - os: xcode-27 + configure: { label: "with pcre2 (default)", opt: "" } + - os: xcode-27 + configure: { label: "with parser generation", opt: "--enable-parser-generation" } + steps: - uses: actions/checkout@v7 with: From 1bf48289af296c832ae80a9134603f09a21f867a Mon Sep 17 00:00:00 2001 From: Easton97-Jens <66330090+Easton97-Jens@users.noreply.github.com> Date: Sat, 31 Oct 2026 10:56:55 +0100 Subject: [PATCH 5/5] Update ci_new.yml --- .github/workflows/ci_new.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_new.yml b/.github/workflows/ci_new.yml index dbae8ef3c..6821e4424 100644 --- a/.github/workflows/ci_new.yml +++ b/.github/workflows/ci_new.yml @@ -88,8 +88,10 @@ jobs: - name: Setup Dependencies (x64) if: ${{ matrix.platform.label == 'x64' }} run: | - sudo apt-get install -y libfuzzy-dev:${{ matrix.platform.arch }} - + sudo apt-get install -y libfuzzy-dev:${{ matrix.platform.arch }} \ + libxml2-dev:${{ matrix.platform.arch }} \ + libpcre3-dev:${{ matrix.platform.arch }} + - uses: actions/checkout@v7 with: submodules: recursive