From cd9206344dc077bf73f0882456e3c44849020515 Mon Sep 17 00:00:00 2001 From: omigamedev Date: Wed, 3 Jun 2026 09:51:14 +0200 Subject: [PATCH] Align platform build presets and component matrix --- CMakePresets.json | 16 +++++++++ docs/modernization/debt.md | 2 +- docs/modernization/roadmap.md | 11 +++++- scripts/automation/platform-build.ps1 | 49 ++++++++++++++++++++++++++- scripts/automation/platform-build.sh | 2 +- 5 files changed, 76 insertions(+), 4 deletions(-) diff --git a/CMakePresets.json b/CMakePresets.json index be98125..40f9df2 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -200,6 +200,22 @@ { "name": "android-focus-arm64", "configurePreset": "android-focus-arm64" + }, + { + "name": "emscripten", + "configurePreset": "emscripten" + }, + { + "name": "macos", + "configurePreset": "macos" + }, + { + "name": "ios-device", + "configurePreset": "ios-device" + }, + { + "name": "ios-simulator", + "configurePreset": "ios-simulator" } ], "testPresets": [ diff --git a/docs/modernization/debt.md b/docs/modernization/debt.md index 337e347..cabf8a5 100644 --- a/docs/modernization/debt.md +++ b/docs/modernization/debt.md @@ -27,7 +27,7 @@ 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, not APK/package variants | 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` | 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, not APK/package variants; standard arm64/x64, Quest arm64, and Focus/Wave arm64 have named root build presets and share the refreshed `platform-build` component matrix | 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` | 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 only, not AppX/APK/Apple/WebGL package outputs | 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` | Package-smoke covers 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 | diff --git a/docs/modernization/roadmap.md b/docs/modernization/roadmap.md index e1e7039..254d096 100644 --- a/docs/modernization/roadmap.md +++ b/docs/modernization/roadmap.md @@ -47,7 +47,7 @@ or temporary adapters live only in chat history. | 3 | Test Harness And Agent-Ready Automation | In progress | `ctest --preset desktop-fast` runs headlessly | | 4 | Component Split Without Behavior Change | Started | Each extracted target builds and tests | | 5 | Renderer Boundary And OpenGL Parity | Started | OpenGL output matches golden readbacks | -| 6 | Platform Alignment | Not started | Every supported platform has named validation | +| 6 | Platform Alignment | Started | Every supported platform has named validation | | 7 | Hardening, Coverage, And Breaking-Point Tests | Not started | Each component has edge/failure tests | | 8 | Future Backend Readiness | Not started | Vulkan/Metal lab targets remain non-default | @@ -800,6 +800,15 @@ Gate: Goal: every supported platform consumes the same component targets. +Status: started. Root CMake configure presets now have matching build presets +for Windows VS 2026/default, Windows clang-cl ASan, Linux clang, Android +standard x64/arm64, Android Quest arm64, Android Focus/Wave arm64, +Emscripten/WebGL, macOS, iOS device, and iOS simulator. `platform-build` +automation now builds the current headless component matrix, including +`pp_platform_api`, `pp_app_core`, app-core tests, and platform API tests. +App/package entrypoints for non-Windows platforms still need to consume shared +targets and remain covered by debt until package validation is migrated. + Implementation tasks: - Convert these builds to shared component targets: diff --git a/scripts/automation/platform-build.ps1 b/scripts/automation/platform-build.ps1 index 7b6edee..33eb2f0 100644 --- a/scripts/automation/platform-build.ps1 +++ b/scripts/automation/platform-build.ps1 @@ -1,7 +1,54 @@ [CmdletBinding()] param( [string[]]$Presets = @("android-arm64"), - [string[]]$Targets = @("pp_foundation", "pp_assets", "pp_paint", "pp_document", "pp_renderer_api", "pp_renderer_gl", "pp_paint_renderer", "pp_ui_core", "pano_cli", "pp_foundation_binary_stream_tests", "pp_foundation_event_tests", "pp_foundation_log_tests", "pp_foundation_parse_tests", "pp_foundation_task_queue_tests", "pp_foundation_trace_tests", "pp_assets_image_format_tests", "pp_assets_image_metadata_tests", "pp_assets_image_pixels_tests", "pp_assets_ppi_header_tests", "pp_assets_settings_document_tests", "pp_paint_brush_tests", "pp_paint_blend_tests", "pp_paint_stroke_tests", "pp_paint_stroke_script_tests", "pp_document_tests", "pp_document_ppi_import_tests", "pp_document_ppi_export_tests", "pp_renderer_api_tests", "pp_renderer_gl_capabilities_tests", "pp_renderer_gl_command_plan_tests", "pp_paint_renderer_compositor_tests", "pp_ui_core_color_tests", "pp_ui_core_layout_value_tests", "pp_ui_core_layout_xml_tests") + [string[]]$Targets = @( + "pp_foundation", + "pp_assets", + "pp_paint", + "pp_document", + "pp_renderer_api", + "pp_renderer_gl", + "pp_paint_renderer", + "pp_ui_core", + "pp_platform_api", + "pp_app_core", + "pano_cli", + "pp_foundation_binary_stream_tests", + "pp_foundation_event_tests", + "pp_foundation_log_tests", + "pp_foundation_parse_tests", + "pp_foundation_task_queue_tests", + "pp_foundation_trace_tests", + "pp_assets_image_format_tests", + "pp_assets_image_metadata_tests", + "pp_assets_image_pixels_tests", + "pp_assets_ppi_header_tests", + "pp_assets_settings_document_tests", + "pp_paint_brush_tests", + "pp_paint_blend_tests", + "pp_paint_stroke_tests", + "pp_paint_stroke_script_tests", + "pp_document_tests", + "pp_document_ppi_import_tests", + "pp_document_ppi_export_tests", + "pp_renderer_api_tests", + "pp_renderer_gl_capabilities_tests", + "pp_renderer_gl_command_plan_tests", + "pp_paint_renderer_compositor_tests", + "pp_platform_api_tests", + "pp_ui_core_color_tests", + "pp_ui_core_layout_value_tests", + "pp_ui_core_layout_xml_tests", + "pp_app_core_document_route_tests", + "pp_app_core_document_export_tests", + "pp_app_core_document_cloud_tests", + "pp_app_core_document_platform_io_tests", + "pp_app_core_document_recording_tests", + "pp_app_core_app_preferences_tests", + "pp_app_core_app_status_tests", + "pp_app_core_document_sharing_tests", + "pp_app_core_document_session_tests" + ) ) $ErrorActionPreference = "Stop" diff --git a/scripts/automation/platform-build.sh b/scripts/automation/platform-build.sh index cb0920b..76f55d2 100644 --- a/scripts/automation/platform-build.sh +++ b/scripts/automation/platform-build.sh @@ -3,7 +3,7 @@ set -u preset="${1:-android-arm64}" shift || true -targets="${*:-pp_foundation pp_assets pp_paint pp_document pp_renderer_api pp_renderer_gl pp_paint_renderer pp_ui_core pano_cli pp_foundation_binary_stream_tests pp_foundation_event_tests pp_foundation_log_tests pp_foundation_parse_tests pp_foundation_task_queue_tests pp_foundation_trace_tests pp_assets_image_format_tests pp_assets_image_metadata_tests pp_assets_image_pixels_tests pp_assets_ppi_header_tests pp_assets_settings_document_tests pp_paint_brush_tests pp_paint_blend_tests pp_paint_stroke_tests pp_paint_stroke_script_tests pp_document_tests pp_document_ppi_import_tests pp_document_ppi_export_tests pp_renderer_api_tests pp_renderer_gl_capabilities_tests pp_renderer_gl_command_plan_tests pp_paint_renderer_compositor_tests pp_ui_core_color_tests pp_ui_core_layout_value_tests pp_ui_core_layout_xml_tests}" +targets="${*:-pp_foundation pp_assets pp_paint pp_document pp_renderer_api pp_renderer_gl pp_paint_renderer pp_ui_core pp_platform_api pp_app_core pano_cli pp_foundation_binary_stream_tests pp_foundation_event_tests pp_foundation_log_tests pp_foundation_parse_tests pp_foundation_task_queue_tests pp_foundation_trace_tests pp_assets_image_format_tests pp_assets_image_metadata_tests pp_assets_image_pixels_tests pp_assets_ppi_header_tests pp_assets_settings_document_tests pp_paint_brush_tests pp_paint_blend_tests pp_paint_stroke_tests pp_paint_stroke_script_tests pp_document_tests pp_document_ppi_import_tests pp_document_ppi_export_tests pp_renderer_api_tests pp_renderer_gl_capabilities_tests pp_renderer_gl_command_plan_tests pp_paint_renderer_compositor_tests pp_platform_api_tests pp_ui_core_color_tests pp_ui_core_layout_value_tests pp_ui_core_layout_xml_tests pp_app_core_document_route_tests pp_app_core_document_export_tests pp_app_core_document_cloud_tests pp_app_core_document_platform_io_tests pp_app_core_document_recording_tests pp_app_core_app_preferences_tests pp_app_core_app_status_tests pp_app_core_document_sharing_tests pp_app_core_document_session_tests}" start="$(date +%s)" cmake --preset "$preset"