From bad93d9a29bcde4731ae8c74fb8a5d6825cf2634 Mon Sep 17 00:00:00 2001 From: Ryan Liptak Date: Sat, 10 May 2025 18:26:23 -0700 Subject: [PATCH 1/2] Make docs.lua compatible with Lua 5.2+ --- docs.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs.lua b/docs.lua index 4574916c..886e3acf 100644 --- a/docs.lua +++ b/docs.lua @@ -163,7 +163,7 @@ end local function cb_err(args, optional, desc) return cb({ { 'err', opt_str }, - unpack(args or {}), + (_G.table.unpack or unpack)(args or {}), }, optional, desc) end From 8732ab5cc4bff397f451ff6fd17b880066c0c811 Mon Sep 17 00:00:00 2001 From: Ryan Liptak Date: Sat, 10 May 2025 18:13:14 -0700 Subject: [PATCH 2/2] ci: Add check that docs.md and meta.lua are up-to-date --- .ci/check_docs.sh | 8 ++++++++ .github/workflows/ci.yml | 18 +++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100755 .ci/check_docs.sh diff --git a/.ci/check_docs.sh b/.ci/check_docs.sh new file mode 100755 index 00000000..1d1f1651 --- /dev/null +++ b/.ci/check_docs.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +set -e + +lua docgen.lua + +git diff --quiet -- docs.md +git diff --quiet -- meta.lua diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ca030617..f6781d7d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,6 +14,22 @@ jobs: - name: Docs run: ./.ci/docscov.sh + docs-gen: + runs-on: ubuntu-latest + env: + BUILD_TYPE: Debug + WITH_LUA_ENGINE: Lua + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - name: Build Lua + run: make + - name: Setup Path + run: echo "${{github.workspace}}/build" >> $GITHUB_PATH + - name: Check Docs + run: ./.ci/check_docs.sh + clang-asan: runs-on: ubuntu-latest env: @@ -151,7 +167,7 @@ jobs: deploy: if: startsWith(github.ref, 'refs/tags/') - needs: [build, minimum-supported-libuv, process-cleanup-test, valgrind, clang-asan, bindings-coverage] + needs: [build, minimum-supported-libuv, process-cleanup-test, valgrind, clang-asan, bindings-coverage, docs-gen] runs-on: ubuntu-latest env: WITH_LUA_ENGINE: LuaJIT