Expose platform checks as CMake targets

This commit is contained in:
2026-06-05 12:47:32 +02:00
parent 1dc2ae4f21
commit 97fd7de955
10 changed files with 95 additions and 27 deletions

View File

@@ -22,6 +22,7 @@ include(PanoPainterSources)
include(PanoPainterVersion) include(PanoPainterVersion)
include(PanoPainterRuntime) include(PanoPainterRuntime)
include(PanoPainterPackageTargets) include(PanoPainterPackageTargets)
include(PanoPainterPlatformTargets)
if(PP_ENABLE_CLANG_TIDY) if(PP_ENABLE_CLANG_TIDY)
find_program(PP_CLANG_TIDY_EXE NAMES clang-tidy) find_program(PP_CLANG_TIDY_EXE NAMES clang-tidy)

View File

@@ -0,0 +1,23 @@
find_program(PP_POWERSHELL_COMMAND NAMES pwsh powershell)
function(pp_add_powershell_automation_target target_name)
cmake_parse_arguments(PP_AUTOMATION_TARGET "" "COMMENT" "ARGUMENTS" ${ARGN})
if(PP_POWERSHELL_COMMAND)
add_custom_target(${target_name}
COMMAND "${PP_POWERSHELL_COMMAND}"
-NoProfile
-ExecutionPolicy Bypass
${PP_AUTOMATION_TARGET_ARGUMENTS}
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
COMMENT "${PP_AUTOMATION_TARGET_COMMENT}"
USES_TERMINAL
VERBATIM)
else()
add_custom_target(${target_name}
COMMAND "${CMAKE_COMMAND}" -E echo "PowerShell was not found; cannot run ${target_name}."
COMMAND "${CMAKE_COMMAND}" -E false
COMMENT "${PP_AUTOMATION_TARGET_COMMENT}"
VERBATIM)
endif()
endfunction()

View File

@@ -1,26 +1,4 @@
find_program(PP_POWERSHELL_COMMAND NAMES pwsh powershell) include(PanoPainterAutomation)
function(pp_add_powershell_automation_target target_name)
cmake_parse_arguments(PP_PACKAGE_TARGET "" "COMMENT" "ARGUMENTS" ${ARGN})
if(PP_POWERSHELL_COMMAND)
add_custom_target(${target_name}
COMMAND "${PP_POWERSHELL_COMMAND}"
-NoProfile
-ExecutionPolicy Bypass
${PP_PACKAGE_TARGET_ARGUMENTS}
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
COMMENT "${PP_PACKAGE_TARGET_COMMENT}"
USES_TERMINAL
VERBATIM)
else()
add_custom_target(${target_name}
COMMAND "${CMAKE_COMMAND}" -E echo "PowerShell was not found; cannot run ${target_name}."
COMMAND "${CMAKE_COMMAND}" -E false
COMMENT "${PP_PACKAGE_TARGET_COMMENT}"
VERBATIM)
endif()
endfunction()
pp_add_powershell_automation_target(panopainter_package_readiness pp_add_powershell_automation_target(panopainter_package_readiness
COMMENT "Report package readiness blockers." COMMENT "Report package readiness blockers."

View File

@@ -0,0 +1,19 @@
include(PanoPainterAutomation)
pp_add_powershell_automation_target(panopainter_platform_build_headless
COMMENT "Run the default headless platform build matrix."
ARGUMENTS
-File "${CMAKE_CURRENT_SOURCE_DIR}/scripts/automation/platform-build.ps1")
pp_add_powershell_automation_target(panopainter_platform_build_android_assets
COMMENT "Build Android root CMake asset component across standard/VR presets."
ARGUMENTS
-File "${CMAKE_CURRENT_SOURCE_DIR}/scripts/automation/platform-build.ps1"
-Presets android-arm64,android-x64,android-quest-arm64,android-focus-arm64
-Targets pp_assets)
pp_add_powershell_automation_target(panopainter_platform_build_apple_remote
COMMENT "Run remote Apple compile validation for macOS, iOS simulator, and iOS device."
ARGUMENTS
-File "${CMAKE_CURRENT_SOURCE_DIR}/scripts/automation/apple-remote-build.ps1"
-Presets macos,ios-simulator,ios-device)

View File

@@ -79,6 +79,7 @@ powershell -ExecutionPolicy Bypass -File scripts\automation\package-smoke.ps1 -P
powershell -ExecutionPolicy Bypass -File scripts\automation\package-smoke.ps1 -ReadinessOnly 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 powershell -ExecutionPolicy Bypass -File scripts\automation\package-smoke.ps1 -ReadinessOnly -AndroidNativeChecks -PackageKinds android-standard-apk,android-quest-apk,android-focus-apk
cmake --build --preset windows-msvc-default --config Debug --target panopainter_android_native_package_smoke cmake --build --preset windows-msvc-default --config Debug --target panopainter_android_native_package_smoke
cmake --build --preset windows-msvc-default --config Debug --target panopainter_platform_build_android_assets
cmake --fresh --preset windows-clangcl-asan 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 execute_brush
python scripts/dev/clangd_nav.py symbols --file src/app_core/brush_ui.h --name-regex "execute_.*preset" python scripts/dev/clangd_nav.py symbols --file src/app_core/brush_ui.h --name-regex "execute_.*preset"
@@ -174,6 +175,7 @@ powershell -ExecutionPolicy Bypass -File scripts\automation\apple-remote-build.p
and shell wrapper defaults include every current CMake test executable plus and shell wrapper defaults include every current CMake test executable plus
the required component and `pano_cli` targets, and that both wrappers default the required component and `pano_cli` targets, and that both wrappers default
to the standard arm64/x64, Quest arm64, and Focus/Wave arm64 Android presets. to the standard arm64/x64, Quest arm64, and Focus/Wave arm64 Android presets.
It also guards the root CMake platform automation target names.
- `package-smoke.ps1 -ReadinessOnly` and `package-smoke.sh --readiness-only` - `package-smoke.ps1 -ReadinessOnly` and `package-smoke.sh --readiness-only`
emit the Windows AppX, Android standard/Quest/Focus APK, Apple bundle, and emit the Windows AppX, Android standard/Quest/Focus APK, Apple bundle, and
WebGL package readiness matrix without first building an app artifact. The WebGL package readiness matrix without first building an app artifact. The
@@ -194,6 +196,12 @@ powershell -ExecutionPolicy Bypass -File scripts\automation\apple-remote-build.p
`panopainter_android_native_package_smoke`. These targets call the automation `panopainter_android_native_package_smoke`. These targets call the automation
scripts from CMake but do not convert APK/AppX/Apple/WebGL package outputs to scripts from CMake but do not convert APK/AppX/Apple/WebGL package outputs to
root CMake package targets yet. root CMake package targets yet.
- Root CMake exposes non-default platform validation targets:
`panopainter_platform_build_headless`,
`panopainter_platform_build_android_assets`, and
`panopainter_platform_build_apple_remote`. These targets call the existing
platform automation scripts from CMake and keep platform validation discoverable
from the CMake target graph while app/package target migration remains open.
- Root CMake exposes named `fuzz` and `stress` CTest presets. `fuzz` currently - Root CMake exposes named `fuzz` and `stress` CTest presets. `fuzz` currently
runs deterministic parser/serializer edge tests for binary streams, image runs deterministic parser/serializer edge tests for binary streams, image
metadata, PPI, stroke scripts, and layout XML; `stress` currently runs the metadata, PPI, stroke scripts, and layout XML; `stress` currently runs the

View File

@@ -275,6 +275,13 @@ agent or engineer to remove them without reconstructing context from chat.
calls the package-smoke Android native gate from CMake, validates the current calls the package-smoke Android native gate from CMake, validates the current
latest SDK-managed NDK/CMake pair, and still reports APK outputs as blocked latest SDK-managed NDK/CMake pair, and still reports APK outputs as blocked
until root CMake owns real package targets. until root CMake owns real package targets.
- 2026-06-05: DEBT-0009 was narrowed again. Root CMake now exposes
non-default platform-build automation targets for the default headless sweep,
Android root CMake asset validation across standard/Quest/Focus presets, and
remote Apple compile validation. The Android target validated `pp_assets`
across Android arm64/x64, Quest arm64, and Focus/Wave arm64 with the latest
SDK-managed NDK/CMake pair. The platform-build wrapper defaults also include
`pp_app_core_app_dialog_tests` again, so the target-matrix self-test is green.
- 2026-06-04: DEBT-0036 was narrowed again. Canvas stroke commit, - 2026-06-04: DEBT-0036 was narrowed again. Canvas stroke commit,
thumbnail, and object-draw history paths now query saved blend state through thumbnail, and object-draw history paths now query saved blend state through
tested `pp_renderer_gl` capability-state dispatch; CanvasLayer equirect tested `pp_renderer_gl` capability-state dispatch; CanvasLayer equirect
@@ -298,7 +305,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-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-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-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; root CMake exposes non-default retained native package validation targets | 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`; `cmake --build --preset windows-msvc-default --config Debug --target panopainter_android_native_package_smoke` | 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; root CMake exposes non-default platform-build and retained native package validation targets | 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`; `cmake --build --preset windows-msvc-default --config Debug --target panopainter_platform_build_android_assets`; `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`; `cmake --build --preset windows-msvc-default --config Debug --target panopainter_android_native_package_smoke` | 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-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, use latest SDK-managed NDK/CMake selection, and can be run from `package-smoke.ps1 -AndroidNativeChecks` or the root CMake `panopainter_android_native_package_smoke` target, 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`; `cmake --build --preset windows-msvc-default --config Debug --target panopainter_android_native_package_smoke`; `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-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` or the root CMake `panopainter_android_native_package_smoke` target, 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`; `cmake --build --preset windows-msvc-default --config Debug --target panopainter_android_native_package_smoke`; `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-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 |

View File

@@ -1383,7 +1383,13 @@ keeps the PowerShell and shell wrapper defaults aligned with every current
CMake test executable plus required component targets, and now verifies the CMake test executable plus required component targets, and now verifies the
default Android preset set covers standard arm64/x64, Quest arm64, and default Android preset set covers standard arm64/x64, Quest arm64, and
Focus/Wave arm64. The shell wrapper now mirrors the PowerShell wrapper's Focus/Wave arm64. The shell wrapper now mirrors the PowerShell wrapper's
multi-preset behavior and reports one structured result array. multi-preset behavior and reports one structured result array. Root CMake now
also exposes non-default platform validation targets:
`panopainter_platform_build_headless`,
`panopainter_platform_build_android_assets`, and
`panopainter_platform_build_apple_remote`; the platform-build self-test guards
those target names and the wrapper matrix now includes
`pp_app_core_app_dialog_tests` with the rest of the CMake test executables.
`package-smoke` now emits a structured package readiness matrix for Windows `package-smoke` now emits a structured package readiness matrix for Windows
AppX, Android standard/Quest/Focus APKs, Apple bundles, and WebGL output, with 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 blocked prerequisites tied to DEBT-0011. It also has a readiness-only mode for
@@ -2393,6 +2399,13 @@ Results:
`cmake --build --preset windows-msvc-default --config Debug --target `cmake --build --preset windows-msvc-default --config Debug --target
panopainter_android_native_package_smoke` validates the latest SDK-managed panopainter_android_native_package_smoke` validates the latest SDK-managed
NDK/CMake pair and reports the still-blocked APK package state. NDK/CMake pair and reports the still-blocked APK package state.
- Root CMake now exposes platform validation targets for the default headless
platform-build sweep, the Android standard/Quest/Focus root CMake asset
component sweep, and the remote Apple compile gate. `cmake --build --preset
windows-msvc-default --config Debug --target
panopainter_platform_build_android_assets` validated `pp_assets` across
Android arm64, Android x64, Quest arm64, and Focus/Wave arm64 with the latest
SDK-managed NDK/CMake pair.
- Desktop VR drawing now routes generic OpenGL scissor/depth/blend state, - Desktop VR drawing now routes generic OpenGL scissor/depth/blend state,
blend/depth state snapshots and restores, depth clears, active texture units, blend/depth state snapshots and restores, depth clears, active texture units,
and fallback 2D texture unbinds through tested renderer GL backend dispatch; and fallback 2D texture unbinds through tested renderer GL backend dispatch;

View File

@@ -41,6 +41,7 @@ param(
"pp_ui_core_layout_value_tests", "pp_ui_core_layout_value_tests",
"pp_ui_core_layout_xml_tests", "pp_ui_core_layout_xml_tests",
"pp_app_core_about_menu_tests", "pp_app_core_about_menu_tests",
"pp_app_core_app_dialog_tests",
"pp_app_core_app_preferences_tests", "pp_app_core_app_preferences_tests",
"pp_app_core_app_frame_tests", "pp_app_core_app_frame_tests",
"pp_app_core_app_thread_tests", "pp_app_core_app_thread_tests",

View File

@@ -3,7 +3,7 @@ set -u
presets="${1:-android-arm64 android-x64 android-quest-arm64 android-focus-arm64}" presets="${1:-android-arm64 android-x64 android-quest-arm64 android-focus-arm64}"
shift || true shift || true
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_brush_package_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_about_menu_tests pp_app_core_app_preferences_tests pp_app_core_app_frame_tests pp_app_core_app_thread_tests pp_app_core_app_input_tests pp_app_core_app_shutdown_tests pp_app_core_app_startup_tests pp_app_core_app_status_tests pp_app_core_command_convert_tests pp_app_core_brush_package_export_tests pp_app_core_brush_package_import_tests pp_app_core_brush_ui_tests pp_app_core_canvas_hotkey_tests pp_app_core_canvas_tool_ui_tests pp_app_core_canvas_view_tests pp_app_core_document_animation_tests pp_app_core_document_canvas_tests pp_app_core_document_cloud_tests pp_app_core_document_export_tests pp_app_core_document_import_tests pp_app_core_document_layer_tests pp_app_core_document_platform_io_tests pp_app_core_document_recording_tests pp_app_core_document_resize_tests pp_app_core_document_route_tests pp_app_core_document_sharing_tests pp_app_core_document_session_tests pp_app_core_file_menu_tests pp_app_core_grid_ui_tests pp_app_core_history_ui_tests pp_app_core_main_toolbar_tests pp_app_core_quick_ui_tests pp_app_core_tools_menu_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_brush_package_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_about_menu_tests pp_app_core_app_dialog_tests pp_app_core_app_preferences_tests pp_app_core_app_frame_tests pp_app_core_app_thread_tests pp_app_core_app_input_tests pp_app_core_app_shutdown_tests pp_app_core_app_startup_tests pp_app_core_app_status_tests pp_app_core_command_convert_tests pp_app_core_brush_package_export_tests pp_app_core_brush_package_import_tests pp_app_core_brush_ui_tests pp_app_core_canvas_hotkey_tests pp_app_core_canvas_tool_ui_tests pp_app_core_canvas_view_tests pp_app_core_document_animation_tests pp_app_core_document_canvas_tests pp_app_core_document_cloud_tests pp_app_core_document_export_tests pp_app_core_document_import_tests pp_app_core_document_layer_tests pp_app_core_document_platform_io_tests pp_app_core_document_recording_tests pp_app_core_document_resize_tests pp_app_core_document_route_tests pp_app_core_document_sharing_tests pp_app_core_document_session_tests pp_app_core_file_menu_tests pp_app_core_grid_ui_tests pp_app_core_history_ui_tests pp_app_core_main_toolbar_tests pp_app_core_quick_ui_tests pp_app_core_tools_menu_tests}"
start="$(date +%s)" start="$(date +%s)"
android_cmake_cmd="" android_cmake_cmd=""

View File

@@ -30,6 +30,12 @@ REQUIRED_ANDROID_PRESETS = [
"android-focus-arm64", "android-focus-arm64",
] ]
EXPECTED_CMAKE_PLATFORM_TARGETS = [
"panopainter_platform_build_headless",
"panopainter_platform_build_android_assets",
"panopainter_platform_build_apple_remote",
]
def repo_root() -> Path: def repo_root() -> Path:
return Path(__file__).resolve().parents[2] return Path(__file__).resolve().parents[2]
@@ -96,6 +102,12 @@ def main() -> int:
sh_targets = shell_default_targets(root) sh_targets = shell_default_targets(root)
ps_presets = powershell_default_presets(root) ps_presets = powershell_default_presets(root)
sh_presets = shell_default_presets(root) sh_presets = shell_default_presets(root)
cmake_platform_module = (root / "cmake" / "PanoPainterPlatformTargets.cmake").read_text(encoding="utf-8")
root_cmake = (root / "CMakeLists.txt").read_text(encoding="utf-8")
cmake_platform_targets_present = {
target: target in cmake_platform_module for target in EXPECTED_CMAKE_PLATFORM_TARGETS
}
cmake_platform_module_included = "include(PanoPainterPlatformTargets)" in root_cmake
result = { result = {
"ok": True, "ok": True,
@@ -107,6 +119,8 @@ def main() -> int:
"platform-build.ps1": ps_presets, "platform-build.ps1": ps_presets,
"platform-build.sh": sh_presets, "platform-build.sh": sh_presets,
}, },
"cmakePlatformTargetsPresent": cmake_platform_targets_present,
"cmakePlatformModuleIncluded": cmake_platform_module_included,
"missing": { "missing": {
"platform-build.ps1.targets": missing(expected, ps_targets), "platform-build.ps1.targets": missing(expected, ps_targets),
"platform-build.sh.targets": missing(expected, sh_targets), "platform-build.sh.targets": missing(expected, sh_targets),
@@ -114,7 +128,11 @@ def main() -> int:
"platform-build.sh.presets": missing(REQUIRED_ANDROID_PRESETS, sh_presets), "platform-build.sh.presets": missing(REQUIRED_ANDROID_PRESETS, sh_presets),
}, },
} }
result["ok"] = all(not values for values in result["missing"].values()) result["ok"] = (
all(not values for values in result["missing"].values())
and all(cmake_platform_targets_present.values())
and cmake_platform_module_included
)
print(json.dumps(result, separators=(",", ":"))) print(json.dumps(result, separators=(",", ":")))
return 0 if result["ok"] else 1 return 0 if result["ok"] else 1