25 lines
1.2 KiB
PowerShell
25 lines
1.2 KiB
PowerShell
$ErrorActionPreference = 'Stop'
|
|
. ./.local/toolchain/env.ps1
|
|
$env:CARGO_BUILD_JOBS = '1'
|
|
$evidenceRoot = Join-Path (Get-Location) '.local/contextual-source-layout-20260911'
|
|
$gates = @(
|
|
@{name='focused4'; args=@('test','--locked','-p','oa-desktop','--bin','arcadia-studio','contextual_source','--','--test-threads=1')},
|
|
@{name='clippy1'; args=@('clippy','--locked','-p','oa-desktop','--all-targets','--','-D','warnings')},
|
|
@{name='fmt1'; args=@('fmt','--all','--','--check')},
|
|
@{name='gui1'; args=@('build','--locked','-p','oa-desktop','--bin','arcadia-studio')}
|
|
)
|
|
foreach ($gate in $gates) {
|
|
$logPath = Join-Path $evidenceRoot ($gate.name + '.log')
|
|
$statusPath = Join-Path $evidenceRoot ($gate.name + '-status.json')
|
|
if ((Test-Path -LiteralPath $logPath) -or (Test-Path -LiteralPath $statusPath)) { throw "Refusing to overwrite $($gate.name)" }
|
|
$started = [DateTime]::UtcNow.ToString('o')
|
|
$gateArgs = $gate.args
|
|
& cargo @gateArgs 2>&1 | Tee-Object -FilePath $logPath
|
|
$gateExit = $LASTEXITCODE
|
|
[ordered]@{started=$started;finished=[DateTime]::UtcNow.ToString('o');exitCode=$gateExit;args=$gateArgs} | ConvertTo-Json -Depth 4 | Set-Content -LiteralPath $statusPath
|
|
if ($gateExit -ne 0) { exit $gateExit }
|
|
}
|
|
|
|
|
|
|