feat(ci): add build test for VG-Lite simulator (#5278)
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
This commit is contained in:
3
.github/workflows/ccpp.yml
vendored
3
.github/workflows/ccpp.yml
vendored
@@ -16,7 +16,8 @@ jobs:
|
|||||||
# See BUILD_OPTIONS in tests/CMakeLists.txt.
|
# See BUILD_OPTIONS in tests/CMakeLists.txt.
|
||||||
build_option: ['OPTIONS_16BIT',
|
build_option: ['OPTIONS_16BIT',
|
||||||
'OPTIONS_24BIT',
|
'OPTIONS_24BIT',
|
||||||
'OPTIONS_FULL_32BIT']
|
'OPTIONS_FULL_32BIT',
|
||||||
|
"OPTIONS_VG_LITE"]
|
||||||
name: Build ${{ matrix.build_option }}
|
name: Build ${{ matrix.build_option }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ static void task_draw_cb(void * ctx, const lv_vector_path_t * path, const lv_vec
|
|||||||
case LV_VECTOR_DRAW_STYLE_GRADIENT: {
|
case LV_VECTOR_DRAW_STYLE_GRADIENT: {
|
||||||
/* draw gradient */
|
/* draw gradient */
|
||||||
lv_area_t grad_area;
|
lv_area_t grad_area;
|
||||||
lv_area_set(&grad_area, min_x, min_y, max_x, max_y);
|
lv_area_set(&grad_area, (int32_t)min_x, (int32_t)min_y, (int32_t)max_x, (int32_t)max_y);
|
||||||
lv_vector_gradient_style_t style = dsc->fill_dsc.gradient.style;
|
lv_vector_gradient_style_t style = dsc->fill_dsc.gradient.style;
|
||||||
vg_lite_gradient_spreadmode_t spreadmode = lv_spread_to_vg(dsc->fill_dsc.gradient.spread);
|
vg_lite_gradient_spreadmode_t spreadmode = lv_spread_to_vg(dsc->fill_dsc.gradient.spread);
|
||||||
LV_UNUSED(spreadmode);
|
LV_UNUSED(spreadmode);
|
||||||
|
|||||||
@@ -382,6 +382,7 @@ vg_lite_buffer_format_t lv_vg_lite_vg_fmt(lv_color_format_t cf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
LV_ASSERT(false);
|
LV_ASSERT(false);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void lv_vg_lite_buffer_format_bytes(
|
void lv_vg_lite_buffer_format_bytes(
|
||||||
|
|||||||
@@ -43,6 +43,10 @@ include(CTest)
|
|||||||
set(LVGL_TEST_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
set(LVGL_TEST_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
|
|
||||||
|
set(LVGL_TEST_OPTIONS_VG_LITE
|
||||||
|
-DLV_TEST_OPTION=6
|
||||||
|
)
|
||||||
|
|
||||||
set(LVGL_TEST_OPTIONS_MINIMAL_MONOCHROME
|
set(LVGL_TEST_OPTIONS_MINIMAL_MONOCHROME
|
||||||
-DLV_TEST_OPTION=1
|
-DLV_TEST_OPTION=1
|
||||||
)
|
)
|
||||||
@@ -78,7 +82,9 @@ set(LVGL_TEST_OPTIONS_TEST_DEFHEAP
|
|||||||
--coverage
|
--coverage
|
||||||
)
|
)
|
||||||
|
|
||||||
if (OPTIONS_NORMAL_8BIT)
|
if (OPTIONS_VG_LITE)
|
||||||
|
set (BUILD_OPTIONS ${LVGL_TEST_OPTIONS_VG_LITE})
|
||||||
|
elseif (OPTIONS_NORMAL_8BIT)
|
||||||
set (BUILD_OPTIONS ${LVGL_TEST_OPTIONS_NORMAL_8BIT})
|
set (BUILD_OPTIONS ${LVGL_TEST_OPTIONS_NORMAL_8BIT})
|
||||||
elseif (OPTIONS_16BIT)
|
elseif (OPTIONS_16BIT)
|
||||||
set (BUILD_OPTIONS ${LVGL_TEST_OPTIONS_16BIT})
|
set (BUILD_OPTIONS ${LVGL_TEST_OPTIONS_16BIT})
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ build_only_options = {
|
|||||||
'OPTIONS_16BIT': 'Minimal config, 16 bit color depth',
|
'OPTIONS_16BIT': 'Minimal config, 16 bit color depth',
|
||||||
'OPTIONS_24BIT': 'Normal config, 24 bit color depth',
|
'OPTIONS_24BIT': 'Normal config, 24 bit color depth',
|
||||||
'OPTIONS_FULL_32BIT': 'Full config, 32 bit color depth',
|
'OPTIONS_FULL_32BIT': 'Full config, 32 bit color depth',
|
||||||
|
'OPTIONS_VG_LITE': 'VG-Lite simulator with full config, 32 bit color depth',
|
||||||
}
|
}
|
||||||
|
|
||||||
test_options = {
|
test_options = {
|
||||||
|
|||||||
@@ -62,11 +62,29 @@ typedef void * lv_user_data_t;
|
|||||||
***********************/
|
***********************/
|
||||||
|
|
||||||
#define LV_USE_DEV_VERSION
|
#define LV_USE_DEV_VERSION
|
||||||
|
|
||||||
#if !(defined(LV_TEST_OPTION)) || LV_TEST_OPTION == 5
|
#if !(defined(LV_TEST_OPTION)) || LV_TEST_OPTION == 5
|
||||||
#define LV_COLOR_DEPTH 32
|
#define LV_COLOR_DEPTH 32
|
||||||
#define LV_DPI_DEF 160
|
#define LV_DPI_DEF 160
|
||||||
#include "lv_test_conf_full.h"
|
#include "lv_test_conf_full.h"
|
||||||
|
#elif LV_TEST_OPTION == 6
|
||||||
|
#define LV_COLOR_DEPTH 32
|
||||||
|
#define LV_DPI_DEF 160
|
||||||
|
|
||||||
|
#define LV_USE_THORVG_INTERNAL 1
|
||||||
|
/* Use VG-Lite GPU. */
|
||||||
|
#define LV_USE_DRAW_VG_LITE 1
|
||||||
|
|
||||||
|
/* Enbale VG-Lite custom external 'gpu_init()' function */
|
||||||
|
#define LV_VG_LITE_USE_GPU_INIT 1
|
||||||
|
|
||||||
|
/* Enable VG-Lite assert. */
|
||||||
|
#define LV_VG_LITE_USE_ASSERT 1
|
||||||
|
|
||||||
|
/* Simulate VG-Lite hardware using ThorVG */
|
||||||
|
#define LV_USE_VG_LITE_THORVG 1
|
||||||
|
|
||||||
|
#define LV_VG_LITE_THORVG_TRACE_API 1
|
||||||
|
#include "lv_test_conf_full.h"
|
||||||
#elif LV_TEST_OPTION == 4
|
#elif LV_TEST_OPTION == 4
|
||||||
#define LV_COLOR_DEPTH 24
|
#define LV_COLOR_DEPTH 24
|
||||||
#define LV_DPI_DEF 120
|
#define LV_DPI_DEF 120
|
||||||
|
|||||||
Reference in New Issue
Block a user