From 03174d59a92be850e19c21ee4e258248f67ea3b8 Mon Sep 17 00:00:00 2001 From: Richard Gazdik Date: Thu, 12 Dec 2024 13:36:16 +0100 Subject: [PATCH] fix: Compile liblvgl.a first and then run a docker command again to build runtime.js --- .github/workflows/publish-tests.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/publish-tests.yml b/.github/workflows/publish-tests.yml index 24a6424..2ad1103 100644 --- a/.github/workflows/publish-tests.yml +++ b/.github/workflows/publish-tests.yml @@ -107,6 +107,27 @@ jobs: fi echo "widget_functions=$WIDGET_LIST" >> $GITHUB_OUTPUT + # Cache LVGL library + - name: Cache LVGL library + id: cache-lvgl-lib + uses: actions/cache@v3 + with: + path: /tmp/runtime/lib/liblvgl.a + key: lvgl-lib-${{ steps.lvgl-commit.outputs.commit_hash }} + + - name: Build LVGL library + if: steps.cache-lvgl-lib.outputs.cache-hit != 'true' + run: | + docker run --rm \ + -v /tmp/runtime:/work \ + -w /work/lib \ + coevin/emscripten-sdl2:main \ + sh -c 'mkdir -p /tmp/build && \ + cd /tmp/build && \ + emcmake cmake /work/lib && \ + emmake make -j8 && \ + cp liblvgl.a /work/lib/' + - name: Build runtime run: | # Create build directory