From f0ad82f04088d7a422d5c67113315d02b59d6752 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Costa?= Date: Fri, 5 Sep 2025 07:35:34 +0200 Subject: [PATCH] ci(install): add cmake installation workflow (#8794) --- .github/workflows/install.yml | 49 +++++++++++++++++++++ configs/ci/install/lv_conf.defaults | 68 +++++++++++++++++++++++++++++ 2 files changed, 117 insertions(+) create mode 100644 .github/workflows/install.yml create mode 100644 configs/ci/install/lv_conf.defaults diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml new file mode 100644 index 0000000000..3824325f5b --- /dev/null +++ b/.github/workflows/install.yml @@ -0,0 +1,49 @@ +name: Install LVGL using CMake + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }} + cancel-in-progress: true + +jobs: + build-examples: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - name: Generate lv_conf.h + run: | + cp lv_conf_template.h lv_conf.h + python3 ./scripts/generate_lv_conf.py \ + --template lv_conf_template.h \ + --config lv_conf.h \ + --defaults configs/ci/install/lv_conf.defaults + + - name: Build LVGL + run: | + cmake -B build -DCMAKE_INSTALL_PREFIX=$(pwd)/lvgl-install + cmake --build build -j$(nproc) + - name: Install LVGL + run: cmake --install build + + - name: Build an application with the installed version of LVGL + run: | + echo "#include + #include + #include + #include + int main(void) { + lv_init(); + lv_example_label_1(); + lv_demo_widgets(); + while(1) { + lv_timer_handler(); + } + return 0; + }" >> main.c + # We link with `g++` as thorvg (ThorVG library) contains C++ code that requires C++ runtime symbols + g++ main.c -o main -I$(pwd)/lvgl-install/include -L$(pwd)/lvgl-install/lib -llvgl_thorvg -llvgl_examples -llvgl_demos -llvgl -lm diff --git a/configs/ci/install/lv_conf.defaults b/configs/ci/install/lv_conf.defaults new file mode 100644 index 0000000000..c7a6f87925 --- /dev/null +++ b/configs/ci/install/lv_conf.defaults @@ -0,0 +1,68 @@ +LV_COLOR_DEPTH 16 + +LV_USE_STDLIB_MALLOC LV_STDLIB_CLIB +LV_USE_STDLIB_STRING LV_STDLIB_CLIB +LV_USE_STDLIB_SPRINTF LV_STDLIB_CLIB + +# LV_USE_OS LV_OS_PTHREAD +# LV_DRAW_SW_DRAW_UNIT_CNT 2 +# LV_DRAW_THREAD_STACK_SIZE (32 * 1024) + +LV_USE_SYSMON 0 +LV_USE_PERF_MONITOR 0 + +LV_USE_DRAW_SW_COMPLEX_GRADIENTS 1 +LV_OBJ_STYLE_CACHE 1 +LV_USE_LOG 1 +LV_LOG_PRINTF 1 +LV_USE_ASSERT_MEM_INTEGRITY 1 +LV_USE_ASSERT_OBJ 1 +LV_USE_ASSERT_STYLE 1 +LV_FONT_MONTSERRAT_12 1 +LV_FONT_MONTSERRAT_14 1 +LV_FONT_MONTSERRAT_16 1 +LV_FONT_MONTSERRAT_18 1 +LV_FONT_MONTSERRAT_20 1 +LV_FONT_MONTSERRAT_22 1 +LV_FONT_MONTSERRAT_24 1 +LV_FONT_MONTSERRAT_26 1 +LV_FONT_MONTSERRAT_28 1 +LV_FONT_MONTSERRAT_30 1 +LV_FONT_MONTSERRAT_32 1 +LV_FONT_MONTSERRAT_34 1 +LV_FONT_MONTSERRAT_36 1 +LV_FONT_MONTSERRAT_38 1 +LV_FONT_MONTSERRAT_40 1 +LV_FONT_MONTSERRAT_42 1 +LV_FONT_MONTSERRAT_44 1 +LV_FONT_MONTSERRAT_46 1 +LV_FONT_MONTSERRAT_48 1 +LV_FONT_MONTSERRAT_28_COMPRESSED 1 +LV_FONT_DEJAVU_16_PERSIAN_HEBREW 1 +LV_FONT_SOURCE_HAN_SANS_SC_16_CJK 1 +LV_FONT_UNSCII_8 1 +LV_FONT_FMT_TXT_LARGE 1 + +LV_USE_FS_STDIO 1 +LV_FS_DEFAULT_DRIVER_LETTER 'A' +LV_FS_STDIO_LETTER 'A' + +LV_USE_VECTOR_GRAPHIC 1 +LV_USE_THORVG_INTERNAL 1 +LV_USE_MATRIX 1 +LV_USE_FLOAT 1 +LV_USE_LOTTIE 1 +LV_USE_IMGFONT 1 +LV_USE_LZ4_INTERNAL 1 +LV_USE_TINY_TTF 1 +LV_USE_BARCODE 1 +LV_USE_QRCODE 1 +LV_USE_RLE 1 +LV_BIN_DECODER_RAM_LOAD 1 +LV_USE_TJPGD 1 +LV_USE_BMP 1 +LV_USE_LABEL 1 +LV_USE_LODEPNG 1 +LV_BUILD_EXAMPLES 1 +LV_BUILD_DEMOS 1 +LV_USE_DEMO_WIDGETS 1