From c1be763a9b7d52d27631ee980d7a51dc94cd2fd8 Mon Sep 17 00:00:00 2001 From: "arthur.jamet" Date: Thu, 3 Jun 2021 12:01:39 +0200 Subject: [PATCH] Revert "better workflow for wasm compilation" This reverts commit 56f1b321c0568ec28b61ee3218b4d942166f6bd1. --- .github/workflows/build_web.yml | 6 ++++-- .gitignore | 4 ++-- CMakeLists.txt | 2 +- sources/wasm/frontend.html | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_web.yml b/.github/workflows/build_web.yml index c2604c47..9c84b83b 100644 --- a/.github/workflows/build_web.yml +++ b/.github/workflows/build_web.yml @@ -1,10 +1,12 @@ name: Web Build (Emscripten) -on: [push, pull_request] +on: + push: + branches: + wasm 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 407c1f67..74044c49 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 16771554..71343bba 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 --preload-file ../assets") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s NO_DISABLE_EXCEPTION_CATCHING --shell-file ../sources/wasm/frontend.html --preload-file ../assets") set(CMAKE_EXECUTABLE_SUFFIX ".html") endif () diff --git a/sources/wasm/frontend.html b/sources/wasm/frontend.html index b6f04e36..2816e377 100644 --- a/sources/wasm/frontend.html +++ b/sources/wasm/frontend.html @@ -1,5 +1,5 @@ - +