33 Commits
Author SHA1 Message Date
西风逍遥游 5b2a7fb0f6 fix(android): package the requested emulator ABI 2026-10-11 04:39:50 +08:00
西风逍遥游 9bfda9017b ci: test Android APK natively on x86_64 emulator 2026-10-11 03:54:54 +08:00
西风逍遥游 12e697fbd5 fix(ci): run Gradle wrapper with bash 2026-10-11 03:04:56 +08:00
西风逍遥游 09d00f582b fix(ci): preserve Android APK build diagnostics 2026-10-11 02:15:12 +08:00
西风逍遥游 9655503413 fix(android): install required SDK runtime libraries 2026-10-11 01:37:57 +08:00
西风逍遥游 23c26f447c ci: expose APK launch diagnostics 2026-10-11 01:30:54 +08:00
西风逍遥游 d61167a241 fix(ci): test-sign consumer APKs before launch 2026-10-11 01:25:36 +08:00
西风逍遥游 a340e7938e fix(ci): avoid pipefail false negatives in APK gate 2026-10-11 01:22:09 +08:00
西风逍遥游 c6bd3123aa fix(ci): run APK gate through a checked-in script 2026-10-11 01:19:08 +08:00
西风逍遥游 4ab841c047 ci(release): gate mobile SDK runtime usability 2026-09-18 20:42:42 +08:00
西风逍遥游 d43153c98d fix(sdk): ship public zeroerr headers 2026-09-01 23:21:49 +08:00
西风逍遥游 63246b8c68 fix: complete architecture consolidation contracts 2026-08-28 00:01:55 +08:00
西风逍遥游 5150d17b91 ci: align Android NDK to runner-preinstalled 27.3 and cache Emscripten SDK
Windows/macOS runner images already ship the Android SDK; the only real
download was NDK 26.1.10909125. Align ANDROID_NDK_VERSION to the
preinstalled 27.3.13750724 so setup-android downloads nothing (zero cache
quota). Update setup-android-sdk.sh, Makefile and Readmes to match.

Emscripten is not preinstalled on ubuntu runners, so cache \C:\Users\xiaofans/emsdk
but only save on the default branch to avoid churning/evicting hot
per-PR caches.
2026-08-26 14:49:01 +08:00
西风逍遥游 354ed0146d ci: cache debug third-party builds 2026-08-25 12:33:48 +08:00
西风逍遥游 b89951ca4b fix(cmdline, consumer): preserve zip exec bits; harden launcher check
- eve get android's in-process unzip wrote every entry with default perms,
  so gradle (and sdkmanager/aapt) came out non-executable on macOS
  ('Permission denied' during eve build android). Apply the unix mode from
  the zip's external attributes (bits 16-23) on POSIX.
- consumer-test.sh launcher check: AAPT=find under set -o pipefail aborted
  silently when build-tools was not under ANDROID_HOME; make it best-effort
  (WARN instead of hard exit).
2026-08-23 01:11:24 +08:00
西风逍遥游 ce62aca438 fix(release): consumer validation gates + macOS SDK Vulkan loader bundling
First run of the consumer-simulation gates (added today, never executed
before) caught three real defects:

1. macOS SDK zip was missing libvulkan.1.dylib: the LunarG SDK ships the
   loader as a symlink, file(INSTALL) kept it as a dangling link and
   zip-sdk.py silently skipped the unreadable entry. Bundle the resolved
   file (FOLLOW_SYMLINK_CHAIN) and make zip-sdk.py follow symlinks, so
   eve can start on a machine with no Vulkan SDK.
2. consumer-test.sh on Git Bash: \ arrives as D:\a\_temp and
   got concatenated onto the bash cwd; normalize with cygpath first.
3. consumer-linux apt: libasound2 was renamed libasound2t64 on
   Ubuntu 24.04, so the headless deps step failed before the test ran.
2026-08-22 22:58:39 +08:00
西风逍遥游 639aa10471 ci(release): consumer simulation + cross-packaging + packaged-game run gates
sdk-release.yml now validates the whole consumer chain after the SDKs are
published, using only the real release artifacts:

- consumer-{win32,linux,macosx}: download the host SDK zip like an end user,
  eve get android, eve build android (APK content + EVEngineActivity launcher
  checks), eve package <host>, then actually run the packaged game headless
  and require the EVE_CI_GAME_OK startup marker (stdout is unbuffered).
- Cross-packaging per the promised matrix: linux -> win32, macosx ->
  win32 + linux. Unsupported combos are simply not in the matrix.
- run-win32-cross / run-linux-cross: packages built on foreign hosts are
  downloaded, extracted and run on the target platform (SwiftShader / Lavapipe)
  with the marker as a hard gate.
- run-android: installs the built APK on an arm64 emulator (macOS arm64
  runner), launches EVEngineActivity and greps logcat. Best-effort
  (continue-on-error) for now, per the agreed soft-gate policy.
- ios-sim: builds the game app for iphonesimulator from the release source,
  boots a simulator, installs/launches and greps the marker. Best-effort.

New Makefile target build/ios-sim-debug builds the game app for the
simulator (no signing); consumer-test.sh is the shared per-host flow.
The win32 SDK runtime-bundle script now also resolves the VS redist
edition/version layout and falls back to the system Vulkan loader.
2026-08-22 10:37:40 +08:00
西风逍遥游 f4e6c7302e fix(android): launch the packaged game, not the unit-test host
The APK template declared EVTestActivity (the zeroerr test host) as the
MAIN/LAUNCHER activity, so a game packaged with ve build android opened the
test host (which unpacks assets/test, absent from a game APK) instead of the
game. Point the launcher at EVEngineActivity (unpacks assets/game and runs
ve run <game>); the test suite already starts EVTestActivity explicitly via
am start. test-sdk.sh now fails the android SDK smoke if the launcher regresses.
2026-08-22 09:56:18 +08:00
西风逍遥游 ecb84abdd0 fix(cmdline): don't inherit stale CI build outputs from the android SDK template
The official SDK's platform/apk template is compiled once by test-sdk.sh in the
release pipeline, so its app/build tree ships a leftover CI test APK inside the
zip. eve build copied the whole template (copyTree only skips top-level build
dirs), leaving a stale 123MB app-debug.apk built from a different game in every
assembled project. Skip app/build when copying the template, and stop zip-sdk.py
from packaging build/.gradle outputs in future SDK releases.
2026-08-22 09:52:43 +08:00
西风逍遥游 0ab535df5a feat(sdk): eve create scaffolds a game, eve doc points at live docs, SDK ships basic example 2026-08-20 17:31:30 +08:00
西风逍遥游 9dbf37c849 fix(sdk): export squirrel/ssq symbols from win32 host; skip unreadable entries in SDK zip 2026-08-20 14:00:35 +08:00
西风逍遥游 ff253341ce fix(sdk): zip walk resilience, export all host symbols for win32 plugins, bundle macOS dylibs 2026-08-20 11:45:59 +08:00
西风逍遥游 af1805cacf fix(sdk): bundle Vulkan loader and set loader rpath on macOS; surface eve -v output on failure 2026-08-20 09:34:01 +08:00
西风逍遥游 59de334862 fix(sdk): normalize SDK path for find_package and drop pinned VS generator in plugin gate 2026-08-20 07:39:45 +08:00
西风逍遥游 1c3ffb5b4a fix(sdk): only require lib/ in the SDK layout for win32 and android 2026-08-20 06:42:03 +08:00
西风逍遥游 34d1fdb63b refactor(modules): clear remaining back-edges and split the largest TUs (#127)
* chore(ci): add clang-format gate, CODEOWNERS and agent collaboration rules

* refactor(modules): clear remaining back-edges and split the largest TUs

Three known dependency back-edges are gone (module_depgraph.py KNOWN_BACK_EDGES
is now empty; --check passes with 0 violations, 0 cycles):

- window -> graphics: window queries the new IWindowSurfaceHost capability
  (common/WindowSurfaceHost.h) instead of holding a Graphics pointer;
  Window::setGraphics was removed and all call sites updated.
- window -> image: Window::setIcon was replaced by setIconRGBA(const uint8_t*,
  w, h); the window no longer decodes ImageData.
- scene -> graphics: pickScreenAt / collectFrustumIdsAt implementations moved
  to graphics/ScenePicking.cpp (graphics -> scene is a legal downward edge);
  scene now depends only on spatial.

TU splits (pure moves, verified identical method sets and brace balance):

- vulkan/Graphics.cpp (5118 lines) -> Graphics.cpp (lifecycle), GraphicsPipeline,
  Graphics2D, Graphics3D, GraphicsMesh + shared GraphicsInternal.h.
- scene/Scene.cpp -> Scene.cpp (script layer / host lifecycle / serialization)
  + SceneNodes.cpp + shared SceneInternal.h.

Verified with a real build (MSVC 19.51, prebuilt third-party): full build green;
window.* and Scene.* suites pass, including scene picking/culling and GPU cases.

* refactor(graphics): narrow Graphics interfaces and clear public-header leaks

Step 4 — interface segregation:
- New lean interfaces: IGraphics2D, IGraphics3D, IResourceFactory, IPostFX
  (pure virtuals, forward-declared types only; graphics/Color.h extracted from
  Canvas.h so modules that only need the color type stop pulling Canvas.h).
- Graphics now implements all four facets; consumers can depend on the narrow
  interface they use instead of the 129-method god class.
- Migrated voxel (VoxelWorld::drawVisible -> IGraphics3D*) and model3d
  (ModelRenderer::buildRenderable(s) -> IResourceFactory&).
- Graphics.h slims from 24 sub-header includes to a handful of small type
  headers + forward declarations; the destructor moved out-of-line so
  unique_ptr effect members are destroyed where types are complete.

Step 5 — header leaks (module_depgraph.py '*' marks: 14 -> 7):
- map/TileLayer.h, particles/ParticleEmitter.h, avatar/AvatarInstance.h,
  animation/SpineAnim.h, map/TileSystem.h, model3d/ModelData.h,
  model3d/ModelRenderer.h, audio/Audio.h + Source.h, image/ImageData.h +
  Image.h, dialogue/Dialogue.h, procgen Palette/OutputSpec/TextureRecipe/
  PbrMaterial -> forward declarations, includes moved to .cpp.
- voxel/VoxelWorld.h: terrain sampler Pimpl'd (unique_ptr + out-of-line
  destructor), removing the procgen header dependency.
- gpgpu/vulkan backend headers stop pulling graphics/vulkan/Graphics.h.
- Remaining '*' marks are deliberate: tiny POD/enum headers (GridConfig,
  MapObject, BlendMode, Color), an internal backend header
  (GraphicsInternal.h -> filesystem), and lean interface references.

Verified with a full clean build (MSVC) and tests: window/Scene/voxel/
RenderSystem/Quad/shader/TextureSampler/resourceLifetime pass; broad suite
only shows the pre-existing PHYSFS-init filesystem-environment failures.

* feat(resources): revive ResourceManager as unified IAssetReloader-backed cache

* fix(resources): leak ResourceManager singleton to avoid exit-time teardown crashes

Cached CPU resources may own third-party handles (FreeType faces, Assimp
scenes, image decode handlers) whose libraries are torn down at process
exit in an unspecified TU order; destroying cached entries from the
singleton destructor can segfault at exit (seen on CI Windows in
model3d.materialApi.objMtl). Keep the singleton alive until OS reclaim;
explicit unload()/clear() still release entries during the run.

* refactor(devtools): consume business modules through capability interfaces

DevTools / cmdline no longer include business-module headers, so trimming
scene / physics / procgen / particles / audio / ui / graphics no longer
requires disabling devtools, and devtools can be switched off with
-DEVENGINE_MODULE_DEVTOOLS=OFF.

New capability interfaces in common/:
- ISceneQuery (scene) - host/node inspection + mutation + transform sync
- IRenderCapture (graphics) - render status, PNG capture, camera control,
  visible-entity snapshot, entity-ID mask, G-buffer PNGs
- IPhysicsQuery (physics) - 2D world lifecycle + ray casts
- IProcgenQuery (procgen) - recipe listing, map/mesh generation
- IParticlesQuery (particles) - emitter status + one-shot emit
- IAudioQuery (audio) - volume / stop-all
- IEditorHost (ui) - declarative editor host (used by cmdline too)

Providers register in their module constructors. DevTools rewires McpServer
(render/scene/procgen/physics/particles/audio/host tools), SceneInspect
(now delegates to ISceneQuery + IRenderCapture) and RenderVision (uses
IRenderCapture::capturePngDataUrl); cmdline/Mcp.cpp uses IEditorHost.

manifest: devtools DEPS graphics scene physics procgen particles audio ui
image event filesystem -> event; cmdline DEPS filesystem ui -> filesystem.

Verified: full build green; devtools.mcp.* tests pass; broad suite shows
only the pre-existing PHYSFS-init filesystem-environment failures.

* style: apply clang-format to changed lines after dev merge

* fix(webgpu): include RenderControl/TextureSampler explicitly after Graphics.h slimming

* fix(webgpu): provide newFont/print stubs to satisfy IGraphics2D/IResourceFactory vtables

* fix(common): make ProcgenQuery.h self-sufficient (cstdint/utility for GCC)
2026-08-20 05:53:33 +08:00
西风逍遥游 b08657ab67 feat(sdk): package licenses, auto-export module headers, add plugin/APK smoke tests, checksums and branch cleanup
- install_sdk.cmake: export headers for exactly the modules the build enabled
  (EVE_ENABLED_MODULES from cmake/module_manifest.cmake) instead of a stale
  whitelist; package engine + vendored third-party licenses under
  share/eve/licenses/.
- test-sdk.sh: hard-gate native C++ plugin compile (find_package(EVEngine) +
  add_eve_plugin) on win32/linux/macosx; android now assembles an APK from the
  SDK template (gradlew assembleDebug) instead of skipping.
- sdk-release.yml: run the android APK smoke; publish generates SHA256SUMS,
  verifies every zip's share/eve/VERSION against the tag, uploads SHA256SUMS
  with the SDKs, and (best-effort) attests build provenance.
- release.py: new cleanup-branches subcommand deletes merged vX.Y.Z /
  promote/* / rebase/* branches (tags and main/dev are never touched);
  new cleanup-branches.yml runs it weekly + on demand.
- docs: SDK packaging and branch cleanup sections in 发布流程.md and the
  release-branch-model spec.
2026-08-19 21:57:52 +08:00
西风逍遥游 703f1fb7a5 ci(release): fix ambiguous refspecs, add version consistency and SDK hardening
- release.py: use explicit refs/heads + refs/tags refspecs everywhere (short
  refspecs are ambiguous when the release branch and tag share a name, and git
  refuses to push them); rebase dev onto the branch's -dev write-back instead
  of the official tag; add a real-git integration test suite.
- version single-sourcing: fix config.h.in PATCH macro bug and include -dev;
  derive Android versionCode; sync required version touchpoints in start and
  enforce them via check-versions in CI.
- SDK: exact version assertions in test-sdk.sh, publish-time VERSION cross-check.
- workflows: converge toolchain versions to repo vars, SHA-pin actions, add
  Dependabot config.
2026-08-19 21:50:02 +08:00
西风逍遥游 63bb22bf08 ci(sdk): add SDK usability test gate before release publish
Add .github/scripts/test-sdk.sh which verifies a freshly-built target-platform
SDK is usable by consumers: layout/markers, host runtime executes (eve -v),
'eve zip' compresses a sample game, and 'eve package' assembles a runnable
game folder (with runtime DLLs on Windows). A best-effort in-memory run of the
packaged game checks scripts load from game.eve (WARN-only for headless/GPU).

Wire it into sdk-release.yml for win32/linux/macosx right after each SDK is
built and before the zips are packaged/published, so a broken SDK blocks the
GitHub Release. Setup software Vulkan (SwiftShader/Lavapipe) best-effort to
give the in-memory run a chance without failing the gate.
2026-08-16 13:17:55 +08:00
sunxfancyandCursor c999955675 fix(ci): use software Vulkan ICD on headless Win/Linux
GitHub runners lack a GPU ICD that advertises VK_KHR_surface; point
tests at SwiftShader (Windows) and Mesa Lavapipe (Linux) instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-08 23:47:10 +08:00
sunxfancy cf6ef05cb2 feat: enhance Vulkan integration for iOS and add scene module
- Improved CMake configuration for Vulkan on iOS, allowing for dynamic and static linking of MoltenVK based on availability.
- Updated the script for resolving Vulkan SDK paths to prioritize dynamic frameworks and provide warnings for missing components.
- Introduced a new scene module, enabling a declarative scene tree structure that mirrors the UI system, enhancing the engine's capabilities for scene management.
- Updated documentation to reflect the new scene module and its integration with existing systems.
- Enhanced test coverage by including new tests for the scene module.

These changes significantly improve Vulkan support on iOS and expand the engine's modular architecture.
2026-08-08 19:11:22 +08:00
sunxfancy 5e5c1ec49a feat: enhance CMake and CI scripts for Vulkan SDK integration and third-party management
- Updated CMakeLists.txt to include a new function for ensuring the third-party sources are checked out at configure time, improving build reliability.
- Added logic to handle different layouts for MoltenVK.xcframework in the resolve-vulkan-macos.sh script, ensuring compatibility with CI environments.
- Refined GitHub Actions workflows to streamline Android SDK setup and path resolution, enhancing the build process for Android targets.
2026-08-06 23:18:07 +08:00
sunxfancy 9fa2433fcd chore: update build configuration and ignore settings
- Added 'artifacts-local-test/' to .gitignore to exclude local test artifacts from version control.
- Enhanced Makefile to allow customizable job counts and generator options for various platforms, improving build flexibility.
- Updated CMakeLists.txt to ensure proper linking options for macOS and iOS platforms, addressing linker behavior for dynamic exports.
2026-08-06 23:04:24 +08:00