Skip to content

use new emscripten sink for logstorm #34

use new emscripten sink for logstorm

use new emscripten sink for logstorm #34

Workflow file for this run

name: CI build
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
env:
EMSCRIPTEN_VERSION: 3.1.71
steps:
- uses: actions/checkout@v4
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ runner.os }}-ccache-${{ env.EMSCRIPTEN_VERSION }}-debug
- name: Emscripten cache
uses: actions/cache@v3
with:
path: ${{ runner.temp }}/${{ github.run_id }}/emsdk-main
key: ${{ runner.os }}-emsdk-${{ env.EMSCRIPTEN_VERSION }}-debug
- name: Setup Emscripten toolchain
uses: mymindstorm/setup-emsdk@v14
with:
version: ${{ env.EMSCRIPTEN_VERSION }}
- name: Build
run: ./build.sh
build-rel:
runs-on: ubuntu-latest
env:
EMSCRIPTEN_VERSION: 3.1.71
steps:
- uses: actions/checkout@v4
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ runner.os }}-ccache-${{ env.EMSCRIPTEN_VERSION }}-rel
- name: Emscripten cache
uses: actions/cache@v3
with:
path: ${{ runner.temp }}/${{ github.run_id }}/emsdk-main
key: ${{ runner.os }}-emsdk-${{ env.EMSCRIPTEN_VERSION }}-rel
- name: Setup Emscripten toolchain
uses: mymindstorm/setup-emsdk@v14
with:
version: ${{ env.EMSCRIPTEN_VERSION }}
- name: build-rel
run: CMAKE_BUILD_TYPE=Release ./build.sh
- name: Stage files for upload to GitHub Pages
run: |
mkdir deploy
cp build_rel/client.* deploy/
mv deploy/client.html deploy/index.html
- name: Upload files for later stages
uses: actions/upload-artifact@v4
with:
name: build-rel-artifacts
path: ./deploy
- name: Upload files to GitHub Pages
uses: actions/upload-pages-artifact@v3
with:
path: ./deploy
deploy-pages:
runs-on: ubuntu-latest
needs: build-rel
permissions:
pages: write # Permissions needed to deploy to GitHub Pages
id-token: write # Permissions needed for OIDC authentication
steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
build-electron-linux:
runs-on: ubuntu-latest
needs: build-rel
steps:
- uses: actions/checkout@v4
- name: Setup Node toolchain
uses: actions/setup-node@v4
with:
node-version: 20
- name: Download artifacts from build-rel
uses: actions/download-artifact@v4
with:
name: build-rel-artifacts
path: ./deploy
- name: Copy artifacts to Electron
run: |
mv deploy/* electron/webgpu-demo3/src/
- name: Build
run: |
cd electron/webgpu-demo3
npm install
npm run make -- --platform linux
# TODO: publish
# TODO: cache node
build-electron-win32:
runs-on: windows-latest
needs: build-rel
steps:
- uses: actions/checkout@v4
- name: Setup Node toolchain
uses: actions/setup-node@v4
with:
node-version: 20
- name: Download artifacts from build-rel
uses: actions/download-artifact@v4
with:
name: build-rel-artifacts
path: ./deploy
- name: Copy artifacts to Electron
run: |
Move-Item -Path "deploy\*" -Destination "electron\webgpu-demo3\src"
- name: Build
run: |
cd electron\webgpu-demo3
npm install
npm run make -- --platform win32
# TODO: publish
# TODO: cache node
build-electron-darwin:
if: false # Stage disabled
runs-on: ubuntu-latest
needs: build-rel
steps:
- uses: actions/checkout@v4
- name: Setup Node toolchain
uses: actions/setup-node@v4
with:
node-version: 20
- name: Download artifacts from build-rel
uses: actions/download-artifact@v4
with:
name: build-rel-artifacts
path: ./deploy
- name: Copy artifacts to Electron
run: |
mv deploy/* electron/webgpu-demo3/src/
- name: Build
run: |
cd electron/webgpu-demo3
npm install
npm run make -- --platform darwin
# TODO: publish
# TODO: cache node