Updated the Windows CI Lua download/extraction step to use tar -xzf and added a guard to fail fast if the extract folder is missing, preventing missing-path errors later in the job.

This commit is contained in:
2026-02-03 21:18:19 -07:00
parent 18e4b74d0b
commit a8a7627161

View File

@@ -97,9 +97,12 @@ jobs:
if (-not $runnerTemp) { throw "RUNNER_TEMP/TEMP is not set." } if (-not $runnerTemp) { throw "RUNNER_TEMP/TEMP is not set." }
New-Item -Path $runnerTemp -ItemType Directory -Force | Out-Null New-Item -Path $runnerTemp -ItemType Directory -Force | Out-Null
$luaExtractRoot = Join-Path $runnerTemp $luaDir $luaExtractRoot = Join-Path $runnerTemp $luaDir
Invoke-WebRequest $luaUrl -OutFile (Join-Path $runnerTemp $luaArchive) $luaArchivePath = Join-Path $runnerTemp $luaArchive
& 7z.exe x (Join-Path $runnerTemp $luaArchive) -o$runnerTemp | Out-Null Invoke-WebRequest $luaUrl -OutFile $luaArchivePath
& 7z.exe x (Join-Path $runnerTemp "lua-$luaVersion.tar") -o$runnerTemp | Out-Null tar -xzf $luaArchivePath -C $runnerTemp
if (-not (Test-Path $luaExtractRoot)) {
throw "Lua extraction failed; missing $luaExtractRoot."
}
$luaBuildArch = if ($gvsPlatform -eq "x86") { "x86" } else { "amd64" } $luaBuildArch = if ($gvsPlatform -eq "x86") { "x86" } else { "amd64" }
cmd /c "call `"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat`" -arch=$luaBuildArch && cd /d `"$luaExtractRoot\src`" && nmake -f Makefile.msc" cmd /c "call `"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat`" -arch=$luaBuildArch && cd /d `"$luaExtractRoot\src`" && nmake -f Makefile.msc"