-
Notifications
You must be signed in to change notification settings - Fork 3
81 lines (67 loc) · 2.7 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
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-glfw
- 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: Setup prerequisites for CMake
run: sudo apt-get install build-essential
- name: Configure CMake Project
working-directory: ${{github.workspace}}/emscripten-glfw
run: |
source ${{github.workspace}}/emscripten/emsdk_env.sh
emcmake cmake -B build -DCMAKE_BUILD_TYPE=Release .
- name: Compile all
working-directory: ${{github.workspace}}/emscripten-glfw/build
run: cmake --build . --target examples-all
- name: Result
working-directory: ${{github.workspace}}/emscripten-glfw/build
run: ls -l examples/example_minimal
- name: Configure CMake Project (small)
working-directory: ${{github.workspace}}/emscripten-glfw
run: |
source ${{github.workspace}}/emscripten/emsdk_env.sh
emcmake cmake -B build-small -DCMAKE_BUILD_TYPE=Release -DEMSCRIPTEN_GLFW3_DISABLE_JOYSTICK=ON -DEMSCRIPTEN_GLFW3_DISABLE_MULTI_WINDOW_SUPPORT=ON .
- name: Compile all (small)
working-directory: ${{github.workspace}}/emscripten-glfw/build-small
run: cmake --build . --target examples-all
- name: Result (small)
working-directory: ${{github.workspace}}/emscripten-glfw/build-small
run: ls -l examples/example_minimal
- name: Compile with port
working-directory: ${{github.workspace}}/emscripten-glfw
run: |
source ${{github.workspace}}/emscripten/emsdk_env.sh
mkdir build-with-port
emcc --version
emcc --use-port=contrib.glfw3 examples/example_minimal/main.cpp -O2 -o build-with-port/index.html
ls -l build-with-port
- name: Compile with port (small)
working-directory: ${{github.workspace}}/emscripten-glfw
run: |
source ${{github.workspace}}/emscripten/emsdk_env.sh
mkdir build-with-port-small
emcc --version
emcc --use-port=contrib.glfw3:disableWarning=true:disableMultiWindow=true:disableJoystick=true examples/example_minimal/main.cpp -O2 -o build-with-port-small/index.html
ls -l build-with-port-small