From b3e6e02779ee599c99a14fa9ee130e4ce124c84c Mon Sep 17 00:00:00 2001 From: Hirek193 Date: Wed, 11 Nov 2026 00:34:59 +0100 Subject: [PATCH] ci(windows): build lua51.dll for the unit tests --- .github/workflows/build_bin.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/build_bin.yml b/.github/workflows/build_bin.yml index d37817d5c..7542ff705 100644 --- a/.github/workflows/build_bin.yml +++ b/.github/workflows/build_bin.yml @@ -76,6 +76,27 @@ jobs: run: | call setup.bat + # the unit tests run at the end of the build and load lua51.dll (the Lua screens), but ref/luajit has only its import + # library. LuaJIT of the same 2.0 line is built here and put on PATH for them; it doesn't go into the uploaded build + - name: Build lua51.dll for the unit tests + shell: cmd + run: | + for /f "usebackq delims=" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do set "VSDIR=%%i" + call "%VSDIR%\VC\Auxiliary\Build\vcvars64.bat" || exit /b 1 + git init -q "%RUNNER_TEMP%\LuaJIT" || exit /b 1 + cd /d "%RUNNER_TEMP%\LuaJIT" + rem the v2.0 branch of LuaJIT, pinned + git fetch -q --depth 1 https://github.com/LuaJIT/LuaJIT.git b83bcba6ea300d4eb16e8257ddf80bcdef1f938b || exit /b 1 + git checkout -q FETCH_HEAD || exit /b 1 + cd src + rem msvcbuild.bat runs the tools it builds (minilua, buildvm) from the current folder + set NoDefaultCurrentDirectoryInExePath= + call .\msvcbuild.bat || exit /b 1 + if not exist lua51.dll exit /b 1 + mkdir "%RUNNER_TEMP%\lua51" + copy /y lua51.dll "%RUNNER_TEMP%\lua51\" || exit /b 1 + echo %RUNNER_TEMP%\lua51>> "%GITHUB_PATH%" + - name: Configure shell: pwsh run: |