-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: add emsdk workflow with jobname 'emscripten'
- Loading branch information
1 parent
881f2b8
commit feb7b17
Showing
1 changed file
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Build InfiniSim LVGL Simulator using emscripten | ||
# Run on all branches | ||
push: | ||
branches: [] | ||
|
||
# Also run this Workflow when a Pull Request is created or updated in the "main" and "develop" Branch | ||
pull_request: | ||
branches: [ main, develop ] | ||
|
||
jobs: | ||
emscripten: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
######################################################################################### | ||
# Download and Install Dependencies | ||
|
||
- name: Setup emsdk | ||
uses: mymindstorm/setup-emsdk@v11 | ||
with: | ||
# Make sure to set a version number! | ||
version: 3.1.8 | ||
# This is the name of the cache folder. | ||
# The cache folder will be placed in the build directory, | ||
# so make sure it doesn't conflict with anything! | ||
actions-cache-folder: 'emsdk-cache' | ||
|
||
- name: Tell emsdk to use SDL with pthread proxy fix | ||
run: sed -i -e "s/^TAG =.*/TAG = 'ea7d5307acfb1daf9af6104b60b75114b15bcd27'/" -e "s/HASH =.*/HASH = 'b7d58124f0d1145f23338abfdb6aa07855ac74ed80b3a5b613d23b4930c84d04d1794a62aab2ca2680ba369128ee2028ea51236fab4aaf70556036172fa59e6a'/" emsdk-cache/upstream/emscripten/tools/ports/sdl2.py | ||
|
||
- name: Verify | ||
run: emcc -v | ||
|
||
- name: Install cmake | ||
uses: lukka/[email protected] | ||
|
||
######################################################################################### | ||
# Checkout | ||
|
||
- name: Checkout source files | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
|
||
######################################################################################### | ||
# CMake | ||
|
||
- name: CMake | ||
run: | | ||
emcmake cmake -S . -B build_em -DCMAKE_BUILD_TYPE=Release | ||
######################################################################################### | ||
# Build and Upload simulator wasm files | ||
|
||
- name: Build simulator executable | ||
run: | | ||
cmake --build build_lv_sim | ||
- name: Upload simulator executable | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: infinisim_emscripten | ||
path: | | ||
build_em/infinisim.html | ||
build_em/infinisim.js | ||
build_em/infinisim.wasm |