diff --git a/.github/workflows/build_web.yml b/.github/workflows/build_web.yml index 9c84b83b..c2604c47 100644 --- a/.github/workflows/build_web.yml +++ b/.github/workflows/build_web.yml @@ -1,12 +1,10 @@ name: Web Build (Emscripten) -on: - push: - branches: - wasm +on: [push, pull_request] jobs: Push: runs-on: ubuntu-latest + if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository steps: - uses: actions/checkout@v1 with: diff --git a/.gitignore b/.gitignore index 74044c49..407c1f67 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,5 @@ cmake-build-debug .vscode build/* docs/* -emsdk/* -build_web/* \ No newline at end of file +emsdk*/ +build_web/ \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 9fc51470..fa75fb54 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,7 @@ add_subdirectory(${PROJECT_SOURCE_DIR}/lib/Ray) if (EMSCRIPTEN) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s USE_GLFW=3 -s ASSERTIONS=1 -s WASM=1 -s ASYNCIFY") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s USE_GLFW=3 -s ASSERTIONS=1 -s WASM=1 -s ASYNCIFY") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s NO_DISABLE_EXCEPTION_CATCHING --shell-file ../sources/wasm/frontend.html --preload-file ../assets") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s NO_DISABLE_EXCEPTION_CATCHING --preload-file ../assets") set(CMAKE_EXECUTABLE_SUFFIX ".html") endif () diff --git a/sources/wasm/frontend.html b/sources/wasm/frontend.html index 2816e377..b6f04e36 100644 --- a/sources/wasm/frontend.html +++ b/sources/wasm/frontend.html @@ -1,5 +1,5 @@ - +