Skip to content

ci: update workflows (checkout v6, recursive submodules), mbedTLS v4 compatibility, Windows fix#3529

Open
Easton97-Jens wants to merge 11 commits intoowasp-modsecurity:v3/masterfrom
Easton97-Jens:v3/master_update_workflows
Open

ci: update workflows (checkout v6, recursive submodules), mbedTLS v4 compatibility, Windows fix#3529
Easton97-Jens wants to merge 11 commits intoowasp-modsecurity:v3/masterfrom
Easton97-Jens:v3/master_update_workflows

Conversation

@Easton97-Jens
Copy link
Copy Markdown
Contributor

what

  • Integrated ci_new.yml from PR fix(ci): pin Lua version on 5.4 #3524
  • Updated ci.yml and aligned it with the new workflow structure
  • Removed GeoIP-related steps from CI
  • Unified workflows so that all jobs run consistently
  • Updated actions/checkout from v4 to v6
  • Changed submodules: true to recursive
  • Adjusted configuration for better compatibility with mbedTLS v4
  • Fixed Windows workflow so tests now pass successfully

why

  • PR fix(ci): pin Lua version on 5.4 #3524 introduces important Lua version pinning changes that must be reflected in CI
  • The previous ci.yml was not fully compatible with these updates
  • Removing GeoIP reduces CI complexity and potential failure points
  • Unified workflows improve maintainability and consistency
  • actions/checkout@v6 is the newer and recommended version
  • Using recursive ensures all submodules are properly fetched
  • Adjustments were required for compatibility with mbedTLS v4
  • Windows tests were previously failing and are now fixed

references

pull_request:

env:
LUA_VERSION: "5.4"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove all hardcoded Lua versions from all workflow. Let the system to choose the right version. I think it's a good feedback if we need to align that in the code (and the build system).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note here, we already fixed the Lua version issue in #3525.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the Lua version be selected dynamically by the system going forward, or do we want to keep a fixed version (at least for certain environments like Linux)?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should let the system to choose the right version. Usually, macOS uses the recent releases, which is good, because we can get notification about that.

If we use a fixed version, then we can forget to update the code.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

macOS now follows the previous behavior (using the default system setup), while Linux has been updated to dynamically detect and use the currently available Lua version.

This should give us more flexibility on Linux while keeping macOS stable and aligned with its typical environment.

Updated CI workflow to dynamically detect and install the latest Lua development package instead of using a fixed version.
@Easton97-Jens Easton97-Jens requested a review from airween March 29, 2026 16:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the GitHub Actions CI workflows to align job structure/behavior across OSes, adjust dependency installation (notably Lua), and fetch submodules recursively.

Changes:

  • Added Lua package auto-detection on Linux and adjusted dependency install lists (including Python tooling).
  • Updated checkout configuration to use recursive submodules and changed the referenced actions/checkout major version.
  • Tweaked workflow matrices/strategy settings (e.g., fail-fast: false) and removed GeoIP-related CI steps.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 9 comments.

File Description
.github/workflows/ci_new.yml Updates the “new” CI workflow: Linux/macOS/Windows jobs, Lua detection, dependency installs, recursive submodules, and cppcheck jobs.
.github/workflows/ci.yml Aligns the primary CI workflow with the new structure: Lua detection, dependency updates, recursive submodules, and fail-fast behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -56,8 +81,9 @@ jobs:
libpcre3-dev \
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

libpcre3-dev is installed on the Ubuntu 24.04 runner, but Ubuntu 24.04 no longer ships PCRE1 development packages by default (CI will fail during apt-get install). Consider dropping the --with-pcre variant on 24.04, building PCRE1 from source, or switching the matrix to PCRE2-only on 24.04.

Suggested change
libpcre3-dev \

Copilot uses AI. Check for mistakes.
bison \
flex
flex \
python3
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description references integrating #3524 (pin Lua to 5.4 on macOS), but this job installs whatever brew install lua currently resolves to. If Lua 5.5+ is still incompatible, please pin the formula/version explicitly (or add a setup step that selects Lua 5.4) to keep macOS CI deterministic.

Copilot uses AI. Check for mistakes.
Comment on lines +219 to +223
brew install autoconf \
automake \
libtool \
cppcheck
- uses: actions/checkout@v4
cppcheck \
python3
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Homebrew generally provides the python formula (which installs the python3 binary) rather than a python3 formula. brew install python3 is likely to fail; use brew install python (or omit this if the runner image already includes a suitable Python).

Copilot uses AI. Check for mistakes.
- name: Install cppcheck
run: |
brew install autoconf automake libtool cppcheck libmaxminddb yajl lua lmdb ssdeep
brew install autoconf automake libtool cppcheck libmaxminddb yajl lua lmdb ssdeep python3
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Homebrew generally provides the python formula (which installs the python3 binary) rather than a python3 formula. brew install python3 is likely to fail; use brew install python (or omit this if the runner image already includes a suitable Python).

Suggested change
brew install autoconf automake libtool cppcheck libmaxminddb yajl lua lmdb ssdeep python3
brew install autoconf automake libtool cppcheck libmaxminddb yajl lua lmdb ssdeep python

Copilot uses AI. Check for mistakes.
bison \
flex
flex \
python3
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Homebrew generally provides the python formula (which installs the python3 binary) rather than a python3 formula. brew install python3 is likely to fail; use brew install python (or omit this if the runner image already includes a suitable Python).

Suggested change
python3
python

Copilot uses AI. Check for mistakes.
Comment on lines +45 to +49
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
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This step selects the highest available libluaX.Y-dev at runtime, which makes CI non-reproducible across time and can silently jump to an unsupported Lua version. Consider pinning to the known-supported Lua version(s) (especially since #3524 was introduced to avoid unexpected Lua upgrades on macOS).

Copilot uses AI. Check for mistakes.
flex
- uses: actions/checkout@v4
flex \
python3
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Homebrew generally provides the python formula (which installs the python3 binary) rather than a python3 formula. brew install python3 is likely to fail; use brew install python (or omit this if the runner image already includes a suitable Python).

Suggested change
python3
python

Copilot uses AI. Check for mistakes.
Comment on lines +138 to +142
ssdeep \
pcre \
bison \
flex
- uses: actions/checkout@v4
flex \
python3
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description references integrating #3524 (pin Lua to 5.4 on macOS), but this job installs whatever brew install lua currently resolves to. If Lua 5.5+ is still incompatible, please pin the formula/version explicitly (or add a setup step that selects Lua 5.4) to keep macOS CI deterministic.

Copilot uses AI. Check for mistakes.
Comment on lines 2 to +6

on:
push:
pull_request:

Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR title/description mention mbedTLS v4 compatibility changes, but this PR appears to only modify CI workflows. If mbedTLS-related build/config changes are expected, they may be missing from this PR (or the title/description should be adjusted to match the actual scope).

Copilot uses AI. Check for mistakes.
@airween
Copy link
Copy Markdown
Member

airween commented Mar 30, 2026

@Easton97-Jens,

please consider to approve Copilot suggestions'.

I think none of them are exactly true (especially this one: brew install python3 is likely to fail; use brew install python), because all tests were passed, but I think those are useful, and you should accept them. But let's discuss, if you have any question.

Removed python3 from the installation steps in the CI workflow.
Removed python3 from the installation list in CI workflow.
@sonarqubecloud
Copy link
Copy Markdown

@Easton97-Jens
Copy link
Copy Markdown
Contributor Author

Thanks for the suggestion! This is not strictly required, as Python 3 is already available in the environment, so no additional installation is needed. Therefore, I have removed the installation entirely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants