18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-19 22:44:59 +01:00

ci(windows): build lua51.dll for the unit tests

This commit is contained in:
2026-11-11 00:34:59 +01:00
parent 5c8cc6d9a5
commit b3e6e02779

View File

@@ -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: |