diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f04e5cd..c366594 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -151,9 +151,6 @@ jobs: emscripten: strategy: - matrix: - include: - - emscripten_version: 3.1.27 fail-fast: false runs-on: ubuntu-latest steps: @@ -174,25 +171,19 @@ jobs: - name: install emscripten shell: bash -l {0} run: | - git clone https://github.com/emscripten-core/emsdk.git - cd emsdk - ./emsdk install ${{ matrix.emscripten_version }} - source ./emsdk_env.sh - - #- name: install playwright - # shell: bash -l {0} - # run: | - # playwright install - - #- name: run emscripten tests - # shell: bash -l {0} - # run: | - # cd emsdk - # ./emsdk activate ${{ matrix.emscripten_version }} - # source ./emsdk_env.sh - # cd .. - # chmod +x ./test/emscripten/test_emscripten.sh - # ./test/emscripten/test_emscripten.sh + $MAMBA_EXE install -c conda-forge -c https://repo.prefix.dev/emscripten-forge-dev \ + emscripten_emscripten-wasm32 --yes + + - name: install playwright + shell: bash -l {0} + run: | + playwright install + + - name: run emscripten tests + shell: bash -l {0} + run: | + chmod +x ./test/emscripten/test_emscripten.sh + ./test/emscripten/test_emscripten.sh docs: strategy: diff --git a/CMakeLists.txt b/CMakeLists.txt index 6165feb..863f4b8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,6 +81,11 @@ endif() # Flags ################################################################ if(EMSCRIPTEN) + # extra flags to ensure runtime methods are exported + set(EMS"SHELL: -s EXTRA_EXPORTED_RUNTIME_METHODS=['FS','PATH','loadDynamicLibrary']") + target_compile_options(xplugin_host INTERFACE ${EMS}) + target_link_options(xplugin_host INTERFACE ${EMS}) + # compiler flags set_target_properties(xplugin_host PROPERTIES COMPILE_FLAGS "-s MAIN_MODULE=1") set_target_properties(xplugin_plugin PROPERTIES COMPILE_FLAGS "-s SIDE_MODULE=1") diff --git a/environment_emscripten.yml b/environment_emscripten.yml index cc31667..7aff05e 100644 --- a/environment_emscripten.yml +++ b/environment_emscripten.yml @@ -6,4 +6,4 @@ channels: dependencies: - cmake - python - - microsoft::playwright + - microsoft::playwright <= 1.50