[emscripten] Build link test with Closure in GitHub workflow
The default build type is Debug, which disables Closure:
em++: warning: disabling closure because debug info was requested [-Wemcc]
No-Try: true
Fixed: 418173488
Change-Id: Ib685f13895b645fe1a69f2ca3d7f47310bbda086
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/243154
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
diff --git a/.github/workflows/package-emdawnwebgpu.sh b/.github/workflows/package-emdawnwebgpu.sh
index f4869f6..76af62a 100755
--- a/.github/workflows/package-emdawnwebgpu.sh
+++ b/.github/workflows/package-emdawnwebgpu.sh
@@ -22,11 +22,17 @@
git submodule update --init --depth=1 third_party/emsdk
python3 tools/activate-emsdk
-# Build the package, and also test that the bindings can link.
+# Build the package (which is not affected by the build type), and build the
+# link test in release mode (with Closure, which verifies the JS to some extent)
mkdir -p out/wasm
-third_party/emsdk/upstream/emscripten/emcmake cmake -S=. -B=out/wasm
+third_party/emsdk/upstream/emscripten/emcmake cmake -S=. -B=out/wasm -DCMAKE_BUILD_TYPE=Release
make -j4 -C out/wasm emdawnwebgpu_pkg emdawnwebgpu_link_test
+# Also build the link test in debug mode.
+mkdir -p out/wasm-debug
+third_party/emsdk/upstream/emscripten/emcmake cmake -S=. -B=out/wasm-debug -DCMAKE_BUILD_TYPE=Debug
+make -j4 -C out/wasm-debug emdawnwebgpu_link_test
+
# Create zip
cat << EOF > out/wasm/emdawnwebgpu_pkg/VERSION.txt
Dawn release ${PKG_VERSION} at revision <https://dawn.googlesource.com/dawn/+/${SHA}>.