diff --git a/.github/workflows/emscripten.yml b/.github/workflows/emscripten.yml index d8da72c63..619690589 100644 --- a/.github/workflows/emscripten.yml +++ b/.github/workflows/emscripten.yml @@ -24,4 +24,4 @@ jobs: run: | echo "Build script for wasm" playwright install - ./test/test_wasm/test_wasm.sh + ./test/test_wasm/test_wasm.sh 4.0.21 diff --git a/test/test_wasm/test_wasm.sh b/test/test_wasm/test_wasm.sh index b4770af6d..91b1f09ae 100755 --- a/test/test_wasm/test_wasm.sh +++ b/test/test_wasm/test_wasm.sh @@ -8,14 +8,14 @@ SRC_DIR=$TEST_WASM_DIR/../.. # the emsdk dir can be passed as optional argument # if not passed, it will be downloaded in the current dir -if [ $# -eq 0 ] +if [ $# -eq 0 -o ! -d "$1" ] then + EMSCRIPTEN_VERSION=${1:-latest} git clone https://github.com/emscripten-core/emsdk cd emsdk - ./emsdk install latest - ./emsdk activate latest + ./emsdk install ${EMSCRIPTEN_VERSION} + ./emsdk activate ${EMSCRIPTEN_VERSION} source ./emsdk_env.sh - else EMSCRIPTEN_DIR=$1 source $EMSCRIPTEN_DIR/emsdk_env.sh @@ -40,4 +40,4 @@ emmake make -j4 cd .. # run tests in browser -python $TEST_WASM_DIR/test_wasm_playwright.py build/test \ No newline at end of file +python $TEST_WASM_DIR/test_wasm_playwright.py build/test