Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions Scripts/build_and_test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,23 @@ $cmd = Join-Path $Engine 'Engine\Binaries\Win64\UnrealEditor-Cmd.exe'
if (-not (Test-Path $bat)) { Write-Error "Build.bat not found: $bat"; exit 3 }
if (-not (Test-Path $cmd)) { Write-Error "UnrealEditor-Cmd not found: $cmd"; exit 3 }

# --- Codegen drift gate ----------------------------------------------------
# Refuse to build if codegen output drifted from the committed Source/, or
# if any drift diagnostic (--strict) fires, or if the clang-AST introspect
# snapshot is missing (--require-introspect). Skipped silently when Python
# isn't on PATH — the gate is best-effort locally; CI enforces it strictly.
$pluginRoot = Split-Path -Parent $PSScriptRoot
$generator = Join-Path $pluginRoot 'Scripts/codegen/generate_ue_components.py'
$py = (Get-Command python -ErrorAction SilentlyContinue)
if ($py -and (Test-Path $generator)) {
Write-Host '>>> Codegen drift gate: python generate_ue_components.py --check --strict --require-introspect'
& $py.Source $generator --check --strict --require-introspect
if ($LASTEXITCODE -ne 0) {
Write-Error "Codegen drift detected (exit $LASTEXITCODE). Re-run 'python Scripts/codegen/generate_ue_components.py' to regenerate, then re-run this script."
exit 4
}
}

# Truncate the test log up-front so a build failure (or any early exit
# before UnrealEditor-Cmd writes to it) doesn't leave the SHA-256 in the
# summary pointing at a previous run's file.
Expand Down
930 changes: 930 additions & 0 deletions Scripts/codegen/_codegen_checks.py

Large diffs are not rendered by default.

Loading