From feb7b1751eb72662325378c449ab60598a5048e1 Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Thu, 31 Mar 2022 21:23:56 +0200 Subject: [PATCH] CI: add emsdk workflow with jobname 'emscripten' --- .github/workflows/emsdk.yml | 66 +++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 .github/workflows/emsdk.yml diff --git a/.github/workflows/emsdk.yml b/.github/workflows/emsdk.yml new file mode 100644 index 0000000..2cb7462 --- /dev/null +++ b/.github/workflows/emsdk.yml @@ -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/get-cmake@v3.18.3 + + ######################################################################################### + # 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