Skip to content

Commit feb7b17

Browse files
committed
CI: add emsdk workflow with jobname 'emscripten'
1 parent 881f2b8 commit feb7b17

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

.github/workflows/emsdk.yml

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Build InfiniSim LVGL Simulator using emscripten
2+
# Run on all branches
3+
push:
4+
branches: []
5+
6+
# Also run this Workflow when a Pull Request is created or updated in the "main" and "develop" Branch
7+
pull_request:
8+
branches: [ main, develop ]
9+
10+
jobs:
11+
emscripten:
12+
runs-on: ubuntu-latest
13+
steps:
14+
15+
#########################################################################################
16+
# Download and Install Dependencies
17+
18+
- name: Setup emsdk
19+
uses: mymindstorm/setup-emsdk@v11
20+
with:
21+
# Make sure to set a version number!
22+
version: 3.1.8
23+
# This is the name of the cache folder.
24+
# The cache folder will be placed in the build directory,
25+
# so make sure it doesn't conflict with anything!
26+
actions-cache-folder: 'emsdk-cache'
27+
28+
- name: Tell emsdk to use SDL with pthread proxy fix
29+
run: sed -i -e "s/^TAG =.*/TAG = 'ea7d5307acfb1daf9af6104b60b75114b15bcd27'/" -e "s/HASH =.*/HASH = 'b7d58124f0d1145f23338abfdb6aa07855ac74ed80b3a5b613d23b4930c84d04d1794a62aab2ca2680ba369128ee2028ea51236fab4aaf70556036172fa59e6a'/" emsdk-cache/upstream/emscripten/tools/ports/sdl2.py
30+
31+
- name: Verify
32+
run: emcc -v
33+
34+
- name: Install cmake
35+
uses: lukka/get-cmake@v3.18.3
36+
37+
#########################################################################################
38+
# Checkout
39+
40+
- name: Checkout source files
41+
uses: actions/checkout@v2
42+
with:
43+
submodules: recursive
44+
45+
#########################################################################################
46+
# CMake
47+
48+
- name: CMake
49+
run: |
50+
emcmake cmake -S . -B build_em -DCMAKE_BUILD_TYPE=Release
51+
52+
#########################################################################################
53+
# Build and Upload simulator wasm files
54+
55+
- name: Build simulator executable
56+
run: |
57+
cmake --build build_lv_sim
58+
59+
- name: Upload simulator executable
60+
uses: actions/upload-artifact@v3
61+
with:
62+
name: infinisim_emscripten
63+
path: |
64+
build_em/infinisim.html
65+
build_em/infinisim.js
66+
build_em/infinisim.wasm

0 commit comments

Comments
 (0)