From 99a5c95c930cc836c4fb0169f10e7387df5cd1e0 Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Thu, 31 Mar 2022 22:44:31 +0200 Subject: [PATCH] CI: Use coi-serviceworker for Cross-origin isolation on gh-pages https://github.com/gzuidhof/coi-serviceworker --- .github/workflows/emsdk.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/emsdk.yml b/.github/workflows/emsdk.yml index 0bf249b..40dd343 100644 --- a/.github/workflows/emsdk.yml +++ b/.github/workflows/emsdk.yml @@ -68,10 +68,14 @@ jobs: build_em/infinisim.js build_em/infinisim.wasm + # using https://github.com/gzuidhof/coi-serviceworker to get Cross-origin isolation on gh-pages + # otherwise the error 'Uncaught ReferenceError: SharedArrayBuffer is not defined' will be shown - name: Prepare Github Page shell: bash run: | mkdir emscripten + curl -o emscripten/coi-serviceworker.js https://raw.githubusercontent.com/gzuidhof/coi-serviceworker/ed2fbe98a222b8e0991a839f504137408d56d2e6/coi-serviceworker.js + sed -i -e 's###' build_em/infinisim.html mv build_em/infinisim.html \ build_em/infinisim.js \ build_em/infinisim.wasm \