Add EveUnity UPM artifact smoke

This commit is contained in:
Meta Vens 2026-07-09 17:32:33 +01:00
commit bdafa0295a
15 changed files with 362 additions and 20 deletions

View file

@ -110,7 +110,7 @@ if (-not ($releaseContract.tagPattern -match "\{version\}")) {
if (-not ($releaseContract.artifactPattern -match "\{version\}")) {
throw "EveUnity release contract artifact pattern must include {version}: $($releaseContract.artifactPattern)"
}
foreach ($pathProperty in @("packageRoot", "versionSource", "requestBuilder")) {
foreach ($pathProperty in @("packageRoot", "versionSource", "requestBuilder", "artifactBuilder")) {
$relativePath = $releaseContract.$pathProperty
if (-not $relativePath) {
throw "EveUnity release contract missing $pathProperty"
@ -146,6 +146,11 @@ if ($LASTEXITCODE -ne 0) {
throw "EveUnity release contract smoke failed with exit code $LASTEXITCODE"
}
& (Join-Path $projectRoot "scripts\run-eveunity-release-artifact-smoke.ps1")
if ($LASTEXITCODE -ne 0) {
throw "EveUnity release artifact smoke failed with exit code $LASTEXITCODE"
}
$testContract = $manifest.lifecycle.test.testContract
if ($null -eq $testContract) {
throw "EveUnity test lifecycle missing testContract"

View file

@ -0,0 +1,98 @@
param(
[string] $CapabilityManifestPath = "packages\org.gamecult.eve.unity-uitoolkit\eve-runtime-capability.json",
[string] $RequestOutputPath = "artifacts\eveunity-uitoolkit-release-contract\latest\release-request.json",
[string] $ProofOutputPath = "artifacts\eveunity-uitoolkit-release\latest\release-artifact.json"
)
$ErrorActionPreference = "Stop"
$projectRoot = Split-Path -Parent $PSScriptRoot
$absoluteCapabilityPath = if ([System.IO.Path]::IsPathRooted($CapabilityManifestPath)) {
$CapabilityManifestPath
} else {
Join-Path $projectRoot $CapabilityManifestPath
}
$absoluteRequestOutputPath = if ([System.IO.Path]::IsPathRooted($RequestOutputPath)) {
$RequestOutputPath
} else {
Join-Path $projectRoot $RequestOutputPath
}
$absoluteProofOutputPath = if ([System.IO.Path]::IsPathRooted($ProofOutputPath)) {
$ProofOutputPath
} else {
Join-Path $projectRoot $ProofOutputPath
}
if (-not (Test-Path -LiteralPath $absoluteCapabilityPath)) {
throw "EveUnity release artifact input not found: $absoluteCapabilityPath"
}
$manifest = Get-Content -LiteralPath $absoluteCapabilityPath -Raw | ConvertFrom-Json
$releaseContract = $manifest.lifecycle.release.releaseContract
if ($null -eq $releaseContract) {
throw "EveUnity release artifact smoke missing lifecycle.release.releaseContract"
}
if ($releaseContract.ownerRepo -ne "EveUnity") {
throw "Unexpected EveUnity release artifact owner: $($releaseContract.ownerRepo)"
}
if ($releaseContract.artifactKind -ne "upm-package") {
throw "Unexpected EveUnity release artifact kind: $($releaseContract.artifactKind)"
}
if (-not $releaseContract.artifactBuilder) {
throw "EveUnity release contract missing artifactBuilder"
}
$artifactBuilderPath = Join-Path $projectRoot $releaseContract.artifactBuilder
if (-not (Test-Path -LiteralPath $artifactBuilderPath)) {
throw "EveUnity release artifact builder not found: $($releaseContract.artifactBuilder)"
}
node --test (Join-Path $projectRoot "tools\eveunity\eveunity-release-artifact.test.mjs")
if ($LASTEXITCODE -ne 0) {
throw "EveUnity release artifact tests failed with exit code $LASTEXITCODE"
}
& (Join-Path $projectRoot "scripts\run-eveunity-release-contract-smoke.ps1") `
-CapabilityManifestPath $CapabilityManifestPath `
-OutputPath $RequestOutputPath
if ($LASTEXITCODE -ne 0) {
throw "EveUnity release contract smoke failed with exit code $LASTEXITCODE"
}
node $artifactBuilderPath `
--project-root $projectRoot `
--request $RequestOutputPath `
--proof-output $ProofOutputPath
if ($LASTEXITCODE -ne 0) {
throw "EveUnity release artifact builder failed with exit code $LASTEXITCODE"
}
if (-not (Test-Path -LiteralPath $absoluteProofOutputPath)) {
throw "EveUnity release artifact proof was not written: $absoluteProofOutputPath"
}
$proof = Get-Content -LiteralPath $absoluteProofOutputPath -Raw | ConvertFrom-Json
foreach ($expectation in @(
@{ field = "schema"; value = "gamecult.eve.runtime_release_artifact.v1" },
@{ field = "ownerRepo"; value = "EveUnity" },
@{ field = "repository"; value = "GameCult/EveUnity" },
@{ field = "packageName"; value = $releaseContract.packageName },
@{ field = "artifactKind"; value = "upm-package" }
)) {
if ($proof.($expectation.field) -ne $expectation.value) {
throw "EveUnity release artifact proof $($expectation.field) expected $($expectation.value) got $($proof.($expectation.field))"
}
}
if ($proof.artifactSizeBytes -le 0) {
throw "EveUnity release artifact proof has invalid size: $($proof.artifactSizeBytes)"
}
$artifactPath = if ([System.IO.Path]::IsPathRooted($proof.artifactPath)) {
$proof.artifactPath
} else {
Join-Path $projectRoot $proof.artifactPath
}
if (-not (Test-Path -LiteralPath $artifactPath)) {
throw "EveUnity release artifact was not written: $artifactPath"
}
Write-Host "EveUnity release artifact smoke passed: $artifactPath"

View file

@ -26,7 +26,7 @@ $releaseContract = $manifest.lifecycle.release.releaseContract
if ($null -eq $releaseContract) {
throw "EveUnity release contract missing lifecycle.release.releaseContract"
}
foreach ($field in @("ownerRepo", "packageName", "packageRoot", "versionSource", "tagPattern", "artifactKind", "requestSchema", "requestBuilder", "artifactPattern", "publishProof")) {
foreach ($field in @("ownerRepo", "packageName", "packageRoot", "versionSource", "tagPattern", "artifactKind", "requestSchema", "requestBuilder", "artifactBuilder", "artifactPattern", "publishProof")) {
if (-not $releaseContract.$field) {
throw "EveUnity release contract missing $field"
}
@ -42,9 +42,10 @@ if ($releaseContract.artifactKind -ne "upm-package") {
}
$builderPath = Join-Path $projectRoot $releaseContract.requestBuilder
$artifactBuilderPath = Join-Path $projectRoot $releaseContract.artifactBuilder
$packagePath = Join-Path $projectRoot $releaseContract.versionSource
$packageRoot = Join-Path $projectRoot $releaseContract.packageRoot
foreach ($path in @($builderPath, $packagePath, $packageRoot)) {
foreach ($path in @($builderPath, $artifactBuilderPath, $packagePath, $packageRoot)) {
if (-not (Test-Path -LiteralPath $path)) {
throw "EveUnity release contract path not found: $path"
}

View file

@ -69,6 +69,7 @@ try {
& (Join-Path $PSScriptRoot "run-plugin-handoff-smoke.ps1")
& (Join-Path $PSScriptRoot "run-aetheria-provider-handoff-smoke.ps1")
& (Join-Path $PSScriptRoot "run-eveunity-split-handoff-smoke.ps1")
& (Join-Path $PSScriptRoot "run-eveunity-release-artifact-smoke.ps1")
& (Join-Path $PSScriptRoot "run-eveunity-scene-split-handoff-smoke.ps1")
& (Join-Path $PSScriptRoot "run-eveunity-scene-lifecycle-smoke.ps1")
& (Join-Path $PSScriptRoot "run-eveelectron-split-handoff-smoke.ps1")

View file

@ -174,7 +174,7 @@ node $consumerScript $consumerExport `
--expect-screenshot-metric unity-scene:aetheria-world:bounding-boxes:pending-capture `
--expect-screenshot-metric electron-shell:aetheria-world:bounding-boxes:pending-capture `
--expect-screenshot-metric tui:aetheria-world:bounding-boxes:terminal-grid-capture `
--expect-runtime-lifecycle-status unity-uitoolkit:release:incubating-upm-package `
--expect-runtime-lifecycle-status unity-uitoolkit:release:upm-package-artifact-smoke `
--expect-runtime-lifecycle-status unity-uitoolkit:test:batchmode-editmode-tests-and-consumer-build-smoke `
--expect-runtime-lifecycle-status unity-uitoolkit:capture:pending-editor-capture `
--expect-runtime-lifecycle-pending "unity-uitoolkit:release:Tagged UPM release" `
@ -184,6 +184,7 @@ node $consumerScript $consumerExport `
--expect-runtime-lifecycle-field "unity-uitoolkit:release:releaseContract.artifactKind:upm-package" `
--expect-runtime-lifecycle-field "unity-uitoolkit:release:releaseContract.requestSchema:gamecult.eve.runtime_release_request.v1" `
--expect-runtime-lifecycle-field "unity-uitoolkit:release:releaseContract.requestBuilder:tools/eveunity/eveunity-release-contract.mjs" `
--expect-runtime-lifecycle-field "unity-uitoolkit:release:releaseContract.artifactBuilder:tools/eveunity/eveunity-release-artifact.mjs" `
--expect-runtime-lifecycle-field "unity-uitoolkit:release:releaseContract.artifactPattern:artifacts/eveunity-uitoolkit-release/{version}/org.gamecult.eve.unity-uitoolkit-{version}.tgz" `
--expect-runtime-lifecycle-field "unity-uitoolkit:release:releaseContract.tagPattern:eveunity-uitoolkit-v{version}" `
--expect-runtime-lifecycle-field "unity-uitoolkit:release:releaseContract.packageRoot:packages/org.gamecult.eve.unity-uitoolkit" `