Skip to content

ci(lua): build and smoke-test edgetx-luac on Linux, macOS and Windows - #25

Closed
pfeerick wants to merge 3 commits into
mainfrom
luac-ci
Closed

pfeerick wants to merge 3 commits into
mainfrom
luac-ci

Conversation

@pfeerick

Copy link
Copy Markdown
Owner

Nothing in CI builds the standalone compiler added in EdgeTX#7275, so a change under radio/src/thirdparty/Lua could break it without anyone noticing. This matters now that edgetx-luac is being wrapped in a GitHub Action for script authors (ELRS, yaapu, …), because the action builds it from EdgeTX sources.

Changes

  • New .github/workflows/luac.yml, which runs only when radio/src/thirdparty/Lua/** or the workflow itself changes. On ubuntu-latest, macos-latest and windows-latest it:
    • builds edgetx-luac with CMake
    • compiles a small script and checks the bytecode header is the radio's 32-bit layout (1B4C7561 53 00 19930D0A1A0A 04 04 04 04 04)
    • loads the result back through lundump
    • checks that a script with a syntax error is rejected
  • luac.c: declare alloca() for MSVC as well. Before this, <alloca.h> was only included for GCC/clang, so the default Visual Studio generator on Windows couldn't build it.

Testing

  • On Linux, running the workflow's steps locally passes.
  • The macOS and Windows jobs are verified by this PR's CI run.

🤖 Generated with Claude Code

pfeerick and others added 3 commits September 30, 2026 09:45
Nothing in CI built the standalone compiler added in EdgeTX#7275, so a change
under radio/src/thirdparty/Lua could break it unnoticed. Build it on all
three runner OSes, check the bytecode header matches the radio's 32-bit
layout, load the result back, and check a syntax error is rejected.

luac.c only pulled in alloca() for GCC/clang; include <malloc.h> for
MSVC so the Windows build works with the default generator.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
UCRT's malloc.h only maps alloca to _alloca when non-standard names are
enabled, which /std:c11 and later turn off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The macro ended in ';' and was used as 'CommonTable;', leaving an empty
member declaration in struct Table and struct ROTable. GCC and clang
accept that (-Wpedantic warns), but MSVC rejects it, which broke every
file that includes lobject.h.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pfeerick

Copy link
Copy Markdown
Owner Author

Superseded by EdgeTX#7848 (merged).

@pfeerick pfeerick closed this Sep 30, 2026
@pfeerick
pfeerick deleted the luac-ci branch September 30, 2026 10:41
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.

1 participant