Skip to content

A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.

ci: add explicit playable/wechat build verification to CI

esengine2a78bc4c571b
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 6a05ff259..cc509ca4d 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -77,8 +77,25 @@ jobs:
- name: Install dependencies
run: pnpm install
- - name: Build all targets
- run: node build-tools/cli.js build -t all --no-sync
+ - name: Build Web target
+ run: node build-tools/cli.js build -t web --no-sync
+
+ - name: Build Playable target
+ run: node build-tools/cli.js build -t playable --no-sync
+
+ - name: Build WeChat target
+ run: node build-tools/cli.js build -t wechat --no-sync
+
+ - name: Verify build outputs
+ run: |
+ test -f build/wasm/web/esengine.js && echo "✓ Web JS"
+ test -f build/wasm/web/esengine.wasm && echo "✓ Web WASM"
+ test -f build/wasm/playable/esengine.single.js && echo "✓ Playable JS"
+ test -f build/wasm/wechat/esengine.wxgame.js && echo "✓ WeChat JS"
+ test -f build/wasm/wechat/esengine.wxgame.wasm && echo "✓ WeChat WASM"
+
+ - name: Build remaining targets (spine, physics)
+ run: node build-tools/cli.js build -t all --no-sync --continue-on-error
test:
name: Tests (SDK + Editor)
@@ -114,3 +131,45 @@ jobs:
- name: Run Editor tests
run: pnpm --filter ./editor exec vitest run
+
+ test-tauri:
+ name: Tests (Tauri)
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - uses: dtolnay/rust-toolchain@stable
+
+ - uses: Swatinem/rust-cache@v2
+ with:
+ workspaces: desktop/src-tauri -> target
+
+ - name: Install system dependencies
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
+
+ - name: Run Tauri tests
+ run: cd desktop/src-tauri && cargo test
+
+ test-tauri:
+ name: Tests (Tauri)
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - uses: dtolnay/rust-toolchain@stable
+
+ - uses: Swatinem/rust-cache@v2
+ with:
+ workspaces: desktop/src-tauri -> target
+
+ - name: Install system dependencies
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
+
+ - name: Run Tauri tests
+ run: cd desktop/src-tauri && cargo test
diff --git a/.github/workflows/cross-platform.yml b/.github/workflows/cross-platform.yml
index 6180ab393..f4c478ceb 100644
--- a/.github/workflows/cross-platform.yml
+++ b/.github/workflows/cross-platform.yml
@@ -132,19 +132,63 @@ jobs:
- name: Build Editor
run: pnpm --filter ./editor build
- # Full engine build (WASM + SDK)
- - name: Build engine (WASM + SDK)
- run: node build-tools/cli.js build -t all
+ # Build WASM targets individually and verify outputs
+ - name: Build Web target
+ run: node build-tools/cli.js build -t web --no-sync
+
+ - name: Verify Web output
+ shell: bash
+ run: |
+ test -f build/wasm/web/esengine.js || (echo "FAIL: esengine.js not found" && exit 1)
+ test -f build/wasm/web/esengine.wasm || (echo "FAIL: esengine.wasm not found" && exit 1)
+ echo "Web build OK"
+
+ - name: Build Playable target
+ run: node build-tools/cli.js build -t playable --no-sync
+
+ - name: Verify Playable output
+ shell: bash
+ run: |
+ test -f build/wasm/playable/esengine.single.js || (echo "FAIL: esengine.single.js not found" && exit 1)
+ echo "Playable build OK"
+
+ - name: Build WeChat target
+ run: node build-tools/cli.js build -t wechat --no-sync
+
+ - name: Verify WeChat output
+ shell: bash
+ run: |
+ test -f build/wasm/wechat/esengine.wxgame.js || (echo "FAIL: esengine.wxgame.js not found" && exit 1)
+ test -f build/wasm/wechat/esengine.wxgame.wasm || (echo "FAIL: esengine.wxgame.wasm not found" && exit 1)
+ echo "WeChat build OK"
+
+ - name: Build Spine targets
+ run: |
+ node build-tools/cli.js build -t spine --no-sync
+ node build-tools/cli.js build -t spine38 --no-sync
+ node build-tools/cli.js build -t spine41 --no-sync
+
+ - name: Build Physics targets
+ run: |
+ node build-tools/cli.js build -t physics --no-sync
+ node build-tools/cli.js build -t physics-playable --no-sync
+
+ - name: Build SDK
+ run: node build-tools/cli.js sdk --no-sync
# Toolchain packaging
- name: Package toolchain
run: node build-tools/cli.js toolchain
- # Rust compilation check (Tauri app)
+ # Rust tests (Tauri app)
- name: Tauri build check
shell: bash
run: cd desktop/src-tauri && cargo check
+ - name: Tauri unit tests
+ shell: bash
+ run: cd desktop/src-tauri && cargo test
+
# Artifact size report
- name: Collect artifact sizes
id: sizes