isle/tools/multi-analyze.ps1
foxtacles 2c7a7d2f2c
Some checks failed
Analyze / ${{ matrix.who }} annotations (CONFIG) (push) Has been cancelled
Analyze / ${{ matrix.who }} annotations (ISLE) (push) Has been cancelled
Analyze / ${{ matrix.who }} annotations (LEGO1) (push) Has been cancelled
Build / Download original binaries (push) Has been cancelled
Build / Current ${{ matrix.toolchain.name }} (map[name:MSVC setup-cmake:true setup-msvc:true setup-ninja:true shell:sh]) (push) Has been cancelled
Build / MSVC 4.20 (push) Has been cancelled
Build / MSVC 4.20 (BETA10) (push) Has been cancelled
Format / C++ (push) Has been cancelled
Naming / C++ (push) Has been cancelled
Build / Verify decomp (push) Has been cancelled
Build / Upload artifacts (push) Has been cancelled
Aggregate CI fixes (#1753)
2026-04-25 22:44:14 +02:00

64 lines
2.0 KiB
PowerShell

if ($args.count -lt 1) {
Write-Error "Requires 1 arg: number of builds for this job."
exit 1
}
$BuildCount = [int]$args[0]
$build_ids = 0..($BuildCount-1)
$build_dirs = foreach($i in $build_ids) { "build$i" }
$stdout_files = foreach($i in $build_ids) { "stdout$i.txt" }
$stderr_files = foreach($i in $build_ids) { "stderr$i.txt" }
$artifacts = @(
@{prog = "CONFIGPROGRESS"; binfile = "CONFIG.EXE"; pdbfile = "CONFIG.PDB"; codedir = "."}
@{prog = "ISLEPROGRESS"; binfile = "ISLE.EXE"; pdbfile = "ISLE.PDB"; codedir = "."}
@{prog = "LEGO1PROGRESS"; binfile = "LEGO1.DLL"; pdbfile = "LEGO1.PDB"; codedir = "LEGO1"}
)
foreach($a in $artifacts) {
$procs = New-Object System.Collections.Generic.List[System.Diagnostics.Process]
foreach($i in $build_ids) {
$params = @{
FilePath = "python"
PassThru = $null
ArgumentList = @(
"-m", "reccmp.tools.asmcmp",
"--paths",
$("legobin/" + $a["binfile"]),
$($build_dirs[$i] + "/" + $a["binfile"]),
$($build_dirs[$i] + "/" + $a["pdbfile"]),
$a["codedir"],
"--json",
$($a["prog"] + "$i.json"),
"--silent"
)
}
# For the first job, display stdout and stderr.
# Else dump to file so we don't see 50 at once.
if ($i -eq 0) {
$params.Add("NoNewWindow", $null)
} else {
$params.Add("RedirectStandardOutput", $stdout_files[$i])
$params.Add("RedirectStandardError", $stderr_files[$i])
}
$procs.Add($(Start-Process @params))
}
$failed = $false
try { Wait-Process -InputObject $procs } catch { $failed = $true }
foreach($i in $build_ids) {
if ($procs[$i].ExitCode -ne 0) {
Get-Content $stdout_files[$i] -Tail 20
Get-Content $stderr_files[$i] -Tail 20
$failed = $true
}
}
if ($failed) { exit 1 }
}