-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (42 loc) · 2.15 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Emscripten Build
on:
push:
branches:
- 'master'
tags-ignore:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
path: emscripten-ports
- name: Checkout emscripten
uses: actions/checkout@v4
with:
repository: emscripten-core/emsdk
path: emscripten
- name: Install Emscripten
working-directory: ${{github.workspace}}/emscripten
run: |
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh
emcc -v
- name: Compile | ImGui
working-directory: ${{github.workspace}}/emscripten-ports/examples/ImGui
run: |
source ${{github.workspace}}/emscripten/emsdk_env.sh
emcc --version
mkdir build-glfw-opengl3
emcc --shell-file shell.html --use-port=${{github.workspace}}/emscripten-ports/ports/ImGui/imgui.py:backend=glfw:renderer=opengl3 main_glfw_opengl3.cpp -o build-glfw-opengl3/index.html
mkdir build-glfw-wgpu
emcc --shell-file shell.html --use-port=${{github.workspace}}/emscripten-ports/ports/ImGui/imgui.py:backend=glfw:renderer=wgpu main_glfw_wgpu.cpp -o build-glfw-wgpu/index.html
mkdir build-sdl2-opengl3
emcc --shell-file shell.html --use-port=${{github.workspace}}/emscripten-ports/ports/ImGui/imgui.py:backend=sdl2:renderer=opengl3 main_sdl2_opengl3.cpp -o build-sdl2-opengl3/index.html
# Testing the docking branch
emcc --shell-file shell.html --use-port=${{github.workspace}}/emscripten-ports/ports/ImGui/imgui.py:backend=glfw:renderer=opengl3:branch=docking main_glfw_opengl3.cpp -o build-glfw-opengl3/index.html
emcc --shell-file shell.html --use-port=${{github.workspace}}/emscripten-ports/ports/ImGui/imgui.py:backend=glfw:renderer=wgpu:branch=docking main_glfw_wgpu.cpp -o build-glfw-wgpu/index.html
emcc --shell-file shell.html --use-port=${{github.workspace}}/emscripten-ports/ports/ImGui/imgui.py:backend=sdl2:renderer=opengl3:branch=docking main_sdl2_opengl3.cpp -o build-sdl2-opengl3/index.html