diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6751ca36a..281085a19 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -215,7 +215,48 @@ jobs: working-directory: ${{runner.workspace}}/build run: cmake --build . --config $BUILD_TYPE -j 2 - build-wasm: + webapp-mobile: + runs-on: ubuntu-20.04 + env: + BUILD_TYPE: Release + CMAKE_FLAGS: -DSPIRIT_UI_USE_IMGUI=OFF -DSPIRIT_BUILD_FOR_JS=ON + EMSCRIPTEN_VERSION: "1.39.20" + + steps: + - uses: actions/checkout@v2 + + - name: 📚 Install Emscripten + working-directory: ${{runner.workspace}} + run: | + git clone https://github.com/emscripten-core/emsdk.git + cd emsdk + ./emsdk install $EMSCRIPTEN_VERSION + ./emsdk activate $EMSCRIPTEN_VERSION + + - name: 📁 Create build folder + run: cmake -E make_directory ${{runner.workspace}}/build + + - name: ⚙ Configure + shell: bash + working-directory: ${{runner.workspace}}/build + run: | + source ${{runner.workspace}}/emsdk/emsdk_env.sh + cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CMAKE_FLAGS -DCMAKE_TOOLCHAIN_FILE=${{runner.workspace}}/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake + + - name: 🛠 Build + shell: bash + working-directory: ${{runner.workspace}}/build + run: | + source ${{runner.workspace}}/emsdk/emsdk_env.sh + cmake --build . --config $BUILD_TYPE -j 2 + + - name: 📦 Archive mobile web app + uses: actions/upload-artifact@v2 + with: + name: webapp-mobile + path: ui-web/ + + webapp-desktop: runs-on: ubuntu-20.04 env: BUILD_TYPE: Release @@ -250,6 +291,12 @@ jobs: source ${{runner.workspace}}/emsdk/emsdk_env.sh cmake --build . --config $BUILD_TYPE -j 2 + - name: 📦 Archive desktop web app + uses: actions/upload-artifact@v2 + with: + name: webapp-desktop + path: ui-cpp/ui-imgui/webapp/ + deploy-pypi: if: github.event_name != 'pull_request' needs: test