From 711a9b503704fb0c72c77672eeb5e78db74c035a Mon Sep 17 00:00:00 2001 From: omigamedev Date: Fri, 5 Jun 2026 12:35:47 +0200 Subject: [PATCH] Add Android native package smoke checks --- docs/modernization/build-inventory.md | 13 +- docs/modernization/debt.md | 11 +- docs/modernization/roadmap.md | 15 ++- scripts/automation/package-smoke.ps1 | 128 ++++++++++++++++++- scripts/automation/package-smoke.sh | 6 +- scripts/dev/check_package_smoke_readiness.py | 9 ++ 6 files changed, 162 insertions(+), 20 deletions(-) diff --git a/docs/modernization/build-inventory.md b/docs/modernization/build-inventory.md index a36f412..fa47f71 100644 --- a/docs/modernization/build-inventory.md +++ b/docs/modernization/build-inventory.md @@ -77,6 +77,7 @@ powershell -ExecutionPolicy Bypass -File scripts\automation\android-legacy-packa powershell -ExecutionPolicy Bypass -File scripts\automation\android-legacy-package-build.ps1 -Packages quest,focus -ConfigureOnly powershell -ExecutionPolicy Bypass -File scripts\automation\package-smoke.ps1 -Preset windows-msvc-default -Configuration Debug powershell -ExecutionPolicy Bypass -File scripts\automation\package-smoke.ps1 -ReadinessOnly +powershell -ExecutionPolicy Bypass -File scripts\automation\package-smoke.ps1 -ReadinessOnly -AndroidNativeChecks -PackageKinds android-standard-apk,android-quest-apk,android-focus-apk cmake --fresh --preset windows-clangcl-asan python scripts/dev/clangd_nav.py symbols --file src/app_core/brush_ui.h --name execute_brush python scripts/dev/clangd_nav.py symbols --file src/app_core/brush_ui.h --name-regex "execute_.*preset" @@ -176,10 +177,14 @@ powershell -ExecutionPolicy Bypass -File scripts\automation\apple-remote-build.p emit the Windows AppX, Android standard/Quest/Focus APK, Apple bundle, and WebGL package readiness matrix without first building an app artifact. The full package smoke command still builds/checks the selected app target before - reporting the same readiness matrix. `scripts/dev/check_package_smoke_readiness.py`, - registered as `panopainter_package_smoke_readiness_self_test`, verifies both - wrappers keep the same six package kinds, blocked DEBT-0011 status, and - readiness-only mode. + reporting the same readiness matrix. `package-smoke.ps1 + -AndroidNativeChecks` also runs the retained Android standard `native-lib` + build and Quest/Focus configure helper for selected Android package kinds, + then reports those native results beside the APK blocker matrix. + `scripts/dev/check_package_smoke_readiness.py`, registered as + `panopainter_package_smoke_readiness_self_test`, verifies both wrappers keep + the same six package kinds, blocked DEBT-0011 status, readiness-only mode, + and retained Android native-check prerequisite metadata. - Root CMake exposes named `fuzz` and `stress` CTest presets. `fuzz` currently runs deterministic parser/serializer edge tests for binary streams, image metadata, PPI, stroke scripts, and layout XML; `stress` currently runs the diff --git a/docs/modernization/debt.md b/docs/modernization/debt.md index 28dec76..8071a05 100644 --- a/docs/modernization/debt.md +++ b/docs/modernization/debt.md @@ -262,6 +262,13 @@ agent or engineer to remove them without reconstructing context from chat. wrapper output, and the current host installed/validated NDK `30.0.14904198` plus CMake `4.1.2`. Root Android `pp_assets`, retained standard `native-lib`, and retained Quest/Focus configure gates pass with that pair. +- 2026-06-05: DEBT-0011 was narrowed again. `package-smoke.ps1` now has + `-AndroidNativeChecks`, which invokes the retained Android standard + `native-lib` build and Quest/Focus configure helper for selected Android + package kinds and reports those structured results beside the still-blocked + APK readiness matrix. The shell readiness wrapper now advertises the same + retained-native validation commands, and the package-smoke self-test guards + that metadata. - 2026-06-04: DEBT-0036 was narrowed again. Canvas stroke commit, thumbnail, and object-draw history paths now query saved blend state through tested `pp_renderer_gl` capability-state dispatch; CanvasLayer equirect @@ -285,9 +292,9 @@ agent or engineer to remove them without reconstructing context from chat. | DEBT-0005 | Open | Modernization | Temporary local CTest harness is used before Catch2 is wired through vcpkg | `vcpkg` is not currently on PATH, but headless tests need to run now | `ctest --preset desktop-fast --build-config Debug` | Replace `tests/test_harness.h` tests with Catch2 tests once vcpkg toolchain/presets are validated | | DEBT-0007 | Open | Modernization | `vcpkg.json` and `windows-msvc-vcpkg-headless` are validated for the headless Windows component matrix, but app targets still use vendored libraries and Android/Apple triplets are not proven | Dependency migration must stay incremental while SDK/patched/vendor dependencies remain in use | `$env:VCPKG_ROOT="C:\Program Files\Microsoft Visual Studio\2022\Community\VC\vcpkg"; cmake --preset windows-msvc-vcpkg-headless`; `ctest --preset desktop-fast-vcpkg --build-config Debug` | Component targets consume vcpkg packages where reliable and desktop app, Android, and Apple triplets are validated or explicitly documented as permanent vendor exceptions | | DEBT-0008 | Open | Modernization | `windows-msvc-default` preset is used for local validation because the VS 2026 generator is not installed here | The target VS 2026 preset must remain, but this machine configures with Visual Studio 17 2022 | `cmake --preset windows-msvc-default`; `ctest --preset desktop-fast --build-config Debug` | Validate `windows-vs2026-x64` on a machine with Visual Studio 2026 installed and make it the default Windows validation preset | -| DEBT-0009 | Open | Modernization | Android root CMake validation currently builds headless targets only, while retained standard/Quest/Focus package CMake paths now have a refreshed CMake 3.10/C++23 baseline outside root CMake; automation selects the newest installed SDK Manager NDK/CMake pair before configure | Platform app entrypoints still live in legacy Gradle/CMake projects and need Phase 6 alignment | `powershell -ExecutionPolicy Bypass -File scripts\automation\platform-build.ps1 -Presets android-arm64`; `cmake --build --preset android-x64`; `cmake --build --preset android-quest-arm64`; `cmake --build --preset android-focus-arm64`; `powershell -ExecutionPolicy Bypass -File scripts\automation\android-legacy-package-build.ps1 -Packages standard`; `powershell -ExecutionPolicy Bypass -File scripts\automation\android-legacy-package-build.ps1 -Packages quest,focus -ConfigureOnly` | Android standard, Quest, and Focus/Wave package targets consume shared component targets and have package smoke commands | +| DEBT-0009 | Open | Modernization | Android root CMake validation currently builds headless targets only, while retained standard/Quest/Focus package CMake paths now have a refreshed CMake 3.10/C++23 baseline outside root CMake; automation selects the newest installed SDK Manager NDK/CMake pair before configure | Platform app entrypoints still live in legacy Gradle/CMake projects and need Phase 6 alignment | `powershell -ExecutionPolicy Bypass -File scripts\automation\platform-build.ps1 -Presets android-arm64`; `cmake --build --preset android-x64`; `cmake --build --preset android-quest-arm64`; `cmake --build --preset android-focus-arm64`; `powershell -ExecutionPolicy Bypass -File scripts\automation\android-legacy-package-build.ps1 -Packages standard`; `powershell -ExecutionPolicy Bypass -File scripts\automation\android-legacy-package-build.ps1 -Packages quest,focus -ConfigureOnly`; `powershell -ExecutionPolicy Bypass -File scripts\automation\package-smoke.ps1 -ReadinessOnly -AndroidNativeChecks -PackageKinds android-standard-apk,android-quest-apk,android-focus-apk` | Android standard, Quest, and Focus/Wave package targets consume shared component targets and have package smoke commands | | DEBT-0010 | Open | Modernization | `pp_document` is a pure layer/frame/document/undo-history model with alpha-lock metadata, snapshot construction, per-layer frame metadata, renderer-free RGBA8 face payload storage, snapshot-embedded face-payload validation, renderer-free alpha8 selection-mask storage, PPI import/export helpers, and stroke-script-to-face-payload CLI automation, but it is not yet wired to legacy `Canvas`, legacy save, or legacy action commands | Keep extraction incremental while preserving app behavior | `ctest --preset desktop-fast --build-config Debug`; `pano_cli create-document --width 64 --height 32 --layers 2`; `pano_cli load-project --path tests\data\projects\minimal-project.ppi`; `pp_document_tests`; `pp_document_ppi_import_tests`; `pp_document_ppi_export_tests`; `pano_cli_simulate_document_edits_smoke`; `pano_cli_simulate_document_export_smoke`; `pano_cli_save_document_project_roundtrip_smoke`; `pano_cli_apply_stroke_script_roundtrip_smoke`; `pano_cli_apply_stroke_script_rejects_tiny_canvas` | Legacy document behavior is represented by `pp_document` tests and the app consumes it through a boundary/facade | -| DEBT-0011 | Open | Modernization | `package-smoke` validates the Windows CMake app artifact and reports a structured package readiness matrix for Windows AppX, Android standard/Quest/Focus APKs, Apple bundles, and WebGL output; retained Android package native CMake paths are refreshed and use latest SDK-managed NDK/CMake selection, but APK outputs are still `blocked` because root CMake package targets do not exist yet | Platform package targets are not migrated to root CMake yet | `powershell -ExecutionPolicy Bypass -File scripts\automation\package-smoke.ps1 -Preset windows-msvc-default -Configuration Debug`; `bash -n scripts/automation/package-smoke.sh`; retained Android standard `native-lib` build and Quest/Focus configure checks | Package-smoke builds and validates Windows AppX, Android APK variants, Apple bundles, and WebGL output where local toolchains are present | +| DEBT-0011 | Open | Modernization | `package-smoke` validates the Windows CMake app artifact and reports a structured package readiness matrix for Windows AppX, Android standard/Quest/Focus APKs, Apple bundles, and WebGL output; retained Android package native CMake paths are refreshed, use latest SDK-managed NDK/CMake selection, and can be run from `package-smoke.ps1 -AndroidNativeChecks`, but APK outputs are still `blocked` because root CMake package targets do not exist yet | Platform package targets are not migrated to root CMake yet | `powershell -ExecutionPolicy Bypass -File scripts\automation\package-smoke.ps1 -Preset windows-msvc-default -Configuration Debug`; `powershell -ExecutionPolicy Bypass -File scripts\automation\package-smoke.ps1 -ReadinessOnly -AndroidNativeChecks -PackageKinds android-standard-apk,android-quest-apk,android-focus-apk`; `python scripts/dev/check_package_smoke_readiness.py`; `bash -n scripts/automation/package-smoke.sh` | Package-smoke builds and validates Windows AppX, Android APK variants, Apple bundles, and WebGL output where local toolchains are present | | DEBT-0012 | Open | Modernization | `pp_ui_core` uses vcpkg tinyxml2 on `windows-msvc-vcpkg-headless`, but retains `pp_vendor_tinyxml2` for default and unproven platform presets | Mobile/AppX/Apple triplets and app packaging still need validation before removing the vendored fallback | `ctest --preset desktop-fast-vcpkg --build-config Debug`; `ctest --preset desktop-fast --build-config Debug`; `powershell -ExecutionPolicy Bypass -File scripts\automation\platform-build.ps1 -Presets android-arm64` | All supported presets consume vcpkg tinyxml2 or document a permanent vendored exception | | DEBT-0013 | Open | Modernization | `pp_assets`, `pp_document`, `pano_cli inspect-project`, `pano_cli load-project`, and `pano_cli save-project` validate the fixed PPI header, thumbnail/body byte layout, generated multi-layer/multi-frame PPI writing with explicit layer opacity/blend/alpha-lock/visibility metadata, per-layer frame durations, metadata-only and targeted dirty-face-payload save/load round-trips, layer/frame index, dirty-face descriptors, dirty-face PNG payload metadata, asset-level RGBA PNG payload decoding, pure document-to-PPI export, CLI document export automation, file-writing document export automation, stroke-script-generated document payload export, and decoded pixel attachment to `pp_document`, but full legacy PPI round-trip parity is not yet extracted | Full PPI save parity requires staged extraction of legacy `Canvas` serialization and image/layer payload handling | `ctest --preset desktop-fast --build-config Debug`; `pp_assets_image_pixels_tests`; `pp_assets_ppi_header_tests`; `pp_document_ppi_import_tests`; `pp_document_ppi_export_tests`; `pano_cli_inspect_project_layout_smoke`; `pano_cli_load_project_metadata_smoke`; `pano_cli_save_project_roundtrip_smoke`; `pano_cli_save_project_payload_roundtrip_smoke`; `pano_cli_simulate_document_export_smoke`; `pano_cli_save_document_project_roundtrip_smoke`; `pano_cli_apply_stroke_script_roundtrip_smoke`; `pano_cli_apply_stroke_script_rejects_tiny_canvas` | Full PPI load/save fixtures cover thumbnails, decoded layer face payloads attached to documents, frames, corrupt payloads, dirty-face payload saving, arbitrary legacy canvas payload/layout combinations, and legacy app round-trip compatibility | | DEBT-0014 | Open | Modernization | `windows-clangcl-asan` now configures as a headless Ninja/clang-cl preset and uses the release MSVC runtime required by ASan, but local builds still fail because installed clang-cl 18.1.8 is paired with VS 2026-preview STL headers that require Clang 20 or newer | Sanitizer validation should be local and repeatable, but this machine's compiler/header pairing is incompatible | `cmake --fresh --preset windows-clangcl-asan`; `cmake --build --preset windows-clangcl-asan --target pp_foundation` | Install/use Clang 20+ with the VS 2026 STL, or point the preset at a compatible VS 2022 toolchain, then make `platform-build.ps1 -Presets windows-clangcl-asan` pass for the headless matrix | diff --git a/docs/modernization/roadmap.md b/docs/modernization/roadmap.md index 1c01b4e..91cba33 100644 --- a/docs/modernization/roadmap.md +++ b/docs/modernization/roadmap.md @@ -1389,9 +1389,12 @@ AppX, Android standard/Quest/Focus APKs, Apple bundles, and WebGL output, with blocked prerequisites tied to DEBT-0011. It also has a readiness-only mode for cheap package blocker inventory without building an app artifact, and `panopainter_package_smoke_readiness_self_test` keeps the PowerShell and shell -readiness matrices aligned. App/package entrypoints still need to consume -shared targets and remain covered by debt until package validation is migrated -from legacy package projects to root CMake. +readiness matrices aligned. The PowerShell wrapper can also run the retained +Android native package checks through `-AndroidNativeChecks`, reporting the +standard `native-lib` build plus Quest/Focus configure checks next to the APK +blocker matrix. App/package entrypoints still need to consume shared targets +and remain covered by debt until package validation is migrated from legacy +package projects to root CMake. Apple compile validation now runs on the local Mac mini SSH host `panopainter-mac` through `scripts/automation/apple-remote-build.ps1`. The host uses Homebrew CMake/Ninja/Git plus full Xcode via `DEVELOPER_DIR`, pulls the @@ -2377,7 +2380,11 @@ Results: configure with the same compatibility helper and current Yoga source list. The Android platform-build wrapper and retained package helper now select the newest installed SDK Manager NDK/CMake pair automatically and report the - selected versions in their structured output. + selected versions in their structured output. `package-smoke.ps1 + -ReadinessOnly -AndroidNativeChecks -PackageKinds + android-standard-apk,android-quest-apk,android-focus-apk` now runs those + retained native checks from the package-smoke surface while keeping APK + readiness blocked on root CMake package-target migration. - Desktop VR drawing now routes generic OpenGL scissor/depth/blend state, blend/depth state snapshots and restores, depth clears, active texture units, and fallback 2D texture unbinds through tested renderer GL backend dispatch; diff --git a/scripts/automation/package-smoke.ps1 b/scripts/automation/package-smoke.ps1 index e8fe3a0..fc48695 100644 --- a/scripts/automation/package-smoke.ps1 +++ b/scripts/automation/package-smoke.ps1 @@ -4,6 +4,7 @@ param( [string]$Configuration = "Debug", [string]$Target = "PanoPainter", [switch]$ReadinessOnly, + [switch]$AndroidNativeChecks, [string[]]$PackageKinds = @( "windows-appx", "android-standard-apk", @@ -23,6 +24,21 @@ function Test-CommandAvailable { return [bool](Get-Command $Name -ErrorAction SilentlyContinue) } +function Expand-ArgumentList { + param([string[]]$Values) + + $expanded = @() + foreach ($value in $Values) { + foreach ($part in ($value -split ",")) { + $trimmed = $part.Trim() + if ($trimmed.Length -gt 0) { + $expanded += $trimmed + } + } + } + return $expanded +} + function New-ArtifactCheck { param( [string]$Name, @@ -81,6 +97,85 @@ function New-PackageReadiness { } } +function Get-AndroidNativeCheckPlan { + param([string[]]$Kinds) + + $packages = @() + if ($Kinds -contains "android-standard-apk") { + $packages += [ordered]@{ + packages = @("standard") + configureOnly = $false + } + } + + $configureOnlyPackages = @() + if ($Kinds -contains "android-quest-apk") { + $configureOnlyPackages += "quest" + } + if ($Kinds -contains "android-focus-apk") { + $configureOnlyPackages += "focus" + } + if ($configureOnlyPackages.Count -gt 0) { + $packages += [ordered]@{ + packages = $configureOnlyPackages + configureOnly = $true + } + } + + return $packages +} + +function Invoke-AndroidNativePackageChecks { + param([string[]]$Kinds) + + $plans = @(Get-AndroidNativeCheckPlan -Kinds $Kinds) + $results = @() + $overallExitCode = 0 + + foreach ($plan in $plans) { + $arguments = @( + "-ExecutionPolicy", "Bypass", + "-File", (Join-Path $root "scripts/automation/android-legacy-package-build.ps1"), + "-Packages", ($plan.packages -join ",") + ) + if ($plan.configureOnly) { + $arguments += "-ConfigureOnly" + } + + $output = @(& powershell @arguments 2>&1) + $exitCode = $LASTEXITCODE + if ($exitCode -ne 0 -and $overallExitCode -eq 0) { + $overallExitCode = $exitCode + } + + $jsonLine = @($output | ForEach-Object { $_.ToString() } | Where-Object { $_.TrimStart().StartsWith("{") } | Select-Object -Last 1) + $summary = $null + if ($jsonLine.Count -gt 0) { + try { + $summary = $jsonLine[-1] | ConvertFrom-Json + } catch { + $summary = $null + } + } + + $results += [ordered]@{ + packages = $plan.packages + configureOnly = [bool]$plan.configureOnly + exitCode = $exitCode + command = "powershell -ExecutionPolicy Bypass -File scripts\automation\android-legacy-package-build.ps1 -Packages $($plan.packages -join ',')$(if ($plan.configureOnly) { ' -ConfigureOnly' } else { '' })" + summary = $summary + } + } + + [ordered]@{ + requested = $plans.Count -gt 0 + exitCode = $overallExitCode + results = $results + } +} + +$PackageKinds = @(Expand-ArgumentList -Values $PackageKinds) + function Get-PackageReadiness { param([string[]]$Kinds) @@ -120,6 +215,7 @@ function Get-PackageReadiness { (New-Prerequisite -Name "gradle-build" -Available (Test-Path -LiteralPath $gradle -PathType Leaf) -Detail $gradle), (New-Prerequisite -Name "android-manifest" -Available (Test-Path -LiteralPath $manifest -PathType Leaf) -Detail $manifest), (New-Prerequisite -Name "gradle" -Available (Test-CommandAvailable "gradle") -Detail "Android package builder"), + (New-Prerequisite -Name "retained-native-cmake-check" -Available $true -Detail "powershell -ExecutionPolicy Bypass -File scripts\automation\android-legacy-package-build.ps1 -Packages standard"), (New-Prerequisite -Name "root-cmake-preset" -Available $true -Detail "android-arm64/android-x64"), (New-Prerequisite -Name "root-cmake-package-target" -Available $false -Detail "Not migrated yet") ) ` @@ -140,6 +236,7 @@ function Get-PackageReadiness { (New-Prerequisite -Name "gradle-build" -Available (Test-Path -LiteralPath $gradle -PathType Leaf) -Detail $gradle), (New-Prerequisite -Name "android-manifest" -Available (Test-Path -LiteralPath $manifest -PathType Leaf) -Detail $manifest), (New-Prerequisite -Name "gradle" -Available (Test-CommandAvailable "gradle") -Detail "Android package builder"), + (New-Prerequisite -Name "retained-native-cmake-check" -Available $true -Detail "powershell -ExecutionPolicy Bypass -File scripts\automation\android-legacy-package-build.ps1 -Packages quest -ConfigureOnly"), (New-Prerequisite -Name "root-cmake-preset" -Available $true -Detail "android-quest-arm64"), (New-Prerequisite -Name "root-cmake-package-target" -Available $false -Detail "Not migrated yet") ) ` @@ -160,6 +257,7 @@ function Get-PackageReadiness { (New-Prerequisite -Name "gradle-build" -Available (Test-Path -LiteralPath $gradle -PathType Leaf) -Detail $gradle), (New-Prerequisite -Name "android-manifest" -Available (Test-Path -LiteralPath $manifest -PathType Leaf) -Detail $manifest), (New-Prerequisite -Name "gradle" -Available (Test-CommandAvailable "gradle") -Detail "Android package builder"), + (New-Prerequisite -Name "retained-native-cmake-check" -Available $true -Detail "powershell -ExecutionPolicy Bypass -File scripts\automation\android-legacy-package-build.ps1 -Packages focus -ConfigureOnly"), (New-Prerequisite -Name "root-cmake-preset" -Available $true -Detail "android-focus-arm64"), (New-Prerequisite -Name "root-cmake-package-target" -Available $false -Detail "Not migrated yet") ) ` @@ -208,6 +306,16 @@ function Get-PackageReadiness { return $readiness } +$androidNativeValidation = if ($AndroidNativeChecks) { + Invoke-AndroidNativePackageChecks -Kinds $PackageKinds +} else { + [ordered]@{ + requested = $false + exitCode = 0 + results = @() + } +} + if ($ReadinessOnly) { $elapsed = [int]((Get-Date) - $started).TotalMilliseconds [ordered]@{ @@ -218,9 +326,10 @@ if ($ReadinessOnly) { stage = "readiness" exitCode = 0 elapsedMs = $elapsed - packageReadiness = Get-PackageReadiness -Kinds $PackageKinds - } | ConvertTo-Json -Compress -Depth 5 - exit 0 + androidNativeValidation = $androidNativeValidation + packageReadiness = @(Get-PackageReadiness -Kinds $PackageKinds) + } | ConvertTo-Json -Compress -Depth 8 + exit $androidNativeValidation.exitCode } & cmake --build --preset $Preset --config $Configuration --target $Target @@ -235,8 +344,9 @@ if ($buildExitCode -ne 0) { stage = "build" exitCode = $buildExitCode elapsedMs = $elapsed - packageReadiness = Get-PackageReadiness -Kinds $PackageKinds - } | ConvertTo-Json -Compress + androidNativeValidation = $androidNativeValidation + packageReadiness = @(Get-PackageReadiness -Kinds $PackageKinds) + } | ConvertTo-Json -Compress -Depth 8 exit $buildExitCode } @@ -249,6 +359,9 @@ $checks = @( $failed = @($checks | Where-Object { -not $_.exists }) $exitCode = if ($failed.Count -eq 0) { 0 } else { 2 } +if ($androidNativeValidation.exitCode -ne 0 -and $exitCode -eq 0) { + $exitCode = $androidNativeValidation.exitCode +} $elapsedMs = [int]((Get-Date) - $started).TotalMilliseconds [ordered]@{ @@ -259,7 +372,8 @@ $elapsedMs = [int]((Get-Date) - $started).TotalMilliseconds exitCode = $exitCode elapsedMs = $elapsedMs checks = $checks - packageReadiness = Get-PackageReadiness -Kinds $PackageKinds -} | ConvertTo-Json -Compress -Depth 5 + androidNativeValidation = $androidNativeValidation + packageReadiness = @(Get-PackageReadiness -Kinds $PackageKinds) +} | ConvertTo-Json -Compress -Depth 8 exit $exitCode diff --git a/scripts/automation/package-smoke.sh b/scripts/automation/package-smoke.sh index 1dd5591..bf93ca1 100644 --- a/scripts/automation/package-smoke.sh +++ b/scripts/automation/package-smoke.sh @@ -84,9 +84,9 @@ package_readiness_json() { printf '[' printf '{"kind":"windows-appx","status":"blocked","reason":"legacy-wapproj-present-but-root-cmake-package-target-missing","debt":"DEBT-0011","validationCommand":"msbuild PanoPainterPackage/PanoPainterPackage.wapproj /p:Configuration=%s /p:Platform=x64","prerequisites":[{"name":"legacy-wapproj","available":%s,"detail":%s},{"name":"appx-manifest","available":%s,"detail":%s},{"name":"makeappx","available":%s,"detail":"Windows SDK packaging tool"},{"name":"signtool","available":%s,"detail":"Windows SDK signing tool"},{"name":"root-cmake-package-target","available":false,"detail":"Not migrated yet"}],"artifacts":[{"name":"app-packages","path":%s,"pathType":"Container","exists":%s}]}' "$configuration" "$(json_bool "$windows_wapproj_exists")" "$(json_string "$windows_wapproj")" "$(json_bool "$windows_manifest_exists")" "$(json_string "$windows_manifest")" "$(json_bool "$makeappx_exists")" "$(json_bool "$signtool_exists")" "$(json_string "$windows_output")" "$(json_bool "$windows_output_exists")" - printf ',{"kind":"android-standard-apk","status":"blocked","reason":"legacy-gradle-package-not-consuming-root-cmake-targets","debt":"DEBT-0011","validationCommand":"gradle -p android/android assembleDebug","prerequisites":[{"name":"gradle-build","available":%s,"detail":%s},{"name":"android-manifest","available":%s,"detail":%s},{"name":"gradle","available":%s,"detail":"Android package builder"},{"name":"root-cmake-preset","available":true,"detail":"android-arm64/android-x64"},{"name":"root-cmake-package-target","available":false,"detail":"Not migrated yet"}],"artifacts":[{"name":"apk-output","path":%s,"pathType":"Container","exists":%s}]}' "$(json_bool "$android_standard_gradle_exists")" "$(json_string "$android_standard_gradle")" "$(json_bool "$android_standard_manifest_exists")" "$(json_string "$android_standard_manifest")" "$(json_bool "$gradle_exists")" "$(json_string "$android_standard_output")" "$(json_bool "$android_standard_output_exists")" - printf ',{"kind":"android-quest-apk","status":"blocked","reason":"legacy-gradle-package-not-consuming-root-cmake-targets","debt":"DEBT-0011","validationCommand":"gradle -p android/quest assembleDebug","prerequisites":[{"name":"gradle-build","available":%s,"detail":%s},{"name":"android-manifest","available":%s,"detail":%s},{"name":"gradle","available":%s,"detail":"Android package builder"},{"name":"root-cmake-preset","available":true,"detail":"android-quest-arm64"},{"name":"root-cmake-package-target","available":false,"detail":"Not migrated yet"}],"artifacts":[{"name":"apk-output","path":%s,"pathType":"Container","exists":%s}]}' "$(json_bool "$android_quest_gradle_exists")" "$(json_string "$android_quest_gradle")" "$(json_bool "$android_quest_manifest_exists")" "$(json_string "$android_quest_manifest")" "$(json_bool "$gradle_exists")" "$(json_string "$android_quest_output")" "$(json_bool "$android_quest_output_exists")" - printf ',{"kind":"android-focus-apk","status":"blocked","reason":"legacy-gradle-package-not-consuming-root-cmake-targets","debt":"DEBT-0011","validationCommand":"gradle -p android/focus assembleDebug","prerequisites":[{"name":"gradle-build","available":%s,"detail":%s},{"name":"android-manifest","available":%s,"detail":%s},{"name":"gradle","available":%s,"detail":"Android package builder"},{"name":"root-cmake-preset","available":true,"detail":"android-focus-arm64"},{"name":"root-cmake-package-target","available":false,"detail":"Not migrated yet"}],"artifacts":[{"name":"apk-output","path":%s,"pathType":"Container","exists":%s}]}' "$(json_bool "$android_focus_gradle_exists")" "$(json_string "$android_focus_gradle")" "$(json_bool "$android_focus_manifest_exists")" "$(json_string "$android_focus_manifest")" "$(json_bool "$gradle_exists")" "$(json_string "$android_focus_output")" "$(json_bool "$android_focus_output_exists")" + printf ',{"kind":"android-standard-apk","status":"blocked","reason":"legacy-gradle-package-not-consuming-root-cmake-targets","debt":"DEBT-0011","validationCommand":"gradle -p android/android assembleDebug","prerequisites":[{"name":"gradle-build","available":%s,"detail":%s},{"name":"android-manifest","available":%s,"detail":%s},{"name":"gradle","available":%s,"detail":"Android package builder"},{"name":"retained-native-cmake-check","available":true,"detail":"powershell -ExecutionPolicy Bypass -File scripts/automation/android-legacy-package-build.ps1 -Packages standard"},{"name":"root-cmake-preset","available":true,"detail":"android-arm64/android-x64"},{"name":"root-cmake-package-target","available":false,"detail":"Not migrated yet"}],"artifacts":[{"name":"apk-output","path":%s,"pathType":"Container","exists":%s}]}' "$(json_bool "$android_standard_gradle_exists")" "$(json_string "$android_standard_gradle")" "$(json_bool "$android_standard_manifest_exists")" "$(json_string "$android_standard_manifest")" "$(json_bool "$gradle_exists")" "$(json_string "$android_standard_output")" "$(json_bool "$android_standard_output_exists")" + printf ',{"kind":"android-quest-apk","status":"blocked","reason":"legacy-gradle-package-not-consuming-root-cmake-targets","debt":"DEBT-0011","validationCommand":"gradle -p android/quest assembleDebug","prerequisites":[{"name":"gradle-build","available":%s,"detail":%s},{"name":"android-manifest","available":%s,"detail":%s},{"name":"gradle","available":%s,"detail":"Android package builder"},{"name":"retained-native-cmake-check","available":true,"detail":"powershell -ExecutionPolicy Bypass -File scripts/automation/android-legacy-package-build.ps1 -Packages quest -ConfigureOnly"},{"name":"root-cmake-preset","available":true,"detail":"android-quest-arm64"},{"name":"root-cmake-package-target","available":false,"detail":"Not migrated yet"}],"artifacts":[{"name":"apk-output","path":%s,"pathType":"Container","exists":%s}]}' "$(json_bool "$android_quest_gradle_exists")" "$(json_string "$android_quest_gradle")" "$(json_bool "$android_quest_manifest_exists")" "$(json_string "$android_quest_manifest")" "$(json_bool "$gradle_exists")" "$(json_string "$android_quest_output")" "$(json_bool "$android_quest_output_exists")" + printf ',{"kind":"android-focus-apk","status":"blocked","reason":"legacy-gradle-package-not-consuming-root-cmake-targets","debt":"DEBT-0011","validationCommand":"gradle -p android/focus assembleDebug","prerequisites":[{"name":"gradle-build","available":%s,"detail":%s},{"name":"android-manifest","available":%s,"detail":%s},{"name":"gradle","available":%s,"detail":"Android package builder"},{"name":"retained-native-cmake-check","available":true,"detail":"powershell -ExecutionPolicy Bypass -File scripts/automation/android-legacy-package-build.ps1 -Packages focus -ConfigureOnly"},{"name":"root-cmake-preset","available":true,"detail":"android-focus-arm64"},{"name":"root-cmake-package-target","available":false,"detail":"Not migrated yet"}],"artifacts":[{"name":"apk-output","path":%s,"pathType":"Container","exists":%s}]}' "$(json_bool "$android_focus_gradle_exists")" "$(json_string "$android_focus_gradle")" "$(json_bool "$android_focus_manifest_exists")" "$(json_string "$android_focus_manifest")" "$(json_bool "$gradle_exists")" "$(json_string "$android_focus_output")" "$(json_bool "$android_focus_output_exists")" printf ',{"kind":"apple-bundle","status":"blocked","reason":"legacy-xcode-project-and-host-toolchain-not-aligned-with-root-cmake-package-target","debt":"DEBT-0011","validationCommand":"xcodebuild -project PanoPainter.xcodeproj -configuration %s","prerequisites":[{"name":"legacy-xcode-project","available":%s,"detail":%s},{"name":"xcodebuild","available":%s,"detail":"Apple package builder"},{"name":"root-cmake-preset","available":true,"detail":"macos/ios-device/ios-simulator"},{"name":"root-cmake-package-target","available":false,"detail":"Not migrated yet"}],"artifacts":[{"name":"apple-package-output","path":%s,"pathType":"Container","exists":%s}]}' "$configuration" "$(json_bool "$apple_project_exists")" "$(json_string "$apple_project")" "$(json_bool "$xcodebuild_exists")" "$(json_string "$apple_output")" "$(json_bool "$apple_output_exists")" printf ',{"kind":"webgl","status":"blocked","reason":"emscripten-preset-exists-but-webgl-package-target-missing","debt":"DEBT-0011","validationCommand":"cmake --build --preset emscripten --target PanoPainter","prerequisites":[{"name":"emcc","available":%s,"detail":"Emscripten compiler"},{"name":"emcmake","available":%s,"detail":"Emscripten CMake wrapper"},{"name":"root-cmake-preset","available":true,"detail":"emscripten"},{"name":"root-cmake-package-target","available":false,"detail":"Not migrated yet"}],"artifacts":[{"name":"webgl-output","path":%s,"pathType":"Container","exists":%s}]}' "$(json_bool "$emcc_exists")" "$(json_bool "$emcmake_exists")" "$(json_string "$webgl_output")" "$(json_bool "$webgl_output_exists")" printf ']' diff --git a/scripts/dev/check_package_smoke_readiness.py b/scripts/dev/check_package_smoke_readiness.py index f5954f9..f8d9292 100644 --- a/scripts/dev/check_package_smoke_readiness.py +++ b/scripts/dev/check_package_smoke_readiness.py @@ -61,6 +61,10 @@ def main() -> int: "package-smoke.ps1": (root / "scripts" / "automation" / "package-smoke.ps1").read_text(encoding="utf-8").count("ReadinessOnly"), "package-smoke.sh": (root / "scripts" / "automation" / "package-smoke.sh").read_text(encoding="utf-8").count("readiness_only"), } + retained_android_native_counts = count_regex(root, { + "package-smoke.ps1": r"retained-native-cmake-check", + "package-smoke.sh": r"retained-native-cmake-check", + }) missing = { "package-smoke.ps1": [kind for kind in expected if kind not in ps_kinds], @@ -77,6 +81,9 @@ def main() -> int: debt_complete = {name: count >= debt_thresholds[name] for name, count in debt_counts.items()} blocked_complete = {name: count >= len(expected) for name, count in blocked_counts.items()} readiness_mode_present = {name: count > 0 for name, count in readiness_mode_counts.items()} + retained_android_native_complete = { + name: count >= 3 for name, count in retained_android_native_counts.items() + } ok = ( all(not values for values in missing.values()) @@ -84,6 +91,7 @@ def main() -> int: and all(debt_complete.values()) and all(blocked_complete.values()) and all(readiness_mode_present.values()) + and all(retained_android_native_complete.values()) ) print(json.dumps({ @@ -98,6 +106,7 @@ def main() -> int: "debtComplete": debt_complete, "blockedComplete": blocked_complete, "readinessModePresent": readiness_mode_present, + "retainedAndroidNativeComplete": retained_android_native_complete, }, separators=(",", ":"))) return 0 if ok else 1