Skip to content

Commit

Permalink
CI: added build of mobile webapp and webapp artifacts.
Browse files Browse the repository at this point in the history
  • Loading branch information
GPMueller committed Feb 20, 2021
1 parent 71d2f07 commit 692bdd6
Showing 1 changed file with 48 additions and 1 deletion.
49 changes: 48 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 692bdd6

Please sign in to comment.