Skip to content

Update app.cpp

Update app.cpp #4

Workflow file for this run

name: Emscripten build
on:
pull_request:
branches:
- "*"
push:
branches:
- "*"
paths:
# This action only runs on push when C++ files are changed
- "**.cpp"
- "**.h"
- "**.cmake"
- "**Lists.txt"
- "**-emscripten.yml"
workflow_dispatch:
env:
CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules
jobs:
build:
name: Build and deploy
runs-on: macos-12
steps:
- name: Install dependencies
run: |
brew install ninja emscripten
python3 -m pip install Pillow
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/cache@v3
with:
path: "**/cpm_modules"
key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
# Setup caching of build artifacts to reduce total build time (only Linux and MacOS)
- name: ccache
uses: hendrikmuhs/[email protected]
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
# emcmake cmake -B ${{github.workspace}}/build -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- name: Configure CMake
run: |
emcmake cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=MinSizeRel
- name: Build
run: cmake --build ${{github.workspace}}/build --parallel 4
- name: Archive build artifacts
uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: |
${{github.workspace}}/build
# - name: Copy web app
# working-directory: ${{github.workspace}}/build
# run: |
# mkdir deploy
# cp HDRView.data HDRView.html HDRView.js HDRView.wasm HDRView_favicon.png FileSaver.js deploy/
# mv deploy/HDRView.html deploy/index.html
# - name: Publish
# uses: peaceiris/actions-gh-pages@v3
# with:
# personal_token: ${{ secrets.GITHUB_TOKEN }}
# publish_branch: gh-pages
# publish_dir: ${{github.workspace}}/build/deploy