-
Notifications
You must be signed in to change notification settings - Fork 1.7k
CI: Align workflow with configure.ac (recursive submodules, v2 Linux job, drop x32) #3504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Easton97-Jens
wants to merge
11
commits into
owasp-modsecurity:v3/master
Choose a base branch
from
Easton97-Jens:v3/master_update_workflows
base: v3/master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+265
−0
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
85b9b0e
Create ci_new.yml
Easton97-Jens d4d0ec4
Update ci_new.yml
Easton97-Jens 5b51d17
Update ci_new.yml
Easton97-Jens a37d3a3
Update ci_new.yml
Easton97-Jens 1f7efa9
Merge branch 'owasp-modsecurity:v3/master' into v3/master_update_work…
Easton97-Jens 486a57b
Add files via upload
Easton97-Jens f4eb0f0
ci: install pcre1 dev package for explicit --with-pcre jobs
Easton97-Jens ee918fa
Delete .github/workflows/ci_v2_master.yml
Easton97-Jens d53f7dc
Delete .github/workflows/ci_v2_master.yml
Easton97-Jens 9d88665
Merge pull request #16 from Easton97-Jens/codex/review-ci_new.yml-imp…
Easton97-Jens f9d884c
Refactor CI workflow and update dependencies
Easton97-Jens File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,265 @@ | ||
| name: Quality Assurance new | ||
|
|
||
| on: | ||
| push: | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| build-linux: | ||
| name: Linux (${{ 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 | ||
|
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| platform: | ||
| - { label: "x64", arch: "amd64", configure: "" } | ||
|
|
||
| compiler: | ||
| - { label: "gcc", cc: "gcc", cxx: "g++" } | ||
| - { label: "clang", cc: "clang", cxx: "clang++" } | ||
|
|
||
| configure: | ||
| - { label: "with parser generation", opt: "--enable-parser-generation" } | ||
| - { label: "without curl", opt: "--without-curl" } | ||
| - { label: "without lua", opt: "--without-lua" } | ||
| - { label: "without maxmind", opt: "--without-maxmind" } | ||
| - { label: "without libxml", opt: "--without-libxml" } | ||
| - { label: "without geoip", opt: "--without-geoip" } | ||
| - { label: "without ssdeep", opt: "--without-ssdeep" } | ||
| - { label: "with lmdb", opt: "--with-lmdb" } | ||
| - { label: "with pcre2 (default)", opt: "" } | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
| submodules: recursive | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| sudo apt-get update -y -qq | ||
| sudo apt-get install -y \ | ||
| libyajl-dev \ | ||
| libcurl4-openssl-dev \ | ||
| liblmdb-dev \ | ||
| liblua5.2-dev \ | ||
| libmaxminddb-dev \ | ||
| libpcre2-dev \ | ||
| libxml2-dev \ | ||
| libfuzzy-dev \ | ||
| pcre2-utils \ | ||
| bison \ | ||
| flex \ | ||
| pkg-config | ||
|
|
||
|
|
||
| - name: Run build preparation script | ||
| 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: Compile | ||
| run: make -j "$(nproc)" | ||
|
|
||
| - name: Run tests | ||
| run: make check | ||
|
|
||
| build-macos: | ||
| name: macOS (${{ matrix.configure.label }}) | ||
| runs-on: macos-15 | ||
|
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| configure: | ||
| - { label: "with parser generation", opt: "--enable-parser-generation" } | ||
| - { label: "without curl", opt: "--without-curl" } | ||
| - { label: "without lua", opt: "--without-lua" } | ||
| - { label: "without maxmind", opt: "--without-maxmind" } | ||
| - { label: "without libxml", opt: "--without-libxml" } | ||
| - { label: "without geoip", opt: "--without-geoip" } | ||
| - { label: "without ssdeep", opt: "--without-ssdeep" } | ||
| - { label: "with lmdb", opt: "--with-lmdb" } | ||
| - { label: "with pcre2 (default)", opt: "" } | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
| submodules: recursive | ||
|
|
||
| - name: Install dependencies | ||
| # curl and pcre2 are typically already available in the macOS runner image | ||
| run: | | ||
| brew install autoconf \ | ||
| automake \ | ||
| libtool \ | ||
| yajl \ | ||
| lmdb \ | ||
| lua \ | ||
| libmaxminddb \ | ||
| libxml2 \ | ||
| ssdeep \ | ||
| pcre \ | ||
| bison \ | ||
| flex | ||
|
|
||
| - name: Run build preparation script | ||
| run: ./build.sh | ||
|
|
||
| - name: Configure | ||
| run: ./configure ${{ matrix.configure.opt }} --enable-assertions=yes | ||
|
|
||
| - uses: ammaraskar/gcc-problem-matcher@master | ||
|
|
||
| - name: Compile | ||
| run: make -j "$(sysctl -n hw.logicalcpu)" | ||
|
|
||
| - name: Run tests | ||
| run: make check | ||
|
|
||
| build-windows: | ||
| name: Windows (${{ matrix.platform.label }}, ${{ matrix.configure.label }}) | ||
| runs-on: windows-2025 | ||
|
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| platform: | ||
| - { label: "x64", arch: "x86_64" } | ||
| configuration: [Release] | ||
| configure: | ||
| - { label: "full", opt: "" } | ||
| - { label: "without curl", opt: "-DWITH_CURL=OFF" } | ||
| - { label: "without lua", opt: "-DWITH_LUA=OFF" } | ||
| - { label: "without maxmind", opt: "-DWITH_MAXMIND=OFF" } | ||
| - { label: "without libxml", opt: "-DWITH_LIBXML2=OFF" } | ||
| - { label: "with lmdb", opt: "-DWITH_LMDB=ON" } | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
| submodules: recursive | ||
|
|
||
| - name: Install Conan package manager | ||
| run: | | ||
| pip3 install conan --upgrade | ||
| conan profile detect | ||
|
|
||
| - uses: ammaraskar/msvc-problem-matcher@master | ||
|
|
||
| - name: Build project | ||
| shell: cmd | ||
| run: vcbuild.bat ${{ matrix.configuration }} ${{ matrix.platform.arch }} NO_ASAN "${{ matrix.configure.opt }}" | ||
|
|
||
| - name: Prepare 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 unsupported tests 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 | ||
|
|
||
| cppcheck: | ||
| name: Static analysis (cppcheck) | ||
| runs-on: macos-15 | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
| submodules: recursive | ||
|
|
||
| - name: Install cppcheck | ||
| run: | | ||
| brew install autoconf automake libtool cppcheck | ||
|
|
||
| - name: Configure project | ||
| run: | | ||
| ./build.sh | ||
| ./configure | ||
|
|
||
| - name: Run cppcheck | ||
| run: make check-static | ||
|
|
||
| cppcheck-linux: | ||
| name: Static analysis (cppcheck, Linux, debian:sid) | ||
| runs-on: ubuntu-latest | ||
| container: debian:trixie | ||
|
|
||
| steps: | ||
| - name: Install basic tools | ||
| run: | | ||
| apt-get update | ||
| apt-get install -y git | ||
|
|
||
| - name: Mark repo as safe for git | ||
| run: git config --global --add safe.directory $GITHUB_WORKSPACE | ||
|
|
||
| - uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
| submodules: recursive | ||
|
|
||
|
|
||
| - name: Install dependencies (v2 style) | ||
| run: | | ||
| apt-get update | ||
| apt-get install -y \ | ||
| autoconf \ | ||
| automake \ | ||
| build-essential \ | ||
| libtool \ | ||
| pkg-config \ | ||
| cppcheck \ | ||
| libyajl-dev \ | ||
| libcurl4-openssl-dev \ | ||
| liblmdb-dev \ | ||
| liblua5.2-dev \ | ||
| libmaxminddb-dev \ | ||
| libpcre2-dev \ | ||
| libxml2-dev \ | ||
| libfuzzy-dev \ | ||
| pcre2-utils \ | ||
| bison \ | ||
| flex | ||
|
|
||
| - name: Run build preparation script | ||
| run: ./build.sh | ||
|
|
||
| - name: Configure project | ||
| run: ./configure | ||
|
|
||
| - name: Run cppcheck | ||
| run: make check-static | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trixieis the current stable release of Debian (Debian 13). It contains 2.17.1, see the packages site.Sid contains 2.19.0, and here that's the point: we definitely want to use the last
cppcheckversion, as soon as possible.I saw Copilot suggestion, but I'm afraid in this case you shouldn't follow it :).