Skip to content

fix: CI removed pch_instantiate_templates from GNU #16

fix: CI removed pch_instantiate_templates from GNU

fix: CI removed pch_instantiate_templates from GNU #16

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
permissions:
contents: write
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
target: [desktop, web]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y xorg-dev libglu1-mesa-dev
- name: Setup CMake and Ninja
uses: lukka/get-cmake@latest
with:
useCloudCache: true
useLocalCache: false
cmakeVersion: "^3.24.0"
ninjaVersion: "^1.11.0"
- name: Setup Emscripten
if: matrix.target == 'web'
uses: mymindstorm/setup-emsdk@v14
with:
version: 3.1.51
- name: Export Emscripten environment (Unix)
if: matrix.target == 'web' && matrix.os != 'windows-latest'
run: |
echo "EMSDK_ROOT=$EMSDK/upstream/emscripten" >> $GITHUB_ENV
echo "EMSDK_INCLUDE_ROOT=$EMSDK/upstream/emscripten/cache/sysroot/include" >> $GITHUB_ENV
- name: Export Emscripten environment (Windows)
if: matrix.target == 'web' && matrix.os == 'windows-latest'
run: |
echo "EMSDK_ROOT=$EMSDK/upstream/emscripten" >> $env:GITHUB_ENV
echo "EMSDK_INCLUDE_ROOT=$EMSDK/upstream/emscripten/cache/sysroot/include" >> $env:GITHUB_ENV
- name: Configure
run: cmake --preset=${{ matrix.target }}-release
- name: Build
run: cmake --build ./build --target=all
- name: Copy WASM module (Ubuntu)
if: matrix.target == 'web' && matrix.os == 'ubuntu-latest'
run: |
cp ./build/sandbox.wasm ./src/web
cp ./build/sandbox.js ./src/web
cp ./build/sandbox.html ./src/web
- name: Deploy to GitHub Pages (Ubuntu)
if: matrix.target == 'web' && matrix.os == 'ubuntu-latest'
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
branch: gh-pages
folder: src/web
clean: true