ci(install): add cmake installation workflow (#8794)

This commit is contained in:
André Costa
2025-09-05 07:35:34 +02:00
committed by GitHub
parent f93aa324e0
commit f0ad82f040
2 changed files with 117 additions and 0 deletions
+49
View File
@@ -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 <lvgl/lvgl.h>
#include <lvgl/lvgl.h>
#include <lvgl/demos/lv_demos.h>
#include <lvgl/examples/lv_examples.h>
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
+68
View File
@@ -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