Skip to content

[break] feat: build Engine SDK artifacts and simplify engine selection - #1057

Open
bofeng-song wants to merge 15 commits into
cocos:mainfrom
bofeng-song:feat/engine-sdk-packaging
Open

bofeng-song wants to merge 15 commits into
cocos:mainfrom
bofeng-song:feat/engine-sdk-packaging

Conversation

@bofeng-song

@bofeng-song bofeng-song commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Changes

  • Build missing dev-cli output and cc-min before packing the Engine SDK. On Windows x64 and macOS, build the simulator executable and native-preview runtime as well. --skip-build keeps the snapshot-only flow and --skip-simulator skips that build step.

  • Include the Xcode helper and its runtime dependencies in the SDK. Keep the native external files from the selected engine version.

  • Upload each verified Engine SDK as a standalone ZIP on manual matrix runs. The artifact name identifies the engine version, platform, architecture, and Node ABI.

  • Keep optional engineSdk.path and engineSdk.version in project settings so each project can select its own SDK and check its exact version. Remove the project-level revision pin and keep the SDK manifest revision for artifact verification.

  • Keep host-specific tools, common tools, platform runtime assets, and packages/engine-compiler/dist in the CLI release. Package the engine separately and omit compiler sources and source maps.

  • Exclude .gitignore and .gitmodules from Engine SDK payloads.

  • Reuse the latest compatible Engine SDK from a verified default-branch Actions run in Publish. An optional artifact ID pins the selection. The standalone CLI ZIP records the SDK version, revision, run and artifact IDs, and ZIP digest.

  • Allow npm run release to use an extracted SDK via --engine-sdk. Build and test the CLI with it, and ship the Engine type declarations in the CLI type package.

  • When a verified Actions artifact expires, recover its ZIP from the configured archive mirror and check its SHA-256 before use.

  • Record the engine source commit in new Engine SDK manifests. Write per-platform cli-info-*.json and engine-info-*.json beside the released files, including ZIP digests when available.

Validation

  • 88 release, SDK packaging, and matrix tests passed. Repacked the Windows Engine SDK and verified that the remaining payload files match the original hashes.
  • 132 workflow tests and 13 DTS tests passed. The generated project schema declares optional engineSdk.path and engineSdk.version.
  • Built a Windows x64 Engine SDK and loaded it in the CLI using the project's configured engine path and version. Verified the simulator executable, native preview, cc-min, and Xcode helper in the snapshot.
  • The Windows x64 and macOS arm64 matrix jobs passed and uploaded their Engine SDK ZIPs. The compatibility gate passed. Actions run
  • 107 workflow tests, 17 SDK packaging tests, and 13 declaration tests passed. Verified the download, digest check, artifact selection, and release ZIP with an external Engine SDK fixture.
  • The Windows x64 Node.js release passed all 179 E2E tests with a locally packed 4.0.0-beta.3 Engine SDK. Recomputed both ZIP SHA-256 digests, matched them against the release metadata, and loaded the compiler from the released CLI.
  • The rebased branch passed all 20 install-workflow tests and all 17 SDK packaging tests.

The Windows tool downloader now tries tar.exe first and falls back to PowerShell when extraction is empty or invalid. It validates the PVRTexTool executable before replacing the installed directory. Both paths were verified locally with the same ZIP that failed in Actions.

@bofeng-song
bofeng-song requested a review from star-e December 3, 2026 09:41
@bofeng-song bofeng-song added the pending Not ready yet label Dec 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending Not ready yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant