From 53c0512d3d0e87c1d6c0a10fd97e0da7c602b799 Mon Sep 17 00:00:00 2001 From: Tun Loakthar Date: Wed, 26 Feb 2025 15:12:50 +0000 Subject: [PATCH 01/29] Add security.md file --- SECURITY.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..0e535ac --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,26 @@ +# Security + +If you believe you have found a new security vulnerability in this repository, please report it to us as follows. + +## Reporting Security Issues + +* Please do **not** report security vulnerabilities through public GitHub issues. + +* Please create a draft security advisory on the Github page: the reporting form is under `> Security > Advisories`. The URL is https://github.com/exasol/virtual-schema-common-lua/security/advisories/new. + +* If you prefer to email, please send your report to `infosec@exasol.com`. + +## Guidelines + +* When reporting a vulnerability, please include as much information as possible, including the complete steps to reproduce the issue. + +* Avoid sending us executables. + +* Feel free to include any script you wrote and used but avoid sending us scripts that download and run binaries. + +* We will prioritise reports that show how the exploits work in realistic environments. + +* We prefer all communications to be in English. + +* We do not offer financial rewards. We are happy to acknowledge your research publicly when possible. + From c304f08c5a6e8af231e429d1b9f7624feb76cdcd Mon Sep 17 00:00:00 2001 From: redcatbear Date: Wed, 12 Aug 2026 13:55:55 +0200 Subject: [PATCH 02/29] Updated workflows. --- .github/workflows/broken_links_checker.yml | 52 ++++++++++++++++------ .github/workflows/ci-build.yml | 14 +++--- .github/workflows/publish-api-doc.yml | 8 ++-- 3 files changed, 50 insertions(+), 24 deletions(-) diff --git a/.github/workflows/broken_links_checker.yml b/.github/workflows/broken_links_checker.yml index 6dd91fa..55d839d 100644 --- a/.github/workflows/broken_links_checker.yml +++ b/.github/workflows/broken_links_checker.yml @@ -1,19 +1,45 @@ +# This file was generated by Project Keeper. name: Broken Links Checker - on: schedule: - - cron: "0 5 * * *" - push: - branches: - - main - pull_request: - + - { + cron: 0 5 * * 0 + } + workflow_dispatch: null jobs: linkChecker: - runs-on: ubuntu-24.04 + runs-on: ubuntu-latest + permissions: { + contents: read + } + defaults: + run: { + shell: bash + } + concurrency: { + group: '${{ github.workflow }}-${{ github.ref }}', + cancel-in-progress: true + } steps: - - uses: actions/checkout@v4 - - uses: gaurav-nelson/github-action-markdown-link-check@v1 - with: - use-quiet-mode: "yes" - use-verbose-mode: "yes" + - id: checkout + uses: actions/checkout@v7 + with: { + persist-credentials: false + } + - id: configure-broken-links-checker + name: Configure broken links checker + run: | + mkdir -p ./target + echo '{"aliveStatusCodes": [429, 200], "ignorePatterns": [' \ + '{"pattern": "^https?://(www|dev).mysql.com/"},' \ + '{"pattern": "^https?://(www.)?opensource.org"}' \ + '{"pattern": "^https?://(www.)?eclipse.org"}' \ + '{"pattern": "^https?://projects.eclipse.org"}' \ + ']}' > ./target/broken_links_checker.json + - id: run-broken-links-checker + uses: tcort/github-action-markdown-link-check@e7c7a18363c842693fadde5d41a3bd3573a7a225 + with: { + use-quiet-mode: yes, + use-verbose-mode: yes, + config-file: ./target/broken_links_checker.json + } diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 62ab916..691ef06 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -15,20 +15,20 @@ jobs: runs-on: ubuntu-24.04 steps: - name: Checkout the repository - uses: actions/checkout@v4 + uses: actions/checkout@v7 with: fetch-depth: 0 - name: Install Lua ${{ matrix.lua_version }} - uses: leafo/gh-actions-lua@v10 + uses: leafo/gh-actions-lua@v13 with: luaVersion: ${{ matrix.lua_version }} - name: Install LuaRocks - uses: leafo/gh-actions-luarocks@v4 + uses: leafo/gh-actions-luarocks@v6 with: - luaRocksVersion: "3.11.1" + luaRocksVersion: "3.13.0" - name: Cache Lua dependencies id: cache-lua-dependencies - uses: actions/cache@v4 + uses: actions/cache@v6 with: path: ~/.luarocks key: | @@ -47,14 +47,14 @@ jobs: - name: Run shellcheck run: tools/shellcheck.sh - name: Archive code coverage results - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: luacov-report path: target/luacov-reports/* - name: Build API documentation run: tools/build_docs.sh - name: Upload API documentation - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: api-documentation path: target/luals-doc/ diff --git a/.github/workflows/publish-api-doc.yml b/.github/workflows/publish-api-doc.yml index 702d08f..cfed165 100644 --- a/.github/workflows/publish-api-doc.yml +++ b/.github/workflows/publish-api-doc.yml @@ -13,17 +13,17 @@ jobs: cancel-in-progress: true steps: - name: Checkout the repository - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Install Lua - uses: leafo/gh-actions-lua@v10 + uses: leafo/gh-actions-lua@v13 with: luaVersion: 5.4 - name: Install LuaRocks - uses: leafo/gh-actions-luarocks@v4 + uses: leafo/gh-actions-luarocks@v6 with: - luaRocksVersion: "3.11.1" + luaRocksVersion: "3.13.0" - name: Generate API documentation run: | From eb960841c57d73bb619bb66bf6463cda4f165eea Mon Sep 17 00:00:00 2001 From: redcatbear Date: Wed, 12 Aug 2026 13:56:25 +0200 Subject: [PATCH 03/29] Added .idea to .gitignore. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 32c0f62..edb38db 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ Scripts .idea/workspace.xml .idea/misc.xml virtual-schema-common-lua-*.src.rock +/.idea/ From bb53f7d94414d0b9cc48cfc927a6f214e0722663 Mon Sep 17 00:00:00 2001 From: redcatbear Date: Wed, 12 Aug 2026 14:05:49 +0200 Subject: [PATCH 04/29] Updated Lua rocks. --- doc/changes/changelog.md | 1 + doc/changes/changes_5.0.1.md | 13 +++++++++++++ ...ec => virtual-schema-common-lua-5.0.1-1.rockspec | 8 ++++---- 3 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 doc/changes/changes_5.0.1.md rename virtual-schema-common-lua-5.0.0-1.rockspec => virtual-schema-common-lua-5.0.1-1.rockspec (93%) diff --git a/doc/changes/changelog.md b/doc/changes/changelog.md index 795e374..ec58d2b 100644 --- a/doc/changes/changelog.md +++ b/doc/changes/changelog.md @@ -1,5 +1,6 @@ # Changes +* [5.0.1](changes_5.0.1.md) * [5.0.0](changes_5.0.0.md) * [4.0.1](changes_4.0.1.md) * [4.0.0](changes_4.0.0.md) diff --git a/doc/changes/changes_5.0.1.md b/doc/changes/changes_5.0.1.md new file mode 100644 index 0000000..5926856 --- /dev/null +++ b/doc/changes/changes_5.0.1.md @@ -0,0 +1,13 @@ +# virtual-schema-common-lua 5.0.1, released 2026-08-12 + +Code name: Update LuaRocks dependencies + +## Summary + +This release updates the LuaRocks dependencies used for JSON handling, testing and code coverage. + +## Dependency Updates + +* `lua-cjson` 2.1.0.10 +* `busted` 2.3.0 +* `luacov` 0.17.0 diff --git a/virtual-schema-common-lua-5.0.0-1.rockspec b/virtual-schema-common-lua-5.0.1-1.rockspec similarity index 93% rename from virtual-schema-common-lua-5.0.0-1.rockspec rename to virtual-schema-common-lua-5.0.1-1.rockspec index 15fe291..b881a9f 100644 --- a/virtual-schema-common-lua-5.0.0-1.rockspec +++ b/virtual-schema-common-lua-5.0.1-1.rockspec @@ -1,7 +1,7 @@ ---@diagnostic disable: lowercase-global rockspec_format = "3.0" -local tag = "5.0.0" +local tag = "5.0.1" package = "virtual-schema-common-lua" version = tag .. "-1" @@ -25,14 +25,14 @@ description = { dependencies = { "lua >= 5.4, < 5.5", "exaerror >= 2.0.3", - "lua-cjson = 2.1.0", -- pinned to prevent "undefined symbol: lua_objlen" in 2.1.0.6 (https://github.com/mpx/lua-cjson/issues/56) + "lua-cjson = 2.1.0.10", -- pinned to prevent "undefined symbol: lua_objlen" in 2.1.0.6 (https://github.com/mpx/lua-cjson/issues/56) "remotelog >= 1.1.1" } test_dependencies = { - "busted >= 2.2.0", + "busted >= 2.3.0", "luacheck >= 1.2.0", - "luacov >= 0.15.0", + "luacov >= 0.17.0", "luacov-coveralls >= 0.2.3" } -- LuaFormatter on From 6c700be9b06586c2d1d9d7d514b25cda6cbfabd6 Mon Sep 17 00:00:00 2001 From: redcatbear Date: Wed, 12 Aug 2026 14:51:01 +0200 Subject: [PATCH 05/29] Changed runner to Ubuntu latest. --- .github/workflows/ci-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 691ef06..c6254eb 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -12,7 +12,7 @@ jobs: fail-fast: true matrix: lua_version: [5.4] - runs-on: ubuntu-24.04 + runs-on: ubuntu-latest steps: - name: Checkout the repository uses: actions/checkout@v7 From cad116aa3202279360282c0b3591836afa04efcc Mon Sep 17 00:00:00 2001 From: redcatbear Date: Wed, 12 Aug 2026 15:01:52 +0200 Subject: [PATCH 06/29] Repinned lua-cjson 2.1.0. --- virtual-schema-common-lua-5.0.1-1.rockspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virtual-schema-common-lua-5.0.1-1.rockspec b/virtual-schema-common-lua-5.0.1-1.rockspec index b881a9f..da61a83 100644 --- a/virtual-schema-common-lua-5.0.1-1.rockspec +++ b/virtual-schema-common-lua-5.0.1-1.rockspec @@ -25,7 +25,7 @@ description = { dependencies = { "lua >= 5.4, < 5.5", "exaerror >= 2.0.3", - "lua-cjson = 2.1.0.10", -- pinned to prevent "undefined symbol: lua_objlen" in 2.1.0.6 (https://github.com/mpx/lua-cjson/issues/56) + "lua-cjson = 2.1.0", -- pinned to prevent "undefined symbol: lua_objlen" in 2.1.0.6 (https://github.com/mpx/lua-cjson/issues/56) "remotelog >= 1.1.1" } From 6c70348cae32aafb6d297dbd0fb1c41d002c0fb3 Mon Sep 17 00:00:00 2001 From: redcatbear Date: Thu, 13 Aug 2026 08:06:35 +0200 Subject: [PATCH 07/29] Added zizmor and standard GitHub pages deployment. --- .github/workflows/broken_links_checker.yml | 1 - .github/workflows/ci-build.yml | 32 +++++++++++++++++++-- .github/workflows/publish-api-doc.yml | 31 ++++++++++++-------- .github/zizmor.yml | 33 ++++++++++++++++++++++ 4 files changed, 81 insertions(+), 16 deletions(-) create mode 100644 .github/zizmor.yml diff --git a/.github/workflows/broken_links_checker.yml b/.github/workflows/broken_links_checker.yml index 55d839d..3a22ce1 100644 --- a/.github/workflows/broken_links_checker.yml +++ b/.github/workflows/broken_links_checker.yml @@ -1,4 +1,3 @@ -# This file was generated by Project Keeper. name: Broken Links Checker on: schedule: diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index c6254eb..85f8b45 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -7,6 +7,34 @@ on: pull_request: jobs: + lint-github-actions: + runs-on: ubuntu-latest + defaults: + run: { + shell: bash + } + permissions: { + security-events: write, + contents: read, + actions: read + } + concurrency: { + group: '${{ github.workflow }}-github-actions-linter-${{ github.ref }}', + cancel-in-progress: true + } + steps: + - name: Checkout the repository + id: checkout + uses: actions/checkout@v7 + with: { + persist-credentials: false + } + - name: Lint GitHub actions with Zizmore + id: lint-github-actions + uses: zizmorcore/zizmor-action@192e21d79ab29983730a13d1382995c2307fbcaa + with: { + advanced-security: false + } build: strategy: fail-fast: true @@ -63,8 +91,6 @@ jobs: ## This is a separate job because it requires running apt-get which takes > 40s. ## When the other job also uses apt-get this can be moved back. plantuml: - strategy: - fail-fast: true concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true @@ -72,7 +98,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v7 with: fetch-depth: 1 - name: Install Plantuml diff --git a/.github/workflows/publish-api-doc.yml b/.github/workflows/publish-api-doc.yml index cfed165..dbfeeea 100644 --- a/.github/workflows/publish-api-doc.yml +++ b/.github/workflows/publish-api-doc.yml @@ -14,27 +14,34 @@ jobs: steps: - name: Checkout the repository uses: actions/checkout@v7 - - name: Install Lua uses: leafo/gh-actions-lua@v13 with: luaVersion: 5.4 - - name: Install LuaRocks uses: leafo/gh-actions-luarocks@v6 with: luaRocksVersion: "3.13.0" - - name: Generate API documentation run: | ./tools/build_docs.sh - - - name: Deploy - uses: JamesIves/github-pages-deploy-action@v4 + - name: Upload artifact + uses: actions/upload-pages-artifact@v5 with: - branch: gh-pages - folder: target/luals-doc - target-folder: api - clean: true - single-commit: true - force: true + path: ./target/luals-doc + + deploy: + if: ${{ github.ref == 'refs/heads/main' }} + permissions: + contents: read + id-token: write + pages: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v5 diff --git a/.github/zizmor.yml b/.github/zizmor.yml new file mode 100644 index 0000000..a8508a1 --- /dev/null +++ b/.github/zizmor.yml @@ -0,0 +1,33 @@ +# Generated by Project Keeper +# https://github.com/exasol/project-keeper/blob/main/project-keeper/src/main/resources/templates/.github/zizmor.yml +# See https://docs.zizmor.sh/configuration/#settings +rules: + unpinned-uses: + config: + policies: + "actions/*": ref-pin + "exasol/python-toolbox/.github/actions/security-issues": ref-pin + "*": hash-pin + cache-poisoning: + ignore: + # Enabling caching is OK for non-release workflows + - ci-build.yml + - ci-build-native-build.yml + - ci-build-db-version-matrix.yml + - project-keeper-verify.yml + - test_on_windows.yml + - test_linux_build_on_windows.yml + obfuscation: + ignore: + # Generated workflows use boolean conditions like ${{ false }} + # Note: We cannot exclude this using inline comments because GitHubWorkflowIO does not preserve comments in the workflow YAML files. + - ci-build.yml + - release.yml + - project-keeper-verify.yml + secrets-inherit: + ignore: + # Required for passing slack webhooks + - ci-build.yml + - ci-build-db-version-matrix.yml + - dependencies_check.yml + - release.yml From a4e5fdbfd1a08e60c029ab5d8103aefa41862226 Mon Sep 17 00:00:00 2001 From: redcatbear Date: Thu, 13 Aug 2026 13:21:08 +0200 Subject: [PATCH 08/29] Removed superfluous obfuscation section. --- .github/zizmor.yml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/.github/zizmor.yml b/.github/zizmor.yml index a8508a1..8454126 100644 --- a/.github/zizmor.yml +++ b/.github/zizmor.yml @@ -1,5 +1,3 @@ -# Generated by Project Keeper -# https://github.com/exasol/project-keeper/blob/main/project-keeper/src/main/resources/templates/.github/zizmor.yml # See https://docs.zizmor.sh/configuration/#settings rules: unpinned-uses: @@ -17,17 +15,3 @@ rules: - project-keeper-verify.yml - test_on_windows.yml - test_linux_build_on_windows.yml - obfuscation: - ignore: - # Generated workflows use boolean conditions like ${{ false }} - # Note: We cannot exclude this using inline comments because GitHubWorkflowIO does not preserve comments in the workflow YAML files. - - ci-build.yml - - release.yml - - project-keeper-verify.yml - secrets-inherit: - ignore: - # Required for passing slack webhooks - - ci-build.yml - - ci-build-db-version-matrix.yml - - dependencies_check.yml - - release.yml From dd590bcd2775ad731d365e67e15bd010e890e14c Mon Sep 17 00:00:00 2001 From: redcatbear Date: Thu, 13 Aug 2026 13:49:04 +0200 Subject: [PATCH 09/29] Install Lua and LuaRocks via APT. --- .github/workflows/ci-build.yml | 40 ++++++++++----------------- .github/workflows/publish-api-doc.yml | 13 ++++----- 2 files changed, 20 insertions(+), 33 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 85f8b45..3539b83 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -9,61 +9,48 @@ on: jobs: lint-github-actions: runs-on: ubuntu-latest - defaults: - run: { - shell: bash - } permissions: { security-events: write, contents: read, actions: read } - concurrency: { + defaults: + run: + shell: bash + concurrency: group: '${{ github.workflow }}-github-actions-linter-${{ github.ref }}', cancel-in-progress: true - } steps: - name: Checkout the repository id: checkout uses: actions/checkout@v7 - with: { + with: persist-credentials: false - } - name: Lint GitHub actions with Zizmore id: lint-github-actions uses: zizmorcore/zizmor-action@192e21d79ab29983730a13d1382995c2307fbcaa - with: { + with: advanced-security: false - } + build: - strategy: - fail-fast: true - matrix: - lua_version: [5.4] runs-on: ubuntu-latest + permissions: + contents: read steps: - name: Checkout the repository uses: actions/checkout@v7 with: fetch-depth: 0 - - name: Install Lua ${{ matrix.lua_version }} - uses: leafo/gh-actions-lua@v13 - with: - luaVersion: ${{ matrix.lua_version }} - - name: Install LuaRocks - uses: leafo/gh-actions-luarocks@v6 - with: - luaRocksVersion: "3.13.0" + persist-credentials: false + - name: Install Lua and LuaRocks + run: apt install lua luarocks - name: Cache Lua dependencies id: cache-lua-dependencies uses: actions/cache@v6 with: path: ~/.luarocks key: | - ${{ runner.os }}-lua-${{ matrix.lua_version }}-${{ hashFiles('*.rockspec') }} - restore-keys: | - "${{ runner.os }}-lua-${{ matrix.lua_version }}" - "${{ runner.os }}-lua" + ${{ runner.os }}-lua-${{ hashFiles('*.rockspec') }} - name: Install Lua dependencies run: luarocks make --local - name: Run tests @@ -101,6 +88,7 @@ jobs: uses: actions/checkout@v7 with: fetch-depth: 1 + persist-credentials: false - name: Install Plantuml run: | sudo apt-get update -y diff --git a/.github/workflows/publish-api-doc.yml b/.github/workflows/publish-api-doc.yml index dbfeeea..9dab835 100644 --- a/.github/workflows/publish-api-doc.yml +++ b/.github/workflows/publish-api-doc.yml @@ -4,9 +4,12 @@ on: push: branches: - main + pull_request: jobs: build: + permissions: + contents: read runs-on: ubuntu-latest concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -14,14 +17,10 @@ jobs: steps: - name: Checkout the repository uses: actions/checkout@v7 - - name: Install Lua - uses: leafo/gh-actions-lua@v13 - with: - luaVersion: 5.4 - - name: Install LuaRocks - uses: leafo/gh-actions-luarocks@v6 with: - luaRocksVersion: "3.13.0" + persist-credentials: false + - name: Install Lua and LuaRocks + run: apt install lua luarocks - name: Generate API documentation run: | ./tools/build_docs.sh From 5633d75788774715e40611450ca051552a8b2ffe Mon Sep 17 00:00:00 2001 From: redcatbear Date: Thu, 13 Aug 2026 13:53:32 +0200 Subject: [PATCH 10/29] Use `apt-get` instead of `apt`. --- .github/workflows/ci-build.yml | 2 +- .github/workflows/publish-api-doc.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 3539b83..2ff6be2 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -43,7 +43,7 @@ jobs: fetch-depth: 0 persist-credentials: false - name: Install Lua and LuaRocks - run: apt install lua luarocks + run: sudo apt-get install lua luarocks - name: Cache Lua dependencies id: cache-lua-dependencies uses: actions/cache@v6 diff --git a/.github/workflows/publish-api-doc.yml b/.github/workflows/publish-api-doc.yml index 9dab835..ddecb8c 100644 --- a/.github/workflows/publish-api-doc.yml +++ b/.github/workflows/publish-api-doc.yml @@ -20,7 +20,7 @@ jobs: with: persist-credentials: false - name: Install Lua and LuaRocks - run: apt install lua luarocks + run: sudo apt-get install lua luarocks - name: Generate API documentation run: | ./tools/build_docs.sh From be8e4a36b588aab51e9980ce6b93646f13f2ad9f Mon Sep 17 00:00:00 2001 From: redcatbear Date: Thu, 13 Aug 2026 13:56:03 +0200 Subject: [PATCH 11/29] Use `lua5.4` instead of `lua`. --- .github/workflows/ci-build.yml | 2 +- .github/workflows/publish-api-doc.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 2ff6be2..22f6bb0 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -43,7 +43,7 @@ jobs: fetch-depth: 0 persist-credentials: false - name: Install Lua and LuaRocks - run: sudo apt-get install lua luarocks + run: sudo apt-get install lua5.4 luarocks - name: Cache Lua dependencies id: cache-lua-dependencies uses: actions/cache@v6 diff --git a/.github/workflows/publish-api-doc.yml b/.github/workflows/publish-api-doc.yml index ddecb8c..7b8dffd 100644 --- a/.github/workflows/publish-api-doc.yml +++ b/.github/workflows/publish-api-doc.yml @@ -20,7 +20,7 @@ jobs: with: persist-credentials: false - name: Install Lua and LuaRocks - run: sudo apt-get install lua luarocks + run: sudo apt-get install lua5.4 luarocks - name: Generate API documentation run: | ./tools/build_docs.sh From c7edc5f7b59520e31ccbfc3e4665cdbf1fb5739b Mon Sep 17 00:00:00 2001 From: redcatbear Date: Thu, 13 Aug 2026 14:01:04 +0200 Subject: [PATCH 12/29] Fixed workflow syntax. --- .github/workflows/ci-build.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 22f6bb0..9d254b1 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -9,16 +9,15 @@ on: jobs: lint-github-actions: runs-on: ubuntu-latest - permissions: { - security-events: write, - contents: read, + permissions: + security-events: write + contents: read actions: read - } defaults: run: shell: bash concurrency: - group: '${{ github.workflow }}-github-actions-linter-${{ github.ref }}', + group: '${{ github.workflow }}-github-actions-linter-${{ github.ref }}' cancel-in-progress: true steps: - name: Checkout the repository From 9c8a30d96b68532736c48f6b804a02f64a728fe8 Mon Sep 17 00:00:00 2001 From: redcatbear Date: Thu, 13 Aug 2026 14:08:07 +0200 Subject: [PATCH 13/29] Luarocks set to Lua 5.4 explicitly. --- .github/workflows/ci-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 9d254b1..9489f76 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -51,7 +51,7 @@ jobs: key: | ${{ runner.os }}-lua-${{ hashFiles('*.rockspec') }} - name: Install Lua dependencies - run: luarocks make --local + run: luarocks make --local --lua-version=5.4 - name: Run tests run: tools/run_tests.sh --run=ci - name: Run static code analysis From 00922f936dc533e8feee1f9eb04576412b349fc3 Mon Sep 17 00:00:00 2001 From: redcatbear Date: Thu, 13 Aug 2026 14:10:43 +0200 Subject: [PATCH 14/29] Added `liblua5.4-dev`. --- .github/workflows/ci-build.yml | 2 +- .github/workflows/publish-api-doc.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 9489f76..9651ca2 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -42,7 +42,7 @@ jobs: fetch-depth: 0 persist-credentials: false - name: Install Lua and LuaRocks - run: sudo apt-get install lua5.4 luarocks + run: sudo apt-get install lua5.4 liblua5.4-dev luarocks - name: Cache Lua dependencies id: cache-lua-dependencies uses: actions/cache@v6 diff --git a/.github/workflows/publish-api-doc.yml b/.github/workflows/publish-api-doc.yml index 7b8dffd..0566f11 100644 --- a/.github/workflows/publish-api-doc.yml +++ b/.github/workflows/publish-api-doc.yml @@ -20,7 +20,7 @@ jobs: with: persist-credentials: false - name: Install Lua and LuaRocks - run: sudo apt-get install lua5.4 luarocks + run: sudo apt-get install lua5.4 liblua5.4-dev luarocks - name: Generate API documentation run: | ./tools/build_docs.sh From 61e0bc5553ab26d973ffa9b735ab11baf014b394 Mon Sep 17 00:00:00 2001 From: redcatbear Date: Thu, 13 Aug 2026 14:22:55 +0200 Subject: [PATCH 15/29] Global Luarocks config. --- .github/luarocks-config-5.4.lua | 2 ++ .github/workflows/ci-build.yml | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 .github/luarocks-config-5.4.lua diff --git a/.github/luarocks-config-5.4.lua b/.github/luarocks-config-5.4.lua new file mode 100644 index 0000000..b73e22b --- /dev/null +++ b/.github/luarocks-config-5.4.lua @@ -0,0 +1,2 @@ +lua_version = "5.4" +lua_interpreter = "lua5.4" diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 9651ca2..ea3455b 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -33,6 +33,8 @@ jobs: build: runs-on: ubuntu-latest + env: + LUAROCKS_CONFIG: ${{ github.workspace }}/.github/luarocks-config-5.4.lua permissions: contents: read steps: @@ -49,9 +51,9 @@ jobs: with: path: ~/.luarocks key: | - ${{ runner.os }}-lua-${{ hashFiles('*.rockspec') }} + ${{ runner.os }}-lua-5.4-${{ hashFiles('*.rockspec') }} - name: Install Lua dependencies - run: luarocks make --local --lua-version=5.4 + run: luarocks make --local - name: Run tests run: tools/run_tests.sh --run=ci - name: Run static code analysis From 89283f859132854b351a1e04f8f8997cb18bff29 Mon Sep 17 00:00:00 2001 From: redcatbear Date: Thu, 13 Aug 2026 14:28:20 +0200 Subject: [PATCH 16/29] Set `luarocks config lua_version 5.4` on the CLI. --- .github/workflows/ci-build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index ea3455b..93f3f18 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -33,8 +33,6 @@ jobs: build: runs-on: ubuntu-latest - env: - LUAROCKS_CONFIG: ${{ github.workspace }}/.github/luarocks-config-5.4.lua permissions: contents: read steps: @@ -44,7 +42,9 @@ jobs: fetch-depth: 0 persist-credentials: false - name: Install Lua and LuaRocks - run: sudo apt-get install lua5.4 liblua5.4-dev luarocks + run: | + sudo apt-get install lua5.4 liblua5.4-dev luarocks + luarocks config lua_version 5.4 - name: Cache Lua dependencies id: cache-lua-dependencies uses: actions/cache@v6 From 5d80cb9cab4d5399a95ba555a2f3d00391ddaa3e Mon Sep 17 00:00:00 2001 From: redcatbear Date: Thu, 13 Aug 2026 15:02:37 +0200 Subject: [PATCH 17/29] Tried `update-alternatives`. --- .github/workflows/ci-build.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 93f3f18..69237c3 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -44,7 +44,10 @@ jobs: - name: Install Lua and LuaRocks run: | sudo apt-get install lua5.4 liblua5.4-dev luarocks - luarocks config lua_version 5.4 + sudo update-alternatives --install /usr/bin/lua lua-interpreter /usr/bin/lua5.4 54 + sudo update-alternatives --install /usr/bin/luac lua-compiler /usr/bin/luac5.4 54 + sudo update-alternatives --set lua-interpreter /usr/bin/lua5.4 + sudo update-alternatives --set lua-compiler /usr/bin/luac5.4 - name: Cache Lua dependencies id: cache-lua-dependencies uses: actions/cache@v6 From 5f3dd7397383c451a19e26b6fa2e93c4f63ae2ef Mon Sep 17 00:00:00 2001 From: redcatbear Date: Thu, 13 Aug 2026 15:11:39 +0200 Subject: [PATCH 18/29] Explicitly removed Lua 5.1. --- .github/workflows/ci-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 69237c3..96930b1 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -44,6 +44,7 @@ jobs: - name: Install Lua and LuaRocks run: | sudo apt-get install lua5.4 liblua5.4-dev luarocks + sudo apt-get remove lua5.1 sudo update-alternatives --install /usr/bin/lua lua-interpreter /usr/bin/lua5.4 54 sudo update-alternatives --install /usr/bin/luac lua-compiler /usr/bin/luac5.4 54 sudo update-alternatives --set lua-interpreter /usr/bin/lua5.4 From fcffce439d778dadd4edd2698252754e9dfbb562 Mon Sep 17 00:00:00 2001 From: redcatbear Date: Thu, 13 Aug 2026 15:15:25 +0200 Subject: [PATCH 19/29] Set LUA_INCDIR --- .github/workflows/ci-build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 96930b1..a87960b 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -33,6 +33,8 @@ jobs: build: runs-on: ubuntu-latest + env: + LUA_INCDIR: /usr/include/lua5.4 permissions: contents: read steps: From 178f458b33e3693b51812ba55a9d711b54e2262d Mon Sep 17 00:00:00 2001 From: redcatbear Date: Thu, 13 Aug 2026 15:21:19 +0200 Subject: [PATCH 20/29] Set Lua version in Luarocks. --- .github/workflows/ci-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index a87960b..e0bef82 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -59,7 +59,7 @@ jobs: key: | ${{ runner.os }}-lua-5.4-${{ hashFiles('*.rockspec') }} - name: Install Lua dependencies - run: luarocks make --local + run: luarocks make --local --lua-version 5.4 - name: Run tests run: tools/run_tests.sh --run=ci - name: Run static code analysis From fcb0fbe00d9d76b9f3e4902bcc006aa9077b5eb7 Mon Sep 17 00:00:00 2001 From: redcatbear Date: Thu, 13 Aug 2026 15:32:47 +0200 Subject: [PATCH 21/29] Set Luarocks lua_version and lua_dir in scope user. --- .github/workflows/ci-build.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index e0bef82..2db4ffd 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -33,8 +33,6 @@ jobs: build: runs-on: ubuntu-latest - env: - LUA_INCDIR: /usr/include/lua5.4 permissions: contents: read steps: @@ -51,6 +49,11 @@ jobs: sudo update-alternatives --install /usr/bin/luac lua-compiler /usr/bin/luac5.4 54 sudo update-alternatives --set lua-interpreter /usr/bin/lua5.4 sudo update-alternatives --set lua-compiler /usr/bin/luac5.4 + luarocks config --scope user lua_version 5.4 + luarocks config --scope user lua_dir /usr + test "$(lua -e 'print(_VERSION)')" = "Lua 5.4" + test "$(luarocks config lua_version)" = "5.4" + test "$(luarocks config variables.LUA_INCDIR)" = "/usr/include/lua5.4" - name: Cache Lua dependencies id: cache-lua-dependencies uses: actions/cache@v6 From c06333592bf8c4f806751cc8f15f9e69ec25b525 Mon Sep 17 00:00:00 2001 From: redcatbear Date: Thu, 13 Aug 2026 15:37:41 +0200 Subject: [PATCH 22/29] Restore cache before Luarocks config. --- .github/workflows/ci-build.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 2db4ffd..f1429e8 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -41,6 +41,14 @@ jobs: with: fetch-depth: 0 persist-credentials: false + - name: Cache Lua dependencies + # Important: Restore cache before Lua / Luarocks config! + id: cache-lua-dependencies + uses: actions/cache@v6 + with: + path: ~/.luarocks + key: | + ${{ runner.os }}-lua-5.4-v2-${{ hashFiles('*.rockspec') }} - name: Install Lua and LuaRocks run: | sudo apt-get install lua5.4 liblua5.4-dev luarocks @@ -54,13 +62,6 @@ jobs: test "$(lua -e 'print(_VERSION)')" = "Lua 5.4" test "$(luarocks config lua_version)" = "5.4" test "$(luarocks config variables.LUA_INCDIR)" = "/usr/include/lua5.4" - - name: Cache Lua dependencies - id: cache-lua-dependencies - uses: actions/cache@v6 - with: - path: ~/.luarocks - key: | - ${{ runner.os }}-lua-5.4-${{ hashFiles('*.rockspec') }} - name: Install Lua dependencies run: luarocks make --local --lua-version 5.4 - name: Run tests From 3bda4496b713d97d34352627dd5975780d905243 Mon Sep 17 00:00:00 2001 From: redcatbear Date: Thu, 13 Aug 2026 15:48:12 +0200 Subject: [PATCH 23/29] Restore only the rocks, not Luarocks infra. --- .github/workflows/ci-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index f1429e8..652c5eb 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -46,9 +46,9 @@ jobs: id: cache-lua-dependencies uses: actions/cache@v6 with: - path: ~/.luarocks + path: ~/.cache/luarocks key: | - ${{ runner.os }}-lua-5.4-v2-${{ hashFiles('*.rockspec') }} + ${{ runner.os }}-lua-5.4-v3-${{ hashFiles('*.rockspec') }} - name: Install Lua and LuaRocks run: | sudo apt-get install lua5.4 liblua5.4-dev luarocks From d84df119a38ed5ea6528a3e42873bedf79085f01 Mon Sep 17 00:00:00 2001 From: redcatbear Date: Thu, 13 Aug 2026 15:50:56 +0200 Subject: [PATCH 24/29] Removed cache for rocks. --- .github/workflows/ci-build.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 652c5eb..65b9696 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -41,14 +41,6 @@ jobs: with: fetch-depth: 0 persist-credentials: false - - name: Cache Lua dependencies - # Important: Restore cache before Lua / Luarocks config! - id: cache-lua-dependencies - uses: actions/cache@v6 - with: - path: ~/.cache/luarocks - key: | - ${{ runner.os }}-lua-5.4-v3-${{ hashFiles('*.rockspec') }} - name: Install Lua and LuaRocks run: | sudo apt-get install lua5.4 liblua5.4-dev luarocks From 1801c7392d838b44a750decbc85a60012eeb84fb Mon Sep 17 00:00:00 2001 From: redcatbear Date: Thu, 13 Aug 2026 15:57:05 +0200 Subject: [PATCH 25/29] Added luarocks to GITHUB_PATH. --- .github/workflows/ci-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 65b9696..191fa1f 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -51,6 +51,7 @@ jobs: sudo update-alternatives --set lua-compiler /usr/bin/luac5.4 luarocks config --scope user lua_version 5.4 luarocks config --scope user lua_dir /usr + luarocks config --local deploy_bin_dir >> "$GITHUB_PATH" test "$(lua -e 'print(_VERSION)')" = "Lua 5.4" test "$(luarocks config lua_version)" = "5.4" test "$(luarocks config variables.LUA_INCDIR)" = "/usr/include/lua5.4" From b385feabcb6b6de8e775cddc7494312fb7b8eeb5 Mon Sep 17 00:00:00 2001 From: redcatbear Date: Thu, 13 Aug 2026 15:59:31 +0200 Subject: [PATCH 26/29] Reduced 5.4 setup. --- .github/workflows/ci-build.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 191fa1f..0c556cc 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -44,7 +44,6 @@ jobs: - name: Install Lua and LuaRocks run: | sudo apt-get install lua5.4 liblua5.4-dev luarocks - sudo apt-get remove lua5.1 sudo update-alternatives --install /usr/bin/lua lua-interpreter /usr/bin/lua5.4 54 sudo update-alternatives --install /usr/bin/luac lua-compiler /usr/bin/luac5.4 54 sudo update-alternatives --set lua-interpreter /usr/bin/lua5.4 @@ -52,9 +51,6 @@ jobs: luarocks config --scope user lua_version 5.4 luarocks config --scope user lua_dir /usr luarocks config --local deploy_bin_dir >> "$GITHUB_PATH" - test "$(lua -e 'print(_VERSION)')" = "Lua 5.4" - test "$(luarocks config lua_version)" = "5.4" - test "$(luarocks config variables.LUA_INCDIR)" = "/usr/include/lua5.4" - name: Install Lua dependencies run: luarocks make --local --lua-version 5.4 - name: Run tests From 77150f70535a9034573d266f63db7b3cb1bc9f90 Mon Sep 17 00:00:00 2001 From: redcatbear Date: Thu, 13 Aug 2026 16:03:28 +0200 Subject: [PATCH 27/29] PlantUML in the same job. --- .github/workflows/ci-build.yml | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 0c556cc..abb0fee 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -66,6 +66,12 @@ jobs: with: name: luacov-report path: target/luacov-reports/* + - name: Install Plantuml + run: | + sudo apt-get update -y + sudo apt-get install -y plantuml + - name: Build diagrams + run: tools/build_diagrams.sh - name: Build API documentation run: tools/build_docs.sh - name: Upload API documentation @@ -74,24 +80,3 @@ jobs: name: api-documentation path: target/luals-doc/ if-no-files-found: error - - ## This is a separate job because it requires running apt-get which takes > 40s. - ## When the other job also uses apt-get this can be moved back. - plantuml: - concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - name: "Build Plantuml diagrams" - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v7 - with: - fetch-depth: 1 - persist-credentials: false - - name: Install Plantuml - run: | - sudo apt-get update -y - sudo apt-get install -y plantuml - - name: Build diagrams - run: tools/build_diagrams.sh From d5c30881ce916f5c9bc1bf65328a750e7b014c3e Mon Sep 17 00:00:00 2001 From: redcatbear Date: Thu, 13 Aug 2026 16:07:59 +0200 Subject: [PATCH 28/29] Reinstate rock cache. --- .github/workflows/ci-build.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index abb0fee..ff85052 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -41,6 +41,11 @@ jobs: with: fetch-depth: 0 persist-credentials: false + - name: Cache downloaded LuaRocks packages + uses: actions/cache@v6 + with: + path: ~/.cache/luarocks + key: ${{ runner.os }}-luarocks-lua-5.4-${{ hashFiles('*.rockspec') }} - name: Install Lua and LuaRocks run: | sudo apt-get install lua5.4 liblua5.4-dev luarocks From 57e9c157f281661941d5523812861983adf4ad08 Mon Sep 17 00:00:00 2001 From: redcatbear Date: Thu, 13 Aug 2026 16:18:02 +0200 Subject: [PATCH 29/29] Removed luarocks-config file. --- .github/luarocks-config-5.4.lua | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 .github/luarocks-config-5.4.lua diff --git a/.github/luarocks-config-5.4.lua b/.github/luarocks-config-5.4.lua deleted file mode 100644 index b73e22b..0000000 --- a/.github/luarocks-config-5.4.lua +++ /dev/null @@ -1,2 +0,0 @@ -lua_version = "5.4" -lua_interpreter = "lua5.4"