Graduate Flutter runtime to EveFlutter
This commit is contained in:
parent
41267fbd0c
commit
3dce24961d
122 changed files with 139 additions and 5743 deletions
|
|
@ -1,85 +0,0 @@
|
|||
param(
|
||||
[string] $FixtureId = "cultui-inspector",
|
||||
[string] $OutputPath = "artifacts\parity\android-flutter-cultui-inspector.png",
|
||||
[int] $Width = 0,
|
||||
[int] $Height = 0,
|
||||
[ValidateSet("portrait", "landscape", "natural")]
|
||||
[string] $Orientation = "natural",
|
||||
[int] $LaunchDelaySeconds = 4,
|
||||
[switch] $SkipBuild,
|
||||
[switch] $ForceInstall
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$projectRoot = Split-Path -Parent $PSScriptRoot
|
||||
$flutterRoot = Join-Path $projectRoot "flutter\eve_parity"
|
||||
$flutter = Join-Path $projectRoot "tools\deps\flutter\bin\flutter.bat"
|
||||
$assetPath = Join-Path $flutterRoot "assets\current-surface.json"
|
||||
$fontDir = Join-Path $flutterRoot "assets\fonts"
|
||||
$repixelizerAssetDir = Join-Path $flutterRoot "assets\repixelizer"
|
||||
$apkPath = Join-Path $flutterRoot "build\app\outputs\flutter-apk\app-debug.apk"
|
||||
|
||||
if (-not (Test-Path $flutter)) {
|
||||
throw "Flutter is not installed at $flutter"
|
||||
}
|
||||
|
||||
if (-not $SkipBuild) {
|
||||
New-Item -ItemType Directory -Force (Split-Path -Parent $assetPath) | Out-Null
|
||||
New-Item -ItemType Directory -Force $fontDir | Out-Null
|
||||
New-Item -ItemType Directory -Force $repixelizerAssetDir | Out-Null
|
||||
|
||||
Copy-Item -LiteralPath (Join-Path $projectRoot "tools\deps\flutter\bin\cache\artifacts\material_fonts\roboto-regular.ttf") -Destination (Join-Path $fontDir "Roboto-Regular.ttf") -Force
|
||||
Copy-Item -LiteralPath (Join-Path $projectRoot "tools\deps\flutter\bin\cache\artifacts\material_fonts\roboto-bold.ttf") -Destination (Join-Path $fontDir "Roboto-Bold.ttf") -Force
|
||||
curl.exe -L "https://repixelizer.gamecult.org/app/landing-assets/character-input.png" -o (Join-Path $repixelizerAssetDir "character-input.png") | Out-Host
|
||||
curl.exe -L "https://repixelizer.gamecult.org/app/landing-assets/character-repixelized.png" -o (Join-Path $repixelizerAssetDir "character-repixelized.png") | Out-Host
|
||||
|
||||
node .\tools\parity\export-fixture.mjs $FixtureId $assetPath | Out-Host
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Fixture export failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
|
||||
Push-Location $flutterRoot
|
||||
try {
|
||||
& $flutter pub get
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Flutter pub get failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
& $flutter build apk --debug "--dart-define=EVE_PARITY_FIXTURE=$FixtureId"
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Flutter Android APK build failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
} finally {
|
||||
Pop-Location
|
||||
}
|
||||
}
|
||||
|
||||
if (-not (Test-Path $apkPath)) {
|
||||
throw "Flutter Android APK not found: $apkPath"
|
||||
}
|
||||
|
||||
$captureArgs = @(
|
||||
"-ExecutionPolicy", "Bypass",
|
||||
"-File", ".\scripts\capture-android-screenshot.ps1",
|
||||
"-OutputPath", $OutputPath,
|
||||
"-ApkPath", $apkPath,
|
||||
"-PackageName", "com.example.eve_parity",
|
||||
"-ActivityName", ".MainActivity",
|
||||
"-LaunchDelaySeconds", $LaunchDelaySeconds,
|
||||
"-Orientation", $Orientation
|
||||
)
|
||||
|
||||
if ($Width -gt 0) {
|
||||
$captureArgs += @("-Width", $Width)
|
||||
}
|
||||
if ($Height -gt 0) {
|
||||
$captureArgs += @("-Height", $Height)
|
||||
}
|
||||
if ($ForceInstall -or -not $SkipBuild) {
|
||||
$captureArgs += "-ForceInstall"
|
||||
}
|
||||
|
||||
powershell @captureArgs
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Android Flutter screenshot failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
param(
|
||||
[ValidateSet("windows", "linux")]
|
||||
[string] $Target = "windows",
|
||||
[ValidateSet("phone", "tablet", "desktop")]
|
||||
[string] $ViewportId = "desktop",
|
||||
[string] $FixtureId = "cultui-inspector",
|
||||
[string] $OutputPath = "artifacts\parity\flutter-windows-cultui-inspector.png"
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$projectRoot = Split-Path -Parent $PSScriptRoot
|
||||
$flutterRoot = Join-Path $projectRoot "flutter\eve_parity"
|
||||
$flutter = Join-Path $projectRoot "tools\deps\flutter\bin\flutter.bat"
|
||||
$assetPath = Join-Path $flutterRoot "assets\current-surface.json"
|
||||
$fontDir = Join-Path $flutterRoot "assets\fonts"
|
||||
$repixelizerAssetDir = Join-Path $flutterRoot "assets\repixelizer"
|
||||
$absoluteOutput = if ([System.IO.Path]::IsPathRooted($OutputPath)) { $OutputPath } else { Join-Path $projectRoot $OutputPath }
|
||||
New-Item -ItemType Directory -Force (Split-Path -Parent $absoluteOutput) | Out-Null
|
||||
New-Item -ItemType Directory -Force (Split-Path -Parent $assetPath) | Out-Null
|
||||
New-Item -ItemType Directory -Force $fontDir | Out-Null
|
||||
New-Item -ItemType Directory -Force $repixelizerAssetDir | Out-Null
|
||||
|
||||
if (-not (Test-Path $flutter)) {
|
||||
throw "Flutter is not installed at $flutter"
|
||||
}
|
||||
|
||||
if ($Target -eq "linux" -and $env:OS -like "Windows*") {
|
||||
throw "Linux Flutter screenshot requires a Linux runner; this host is Windows."
|
||||
}
|
||||
|
||||
Copy-Item -LiteralPath (Join-Path $projectRoot "tools\deps\flutter\bin\cache\artifacts\material_fonts\roboto-regular.ttf") -Destination (Join-Path $fontDir "Roboto-Regular.ttf") -Force
|
||||
Copy-Item -LiteralPath (Join-Path $projectRoot "tools\deps\flutter\bin\cache\artifacts\material_fonts\roboto-bold.ttf") -Destination (Join-Path $fontDir "Roboto-Bold.ttf") -Force
|
||||
curl.exe -L "https://repixelizer.gamecult.org/app/landing-assets/character-input.png" -o (Join-Path $repixelizerAssetDir "character-input.png") | Out-Host
|
||||
curl.exe -L "https://repixelizer.gamecult.org/app/landing-assets/character-repixelized.png" -o (Join-Path $repixelizerAssetDir "character-repixelized.png") | Out-Host
|
||||
|
||||
node .\tools\parity\export-fixture.mjs $FixtureId $assetPath | Out-Host
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Fixture export failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
|
||||
Push-Location $flutterRoot
|
||||
try {
|
||||
& $flutter test --update-goldens "--dart-define=EVE_PARITY_FIXTURE=$FixtureId" --plain-name $ViewportId
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Flutter golden smoke failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
} finally {
|
||||
Pop-Location
|
||||
}
|
||||
|
||||
$golden = Join-Path $flutterRoot "test\goldens\$FixtureId-$ViewportId.png"
|
||||
if (-not (Test-Path $golden) -or (Get-Item $golden).Length -le 0) {
|
||||
throw "Flutter golden did not produce a PNG: $golden"
|
||||
}
|
||||
|
||||
Copy-Item -LiteralPath $golden -Destination $absoluteOutput -Force
|
||||
Write-Host $absoluteOutput
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
param(
|
||||
[string] $SshTarget = "nightwing",
|
||||
[ValidateSet("phone", "tablet", "desktop")]
|
||||
[string] $ViewportId = "desktop",
|
||||
[string] $FixtureId = "cultui-inspector",
|
||||
[string] $OutputPath = "artifacts\parity\linux-flutter-cultui-inspector.png",
|
||||
[string] $RemoteRoot = "~/.local/share/gamecult/eve-parity-runner",
|
||||
[string] $RemoteFlutter = "~/.local/share/gamecult/flutter/bin/flutter"
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$projectRoot = Split-Path -Parent $PSScriptRoot
|
||||
$sourceRoot = Join-Path $projectRoot "flutter\eve_parity"
|
||||
$assetPath = Join-Path $sourceRoot "assets\current-surface.json"
|
||||
$fontDir = Join-Path $sourceRoot "assets\fonts"
|
||||
$repixelizerAssetDir = Join-Path $sourceRoot "assets\repixelizer"
|
||||
$absoluteOutput = if ([System.IO.Path]::IsPathRooted($OutputPath)) { $OutputPath } else { Join-Path $projectRoot $OutputPath }
|
||||
$archivePath = Join-Path ([System.IO.Path]::GetTempPath()) "eve-parity-linux-$([guid]::NewGuid()).tar"
|
||||
New-Item -ItemType Directory -Force (Split-Path -Parent $absoluteOutput) | Out-Null
|
||||
New-Item -ItemType Directory -Force (Split-Path -Parent $assetPath) | Out-Null
|
||||
New-Item -ItemType Directory -Force $fontDir | Out-Null
|
||||
New-Item -ItemType Directory -Force $repixelizerAssetDir | Out-Null
|
||||
|
||||
if (-not (Test-Path $sourceRoot)) {
|
||||
throw "Flutter parity source not found: $sourceRoot"
|
||||
}
|
||||
|
||||
node .\tools\parity\export-fixture.mjs $FixtureId $assetPath | Out-Host
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Fixture export failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
Copy-Item -LiteralPath (Join-Path $projectRoot "tools\deps\flutter\bin\cache\artifacts\material_fonts\roboto-regular.ttf") -Destination (Join-Path $fontDir "Roboto-Regular.ttf") -Force
|
||||
Copy-Item -LiteralPath (Join-Path $projectRoot "tools\deps\flutter\bin\cache\artifacts\material_fonts\roboto-bold.ttf") -Destination (Join-Path $fontDir "Roboto-Bold.ttf") -Force
|
||||
curl.exe -L "https://repixelizer.gamecult.org/app/landing-assets/character-input.png" -o (Join-Path $repixelizerAssetDir "character-input.png") | Out-Host
|
||||
curl.exe -L "https://repixelizer.gamecult.org/app/landing-assets/character-repixelized.png" -o (Join-Path $repixelizerAssetDir "character-repixelized.png") | Out-Host
|
||||
|
||||
try {
|
||||
Push-Location $sourceRoot
|
||||
try {
|
||||
tar --exclude .dart_tool --exclude build -cf $archivePath .
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "tar failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
} finally {
|
||||
Pop-Location
|
||||
}
|
||||
|
||||
ssh $SshTarget "rm -rf $RemoteRoot && mkdir -p $RemoteRoot"
|
||||
scp $archivePath "${SshTarget}:/tmp/eve-parity-linux.tar" | Out-Host
|
||||
ssh $SshTarget "tar -xf /tmp/eve-parity-linux.tar -C $RemoteRoot && rm /tmp/eve-parity-linux.tar"
|
||||
ssh $SshTarget "cd $RemoteRoot && $RemoteFlutter test --update-goldens --dart-define=EVE_PARITY_FIXTURE=$FixtureId --plain-name $ViewportId" | Out-Host
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Nightwing Flutter golden smoke failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
|
||||
$remoteGolden = "$RemoteRoot/test/goldens/$FixtureId-$ViewportId.png"
|
||||
scp "${SshTarget}:$remoteGolden" $absoluteOutput | Out-Host
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "scp from Nightwing failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
} finally {
|
||||
if (Test-Path $archivePath) {
|
||||
Remove-Item -LiteralPath $archivePath -Force
|
||||
}
|
||||
}
|
||||
|
||||
if (-not (Test-Path $absoluteOutput) -or (Get-Item $absoluteOutput).Length -le 0) {
|
||||
throw "Nightwing Flutter capture did not produce a PNG: $absoluteOutput"
|
||||
}
|
||||
|
||||
Write-Host $absoluteOutput
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
param(
|
||||
[string] $SshTarget = "nightwing"
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$projectRoot = Split-Path -Parent $PSScriptRoot
|
||||
$localScript = Join-Path $projectRoot "scripts\install-nightwing-flutter-sdk.sh"
|
||||
$remoteScript = "~/.local/bin/install-eve-flutter-sdk.sh"
|
||||
$stateDir = "~/.local/state/gamecult"
|
||||
$pidPath = "$stateDir/eve-linux-flutter-install.pid"
|
||||
$logPath = "$stateDir/eve-linux-flutter-install.log"
|
||||
|
||||
ssh $SshTarget "mkdir -p ~/.local/bin ~/.local/state/gamecult"
|
||||
scp $localScript "${SshTarget}:$remoteScript" | Out-Host
|
||||
ssh $SshTarget "chmod +x $remoteScript"
|
||||
ssh $SshTarget "nohup $remoteScript >/dev/null 2>&1 & echo `$! > $pidPath && echo $pidPath && echo $logPath"
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
state_dir="$HOME/.local/state/gamecult"
|
||||
sdk_dir="$HOME/.local/share/gamecult/flutter"
|
||||
log_path="$state_dir/eve-linux-flutter-install.log"
|
||||
status_path="$state_dir/eve-linux-flutter-install.status"
|
||||
|
||||
export CI=true
|
||||
export FLUTTER_SUPPRESS_ANALYTICS=true
|
||||
export NO_COLOR=1
|
||||
|
||||
mkdir -p "$state_dir" "$(dirname "$sdk_dir")"
|
||||
|
||||
{
|
||||
date -u '+started %Y-%m-%dT%H:%M:%SZ'
|
||||
if [ ! -x "$sdk_dir/bin/flutter" ]; then
|
||||
rm -rf "$sdk_dir.tmp"
|
||||
git clone --depth 1 -b stable https://github.com/flutter/flutter.git "$sdk_dir.tmp"
|
||||
rm -rf "$sdk_dir"
|
||||
mv "$sdk_dir.tmp" "$sdk_dir"
|
||||
else
|
||||
git -C "$sdk_dir" fetch --depth 1 origin stable
|
||||
git -C "$sdk_dir" checkout stable
|
||||
git -C "$sdk_dir" pull --ff-only origin stable
|
||||
fi
|
||||
|
||||
"$sdk_dir/bin/flutter" --disable-analytics
|
||||
"$sdk_dir/bin/flutter" --version
|
||||
"$sdk_dir/bin/flutter" precache --linux
|
||||
date -u '+completed %Y-%m-%dT%H:%M:%SZ'
|
||||
echo complete > "$status_path"
|
||||
} >> "$log_path" 2>&1
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
param(
|
||||
[string] $ExportDirectory = "artifacts\conformance\latest",
|
||||
[string] $FlutterRoot = "flutter\eve_parity",
|
||||
[string] $ConsumerDirectory = "artifacts\eveflutter-conformance-consumer-smoke"
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$projectRoot = Split-Path -Parent $PSScriptRoot
|
||||
$sourceExport = if ([System.IO.Path]::IsPathRooted($ExportDirectory)) {
|
||||
$ExportDirectory
|
||||
} else {
|
||||
Join-Path $projectRoot $ExportDirectory
|
||||
}
|
||||
$flutterRootPath = if ([System.IO.Path]::IsPathRooted($FlutterRoot)) {
|
||||
$FlutterRoot
|
||||
} else {
|
||||
Join-Path $projectRoot $FlutterRoot
|
||||
}
|
||||
$consumerRoot = if ([System.IO.Path]::IsPathRooted($ConsumerDirectory)) {
|
||||
$ConsumerDirectory
|
||||
} else {
|
||||
Join-Path $projectRoot $ConsumerDirectory
|
||||
}
|
||||
$consumerExport = Join-Path $consumerRoot "export"
|
||||
|
||||
if (-not (Test-Path $sourceExport)) {
|
||||
throw "Conformance export not found: $sourceExport"
|
||||
}
|
||||
if (-not (Test-Path $flutterRootPath)) {
|
||||
throw "EveFlutter consumer root not found: $flutterRootPath"
|
||||
}
|
||||
|
||||
if (Test-Path $consumerExport) {
|
||||
Remove-Item -LiteralPath $consumerExport -Recurse -Force
|
||||
}
|
||||
New-Item -ItemType Directory -Force -Path $consumerRoot | Out-Null
|
||||
Copy-Item -LiteralPath $sourceExport -Destination $consumerExport -Recurse
|
||||
|
||||
$consumerScript = Join-Path $projectRoot "tools\conformance\consume-export.mjs"
|
||||
|
||||
Push-Location $flutterRootPath
|
||||
try {
|
||||
node $consumerScript $consumerExport `
|
||||
--expect-pack runtime `
|
||||
--expect-pack provider `
|
||||
--expect-fixture sai-vn `
|
||||
--expect-provider gamecult.home.vn `
|
||||
--expect-runtime windows-flutter `
|
||||
--expect-runtime linux-flutter `
|
||||
--expect-runtime android-flutter `
|
||||
--expect-runtime-status windows-flutter:active `
|
||||
--expect-runtime-feature windows-flutter:embeddedDocuments `
|
||||
--expect-runtime-command-schema windows-flutter:gamecult.eve.command_invocation.v1 `
|
||||
--expect-runtime-capture-status windows-flutter:golden `
|
||||
--expect-split-target EveFlutter
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "EveFlutter conformance consumer smoke failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
} finally {
|
||||
Pop-Location
|
||||
}
|
||||
|
|
@ -1,82 +0,0 @@
|
|||
param(
|
||||
[string] $LifecyclePath = "flutter\eve_parity\eveflutter-lifecycle.json",
|
||||
[switch] $SkipAnalyze
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$projectRoot = Split-Path -Parent $PSScriptRoot
|
||||
$absoluteLifecyclePath = if ([System.IO.Path]::IsPathRooted($LifecyclePath)) {
|
||||
$LifecyclePath
|
||||
} else {
|
||||
Join-Path $projectRoot $LifecyclePath
|
||||
}
|
||||
|
||||
if (-not (Test-Path $absoluteLifecyclePath)) {
|
||||
throw "EveFlutter lifecycle document not found: $absoluteLifecyclePath"
|
||||
}
|
||||
|
||||
$lifecycle = Get-Content -LiteralPath $absoluteLifecyclePath -Raw | ConvertFrom-Json
|
||||
|
||||
if ($lifecycle.schema -ne "gamecult.eve.runtime_lifecycle.v1") {
|
||||
throw "Unexpected lifecycle schema: $($lifecycle.schema)"
|
||||
}
|
||||
if ($lifecycle.splitTarget -ne "EveFlutter") {
|
||||
throw "Unexpected split target: $($lifecycle.splitTarget)"
|
||||
}
|
||||
if ($lifecycle.ownerRepo -ne "EveFlutter") {
|
||||
throw "Unexpected owner repo: $($lifecycle.ownerRepo)"
|
||||
}
|
||||
if ($lifecycle.currentHostRepo -ne "Eve") {
|
||||
throw "Unexpected current host repo: $($lifecycle.currentHostRepo)"
|
||||
}
|
||||
|
||||
$expectedRuntimes = @("windows-flutter", "linux-flutter", "android-flutter")
|
||||
foreach ($runtimeId in $expectedRuntimes) {
|
||||
if (-not ($lifecycle.runtimes -contains $runtimeId)) {
|
||||
throw "EveFlutter lifecycle missing runtime: $runtimeId"
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($stage in @("release", "test", "capture")) {
|
||||
$stageDocument = $lifecycle.$stage
|
||||
if ($null -eq $stageDocument) {
|
||||
throw "EveFlutter lifecycle missing stage: $stage"
|
||||
}
|
||||
if ($stageDocument.ownerRepo -ne "EveFlutter") {
|
||||
throw "EveFlutter lifecycle stage $stage has unexpected owner: $($stageDocument.ownerRepo)"
|
||||
}
|
||||
if (-not $stageDocument.status) {
|
||||
throw "EveFlutter lifecycle stage $stage missing status"
|
||||
}
|
||||
foreach ($evidencePath in $stageDocument.evidencePaths) {
|
||||
$absoluteEvidencePath = Join-Path $projectRoot $evidencePath
|
||||
if (-not (Test-Path $absoluteEvidencePath)) {
|
||||
throw "EveFlutter lifecycle stage $stage missing evidence path: $evidencePath"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (-not $SkipAnalyze) {
|
||||
$dart = Join-Path $projectRoot "tools\deps\flutter\bin\cache\dart-sdk\bin\dart.exe"
|
||||
if (-not (Test-Path $dart)) {
|
||||
throw "Dart SDK not found: $dart"
|
||||
}
|
||||
|
||||
Push-Location (Join-Path $projectRoot "flutter\eve_parity")
|
||||
try {
|
||||
& $dart analyze lib test
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "EveFlutter Dart analyzer failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
} finally {
|
||||
Pop-Location
|
||||
}
|
||||
}
|
||||
|
||||
& (Join-Path $projectRoot "scripts\run-eveflutter-conformance-consumer-smoke.ps1")
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "EveFlutter conformance consumer smoke failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
|
||||
Write-Host "EveFlutter lifecycle smoke passed: $absoluteLifecyclePath"
|
||||
45
scripts/run-eveflutter-owner-smoke.ps1
Normal file
45
scripts/run-eveflutter-owner-smoke.ps1
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
param(
|
||||
[string] $EveFlutterRoot = "E:\Projects\EveFlutter",
|
||||
[string] $FlutterRoot = "E:\Projects\Eve\tools\deps\flutter"
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$dart = Join-Path $FlutterRoot "bin\cache\dart-sdk\bin\dart.exe"
|
||||
$flutter = Join-Path $FlutterRoot "bin\flutter.bat"
|
||||
$surfacePath = Join-Path $EveFlutterRoot "assets\current-surface.json"
|
||||
$fontDirectory = Join-Path $EveFlutterRoot "assets\fonts"
|
||||
|
||||
foreach ($path in @(
|
||||
(Join-Path $EveFlutterRoot "lib\main.dart"),
|
||||
(Join-Path $EveFlutterRoot "test\parity_smoke_test.dart"),
|
||||
(Join-Path $EveFlutterRoot "eveflutter-lifecycle.json"),
|
||||
$dart,
|
||||
$flutter
|
||||
)) {
|
||||
if (-not (Test-Path -LiteralPath $path -PathType Leaf)) { throw "EveFlutter owner dependency is missing: $path" }
|
||||
}
|
||||
|
||||
$runtimeSources = Get-Content (Join-Path $EveFlutterRoot "lib\main.dart") -Raw
|
||||
if ($runtimeSources -match "aetheria|repixelizer|gamecult\.home") {
|
||||
throw "EveFlutter runtime source contains provider-specific authority."
|
||||
}
|
||||
|
||||
New-Item -ItemType Directory -Force -Path $fontDirectory | Out-Null
|
||||
node (Join-Path (Split-Path -Parent $PSScriptRoot) "tools\parity\export-fixture.mjs") cultui-inspector $surfacePath
|
||||
if ($LASTEXITCODE -ne 0) { throw "Eve fixture export for EveFlutter failed." }
|
||||
Copy-Item -LiteralPath (Join-Path $FlutterRoot "bin\cache\artifacts\material_fonts\roboto-regular.ttf") -Destination (Join-Path $fontDirectory "Roboto-Regular.ttf") -Force
|
||||
Copy-Item -LiteralPath (Join-Path $FlutterRoot "bin\cache\artifacts\material_fonts\roboto-bold.ttf") -Destination (Join-Path $fontDirectory "Roboto-Bold.ttf") -Force
|
||||
|
||||
Push-Location $EveFlutterRoot
|
||||
try {
|
||||
& $dart analyze lib test
|
||||
if ($LASTEXITCODE -ne 0) { throw "EveFlutter analyzer failed." }
|
||||
|
||||
$path = "C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\Git\cmd;C:\Program Files\nodejs"
|
||||
cmd /d /s /c "set PATH=$path&& $flutter test test\parity_smoke_test.dart"
|
||||
if ($LASTEXITCODE -ne 0) { throw "EveFlutter tests failed." }
|
||||
} finally {
|
||||
Pop-Location
|
||||
}
|
||||
|
||||
Write-Host "EveFlutter owner smoke passed: $EveFlutterRoot"
|
||||
|
|
@ -28,6 +28,7 @@ try {
|
|||
-SkipBuild
|
||||
& (Join-Path $PSScriptRoot "run-eveunity-owner-smoke.ps1")
|
||||
& (Join-Path $PSScriptRoot "run-eveplugins-owner-smoke.ps1")
|
||||
& (Join-Path $PSScriptRoot "run-eveflutter-owner-smoke.ps1")
|
||||
& (Join-Path $PSScriptRoot "run-evetui-capture-smoke.ps1")
|
||||
& (Join-Path $PSScriptRoot "run-evetui-capture-smoke.ps1") `
|
||||
-AdvertisementPath "web\fixtures\eve-world-smoke.provider-advertisement.json" `
|
||||
|
|
|
|||
|
|
@ -81,6 +81,9 @@ try {
|
|||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Semantic parity harness failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
$flutterSurface = Join-Path $runRoot "flutter-current-surface.json"
|
||||
node .\tools\parity\export-fixture.mjs $ProviderId $flutterSurface | Out-Host
|
||||
if ($LASTEXITCODE -ne 0) { throw "Flutter fixture export failed with exit code $LASTEXITCODE" }
|
||||
|
||||
foreach ($case in $responsiveCases) {
|
||||
Invoke-Capture "web-$($case.id)" {
|
||||
|
|
@ -106,8 +109,9 @@ try {
|
|||
Invoke-Capture "android-flutter-$($case.id)" {
|
||||
$args = @(
|
||||
"-ExecutionPolicy", "Bypass",
|
||||
"-File", ".\scripts\capture-android-flutter-parity.ps1",
|
||||
"-File", "E:\Projects\EveFlutter\scripts\capture-android-flutter-parity.ps1",
|
||||
"-FixtureId", $ProviderId,
|
||||
"-SurfacePath", $flutterSurface,
|
||||
"-OutputPath", (Join-Path $runRoot "android-flutter-periwinkle-$($case.id).png"),
|
||||
"-Width", $case.width,
|
||||
"-Height", $case.height,
|
||||
|
|
@ -125,8 +129,9 @@ try {
|
|||
|
||||
foreach ($case in $androidDeviceCases) {
|
||||
Invoke-Capture "android-flutter-$($case.id)" {
|
||||
powershell -ExecutionPolicy Bypass -File .\scripts\capture-android-flutter-parity.ps1 `
|
||||
powershell -ExecutionPolicy Bypass -File E:\Projects\EveFlutter\scripts\capture-android-flutter-parity.ps1 `
|
||||
-FixtureId $ProviderId `
|
||||
-SurfacePath $flutterSurface `
|
||||
-OutputPath (Join-Path $runRoot "android-flutter-periwinkle-$($case.id).png") `
|
||||
-Orientation $case.orientation `
|
||||
-SkipBuild
|
||||
|
|
@ -135,9 +140,10 @@ try {
|
|||
|
||||
foreach ($case in $responsiveCases) {
|
||||
Invoke-Capture "windows-$($case.id)" {
|
||||
powershell -ExecutionPolicy Bypass -File .\scripts\capture-flutter-parity.ps1 `
|
||||
powershell -ExecutionPolicy Bypass -File E:\Projects\EveFlutter\scripts\capture-flutter-parity.ps1 `
|
||||
-Target windows `
|
||||
-FixtureId $ProviderId `
|
||||
-SurfacePath $flutterSurface `
|
||||
-ViewportId $case.id `
|
||||
-OutputPath (Join-Path $runRoot "windows-flutter-$ProviderId-$($case.id).png")
|
||||
}
|
||||
|
|
@ -145,9 +151,10 @@ try {
|
|||
|
||||
foreach ($case in $responsiveCases) {
|
||||
Invoke-Capture "linux-$($case.id)" {
|
||||
powershell -ExecutionPolicy Bypass -File .\scripts\capture-linux-flutter-parity.ps1 `
|
||||
powershell -ExecutionPolicy Bypass -File E:\Projects\EveFlutter\scripts\capture-linux-flutter-parity.ps1 `
|
||||
-SshTarget $LinuxSshTarget `
|
||||
-FixtureId $ProviderId `
|
||||
-SurfacePath $flutterSurface `
|
||||
-ViewportId $case.id `
|
||||
-OutputPath (Join-Path $runRoot "linux-flutter-$ProviderId-$($case.id).png")
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue