ci(lua): build and smoke-test edgetx-luac on Linux, macOS and Windows - #7848
Merged
Merged
Conversation
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
added a commit
to EdgeTX/edgetx-luac-action
that referenced
this pull request
Sep 30, 2026
EdgeTX/edgetx#7848 fixed the MSVC build, so pin the compiler to its merge commit and drop the tests' temporary override that built from pfeerick/edgetx. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pfeerick
added a commit
to EdgeTX/edgetx-luac-action
that referenced
this pull request
Oct 1, 2026
- AGENTS.md: guide for AI tools covering architecture, the rules learned the hard way (stdlib-only scripts, LF step outputs on Windows, bash 3.2 on macOS, POSIX paths), the uv.lock-based pre-commit setup, action version policy, updating the pinned compiler, and commit/PR conventions. - CLAUDE.md imports it (`@AGENTS.md`), with no symlinks. - CONTRIBUTING.md: setup (uv sync, pre-commit install), how the scripts fit together, checks, local testing, commits and PRs, updating the compiler (from EdgeTX/edgetx#7848 onwards) and releasing. - README.md: maintainer material moves to CONTRIBUTING.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Nothing in CI builds the standalone Lua compiler added in #7275, so changes under
radio/src/thirdparty/Luacould break it without anyone noticing. As it turns out, it didn't build with MSVC at all.Changes
.github/workflows/luac.yml. It runs only whenradio/src/thirdparty/Lua/**or the workflow itself changes. On Linux, macOS and Windows it:edgetx-luacwith CMake1B4C7561 53 00 19930D0A1A0A 04 04 04 04 04)lundumpluac.c: declarealloca()for MSVC. Until now<alloca.h>was only included for GCC/clang.lobject.h: drop the trailing;from theCommonTablemacro. It's used asCommonTable;, which leaves an empty member declaration instruct Tableandstruct ROTable. GCC and clang accept that (-Wpedanticwarns), but MSVC rejects it, and every file that includeslobject.hthen fails. This changes neither code generation nor the bytecodeedgetx-luacproduces (checked byte for byte).Testing
ubuntu-latest,macos-latestandwindows-latest: ci(lua): build and smoke-test edgetx-luac on Linux, macOS and Windows pfeerick/edgetx#25🤖 Generated with Claude Code