From 25b1b482e3cd9de2aad5de4d916e31c347d7719b Mon Sep 17 00:00:00 2001 From: James Chen Date: Fri, 13 Dec 2024 14:06:11 +0800 Subject: [PATCH] [v3.8.6] Update build-wasm-libs.yml, apply a patch for package size optimization --- .github/workflows/build-wasm-libs.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/build-wasm-libs.yml b/.github/workflows/build-wasm-libs.yml index 6fcd7121304..dfabe4e0f75 100644 --- a/.github/workflows/build-wasm-libs.yml +++ b/.github/workflows/build-wasm-libs.yml @@ -40,6 +40,15 @@ jobs: fi which ninja + - name: Apply emscripten patches + run: | + echo "--------------------------------- Save bind.cpp ---------------------------------" + cp $EMSDK/upstream/emscripten/system/lib/embind/bind.cpp $EMSDK/upstream/emscripten/system/lib/embind/bind.cpp.bak + echo "--------------------------------- Apply embind bind.cpp patches ---------------------------------" + cp -f .github/workflows/emscripten-patches/embind/bind.cpp $EMSDK/upstream/emscripten/system/lib/embind/ + echo "--------------------------------- Apply patches DONE! ---------------------------------" + cat $EMSDK/upstream/emscripten/system/lib/embind/bind.cpp + - name: Build Spine WASM run: | cd ./native/cocos/editor-support/spine-wasm @@ -72,3 +81,11 @@ jobs: with: name: spine-emscripten path: dist + + - name: Restore patches + run: | + echo "-------------------------- Restore patches ---------------------------------" + rm $EMSDK/upstream/emscripten/system/lib/embind/bind.cpp + mv $EMSDK/upstream/emscripten/system/lib/embind/bind.cpp.bak $EMSDK/upstream/emscripten/system/lib/embind/bind.cpp + echo "-------------------------- Restore patches DONE! ---------------------------------" + cat $EMSDK/upstream/emscripten/system/lib/embind/bind.cpp