fix(ci): pin Lua version on 5.4#3524
fix(ci): pin Lua version on 5.4#3524airween wants to merge 2 commits intoowasp-modsecurity:v3/masterfrom
Conversation
fzipi
left a comment
There was a problem hiding this comment.
Two suggestions:
1. Use a workflow-level env variable
The string 5.4 is hardcoded in 6 places across the two files. If we ever bump the version, all of them need updating. Each workflow should define it once at the top:
env:
LUA_VERSION: "5.4"Then reference it consistently everywhere — macOS and Linux alike:
# macOS
brew install ... lua@${{ env.LUA_VERSION }} ...
echo "/usr/local/opt/lua@${{ env.LUA_VERSION }}/bin" >> $GITHUB_PATH
# Linux
sudo apt-get install -y liblua${{ env.LUA_VERSION }}-dev2. Lua version mismatch across platforms
After this PR, macOS jobs will use Lua 5.4 while all Linux jobs still use liblua5.2-dev (Lua 5.2):
| File | Job | Lua version |
|---|---|---|
ci.yml |
build-linux |
5.2 (liblua5.2-dev) |
ci.yml |
build-macos |
5.4 (after this PR) |
ci_new.yml |
build-linux |
5.2 (liblua5.2-dev) |
ci_new.yml |
build-macos |
5.4 (after this PR) |
ci_new.yml |
cppcheck (macOS) |
5.4 (after this PR) |
ci_new.yml |
cppcheck-linux |
5.2 (liblua5.2-dev) |
This makes CI more inconsistent than before — we'd be testing against different Lua versions per platform. The Linux jobs should also use liblua${{ env.LUA_VERSION }}-dev so there's a single source of truth for the Lua version across all platforms and jobs.
…oss all jobs Pin Lua to 5.4 via a single workflow-level env variable instead of hardcoding the version in each job. This also aligns Linux jobs (previously on 5.2) with macOS jobs (5.4).
|



what
This PR pins Lua version in OSX workflows on 5.4.
why
It seems like the default Lua version is 5.5 if someone installs it on OSX, and the library is not ready to work with it.
This is a workaround, we should align the Lua related code.
references
#3523