debug: fix render triangle because framebuffer not set #13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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-latest | |
| steps: | |
| - name: Install dependencies | |
| run: | | |
| brew install ninja emscripten | |
| python3 -m venv venv # Create a virtual environment | |
| source venv/bin/activate # Activate the virtual environment | |
| python3 -m pip install --upgrade pip | |
| python3 -m pip install Pillow # Install Pillow in the venv | |
| - 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 | |
| - name: Configure CMake | |
| run: | | |
| emcmake cmake -B ${{github.workspace}}/build -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache | |
| - 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 webRenderer.data webRenderer.html webRenderer.js webRenderer.wasm webRenderer_favicon.png deploy/ | |
| mv deploy/webRenderer.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 |