Add shader validation automation hook

This commit is contained in:
2026-06-01 07:55:39 +02:00
parent 3d80791245
commit f9e4bcaeea
6 changed files with 132 additions and 8 deletions

View File

@@ -17,14 +17,36 @@ if ($NoApp) {
}
& cmake @argsList
$exitCode = $LASTEXITCODE
$configureExitCode = $LASTEXITCODE
$shaderExitCode = 0
if ($configureExitCode -eq 0) {
& cmake --build --preset $Preset --target panopainter_validate_shaders
$shaderExitCode = $LASTEXITCODE
}
$exitCode = $configureExitCode
if ($exitCode -eq 0 -and $shaderExitCode -ne 0) {
$exitCode = $shaderExitCode
}
$elapsed = [int]((Get-Date) - $started).TotalMilliseconds
[ordered]@{
command = "analyze-configure"
command = "analyze"
preset = $Preset
exitCode = $exitCode
checks = @(
[ordered]@{
name = "configure"
exitCode = $configureExitCode
},
[ordered]@{
name = "shader-validation"
exitCode = $shaderExitCode
}
)
elapsedMs = $elapsed
} | ConvertTo-Json -Compress
} | ConvertTo-Json -Compress -Depth 4
exit $exitCode