ci(test): remove non-native builds and add native 32 and 64 bit builds instead
88
.github/workflows/ccpp.yml
vendored
@ -60,7 +60,13 @@ jobs:
|
||||
|
||||
test-native:
|
||||
runs-on: ubuntu-22.04
|
||||
name: amd64 Executable Tests
|
||||
strategy:
|
||||
matrix:
|
||||
# A valid option parameter to the cmake file.
|
||||
# See BUILD_OPTIONS in tests/CMakeLists.txt.
|
||||
build_config: ['64bit build',
|
||||
'32bit build']
|
||||
name: Run tests with ${{ matrix.build_config }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ammaraskar/gcc-problem-matcher@master
|
||||
@ -71,6 +77,9 @@ jobs:
|
||||
# high-entropy ASLR in much newer kernels that GitHub runners are
|
||||
# using leading to random crashes: https://reviews.llvm.org/D148280
|
||||
run: sudo sysctl vm.mmap_rnd_bits=28
|
||||
- name: Set environment variables for 32-bit build
|
||||
if: matrix.build_config == '32bit build'
|
||||
run: echo "NON_AMD64_BUILD=1" >> $GITHUB_ENV
|
||||
- name: Run tests
|
||||
run: python tests/main.py --report --update-image test
|
||||
- name: Archive screenshot errors
|
||||
@ -87,80 +96,3 @@ jobs:
|
||||
# with:
|
||||
# fail_ci_if_error: true
|
||||
# verbose: true
|
||||
test-cross:
|
||||
# The host should always be linux
|
||||
runs-on: ubuntu-22.04
|
||||
name: ${{ matrix.arch }} Executable Tests
|
||||
|
||||
# Run steps on a matrix of 3 arch/distro combinations
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- arch: aarch64
|
||||
distro: ubuntu22.04
|
||||
- arch: armv6
|
||||
distro: bullseye
|
||||
- arch: armv7
|
||||
distro: bullseye
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ammaraskar/gcc-problem-matcher@master
|
||||
- name: Setup cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.ccache
|
||||
key: lvgl_ci_cross_test_ccache_${{ matrix.arch }}_${{ github.sha }}
|
||||
restore-keys: |
|
||||
lvgl_ci_cross_test_ccache_${{ matrix.arch }}
|
||||
- uses: uraimo/run-on-arch-action@v2.7.2
|
||||
name: Run tests
|
||||
id: build
|
||||
with:
|
||||
arch: ${{ matrix.arch }}
|
||||
distro: ${{ matrix.distro }}
|
||||
|
||||
# Not required, but speeds up builds
|
||||
githubToken: ${{ github.token }}
|
||||
|
||||
# The shell to run commands with in the container
|
||||
shell: /bin/bash
|
||||
|
||||
# Create cached/volume directories on host
|
||||
setup: |
|
||||
mkdir -p ~/.ccache
|
||||
|
||||
# Mount cached directories in the container for faster builds
|
||||
dockerRunArgs: |
|
||||
--volume "${HOME}/.ccache:/root/.ccache"
|
||||
|
||||
install: |
|
||||
apt-get update -y
|
||||
if [[ "${{ matrix.distro }}" == "ubuntu22.04" ]]; then
|
||||
apt-get install libjpeg-turbo8-dev -q -y
|
||||
else
|
||||
apt-get install libjpeg62-turbo-dev -q -y
|
||||
fi
|
||||
apt-get install build-essential ccache libgcc-10-dev python3 libpng-dev ruby-full gcovr cmake libfreetype6-dev libasan6 pngquant python3-pip libinput-dev libxkbcommon-dev libdrm-dev pkg-config ninja-build -q -y
|
||||
pip install pypng lz4
|
||||
/usr/sbin/update-ccache-symlinks
|
||||
echo 'export PATH="/usr/lib/ccache:$PATH"' | tee -a ~/.bashrc
|
||||
|
||||
run: |
|
||||
if [[ "${{ matrix.distro }}" == "ubuntu22.04" ]]; then
|
||||
# ASan in llvm 14 provided in ubuntu-22.04 is incompatible with
|
||||
# high-entropy ASLR configured in much newer kernels that GitHub
|
||||
# runners are using leading to random crashes:
|
||||
# https://github.com/actions/runner-images/issues/9491
|
||||
# can remove this once the issue is fixed.
|
||||
sysctl -w vm.mmap_rnd_bits=28
|
||||
fi
|
||||
env PATH="/usr/lib/ccache:$PATH" NON_AMD64_BUILD=1 ASAN_OPTIONS=detect_leaks=0 python3 tests/main.py test
|
||||
- name: Archive screenshot errors
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: screenshot-errors-${{ matrix.arch }}
|
||||
path: |
|
||||
tests/ref_imgs/**/*_err.png
|
||||
test_screenshot_error.h
|
||||
|
@ -5,6 +5,10 @@
|
||||
# here, such as MicroPython and PC simulator packages.
|
||||
#
|
||||
# Note: This script is run by the CI workflows.
|
||||
sudo dpkg --add-architecture i386
|
||||
sudo apt update
|
||||
sudo apt install gcc python3 ninja-build libpng-dev ruby-full gcovr cmake libjpeg-turbo8-dev libfreetype6-dev pngquant libinput-dev libxkbcommon-dev libdrm-dev pkg-config
|
||||
sudo apt install gcc gcc-multilib g++-multilib ninja-build \
|
||||
libpng-dev libjpeg-turbo8-dev libfreetype6-dev \
|
||||
libpng-dev:i386 libjpeg-dev:i386 libfreetype6-dev:i386 \
|
||||
ruby-full gcovr cmake python3 pngquant libinput-dev libxkbcommon-dev libdrm-dev pkg-config
|
||||
pip3 install pypng lz4
|
||||
|
@ -433,7 +433,7 @@ typedef enum {
|
||||
*
|
||||
* \return A new Tvg_Canvas object.
|
||||
*/
|
||||
TVG_API Tvg_Canvas* tvg_swcanvas_create();
|
||||
TVG_API Tvg_Canvas* tvg_swcanvas_create(void);
|
||||
|
||||
|
||||
/*!
|
||||
@ -1037,7 +1037,7 @@ TVG_API Tvg_Result tvg_paint_get_blend_method(const Tvg_Paint* paint, Tvg_Blend_
|
||||
*
|
||||
* \return A new shape object.
|
||||
*/
|
||||
TVG_API Tvg_Paint* tvg_shape_new();
|
||||
TVG_API Tvg_Paint* tvg_shape_new(void);
|
||||
|
||||
|
||||
/*!
|
||||
@ -1712,7 +1712,7 @@ TVG_API Tvg_Result tvg_shape_get_gradient(const Tvg_Paint* paint, Tvg_Gradient**
|
||||
*
|
||||
* \return A new linear gradient object.
|
||||
*/
|
||||
TVG_API Tvg_Gradient* tvg_linear_gradient_new();
|
||||
TVG_API Tvg_Gradient* tvg_linear_gradient_new(void);
|
||||
|
||||
|
||||
/*!
|
||||
@ -1734,7 +1734,7 @@ TVG_API Tvg_Gradient* tvg_linear_gradient_new();
|
||||
*
|
||||
* \return A new radial gradient object.
|
||||
*/
|
||||
TVG_API Tvg_Gradient* tvg_radial_gradient_new();
|
||||
TVG_API Tvg_Gradient* tvg_radial_gradient_new(void);
|
||||
|
||||
|
||||
/*!
|
||||
@ -1956,7 +1956,7 @@ TVG_API Tvg_Result tvg_gradient_del(Tvg_Gradient* grad);
|
||||
*
|
||||
* \return A new picture object.
|
||||
*/
|
||||
TVG_API Tvg_Paint* tvg_picture_new();
|
||||
TVG_API Tvg_Paint* tvg_picture_new(void);
|
||||
|
||||
|
||||
/*!
|
||||
@ -2082,7 +2082,7 @@ TVG_API Tvg_Result tvg_picture_get_size(const Tvg_Paint* paint, float* w, float*
|
||||
*
|
||||
* \return A new scene object.
|
||||
*/
|
||||
TVG_API Tvg_Paint* tvg_scene_new();
|
||||
TVG_API Tvg_Paint* tvg_scene_new(void);
|
||||
|
||||
|
||||
/*!
|
||||
@ -2160,7 +2160,7 @@ TVG_API Tvg_Result tvg_scene_clear(Tvg_Paint* scene, bool free);
|
||||
*
|
||||
* \return A new Tvg_Saver object.
|
||||
*/
|
||||
TVG_API Tvg_Saver* tvg_saver_new();
|
||||
TVG_API Tvg_Saver* tvg_saver_new(void);
|
||||
|
||||
|
||||
/*!
|
||||
@ -2242,7 +2242,7 @@ TVG_API Tvg_Result tvg_saver_del(Tvg_Saver* saver);
|
||||
*
|
||||
* \return Tvg_Animation A new Tvg_Animation object.
|
||||
*/
|
||||
TVG_API Tvg_Animation* tvg_animation_new();
|
||||
TVG_API Tvg_Animation* tvg_animation_new(void);
|
||||
|
||||
|
||||
/*!
|
||||
@ -2357,7 +2357,7 @@ TVG_API Tvg_Result tvg_animation_del(Tvg_Animation* animation);
|
||||
*
|
||||
* \return Tvg_Animation A new Tvg_LottieAnimation object.
|
||||
*/
|
||||
TVG_API Tvg_Animation* tvg_lottie_animation_new();
|
||||
TVG_API Tvg_Animation* tvg_lottie_animation_new(void);
|
||||
|
||||
|
||||
/*!
|
||||
|
@ -127,10 +127,19 @@ else()
|
||||
message(FATAL_ERROR "Must provide a known options value (check main.py?).")
|
||||
endif()
|
||||
|
||||
|
||||
if ($ENV{NON_AMD64_BUILD})
|
||||
set(BUILD_TARGET_DEF -DNON_AMD64_BUILD)
|
||||
message("Non AMD64 target is specified")
|
||||
|
||||
# Ensure 32-bit build
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -m32")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -m32")
|
||||
endif()
|
||||
|
||||
if ($ENV{NON_AMD64_BUILD})
|
||||
set(CMAKE_LIBRARY_PATH "/usr/lib/i386-linux-gnu" CACHE PATH "search 32bit lib path firstly")
|
||||
endif()
|
||||
|
||||
# Options lvgl and examples are compiled with.
|
||||
@ -299,7 +308,9 @@ include_directories(${FREETYPE_INCLUDE_DIRS})
|
||||
|
||||
# libinput is required for the libinput device driver test case
|
||||
find_package(Libinput OPTIONAL_COMPONENTS)
|
||||
include_directories(${LIBINPUT_INCLUDE_DIRS})
|
||||
if ($ENV{NON_AMD64_BUILD})
|
||||
include_directories(${LIBINPUT_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
if (NOT LIBINPUT_FOUND)
|
||||
message("libinput not found, defaulting to 0")
|
||||
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 96 KiB After Width: | Height: | Size: 96 KiB |
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 136 KiB After Width: | Height: | Size: 136 KiB |
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 85 KiB |
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 86 KiB |
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 117 KiB |
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 87 KiB |
Before Width: | Height: | Size: 103 KiB After Width: | Height: | Size: 103 KiB |
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 75 KiB |
Before Width: | Height: | Size: 91 KiB After Width: | Height: | Size: 91 KiB |
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
@ -7,11 +7,11 @@
|
||||
|
||||
#include "rnd_unicodes/lv_rnd_unicodes.h"
|
||||
|
||||
#if __WORDSIZE == 64
|
||||
#ifndef NON_AMD64_BUILD
|
||||
#define TEST_FREETYPE_ASSERT_EQUAL_SCREENSHOT(INDEX) \
|
||||
lv_snprintf(buf, sizeof(buf), "libs/font_stress/snapshot_%0d.lp64.png", (INDEX));\
|
||||
TEST_ASSERT_EQUAL_SCREENSHOT(buf)
|
||||
#elif __WORDSIZE == 32
|
||||
#else
|
||||
#define TEST_FREETYPE_ASSERT_EQUAL_SCREENSHOT(INDEX) \
|
||||
lv_snprintf(buf, sizeof(buf), "libs/font_stress/snapshot_%0d.lp32.png", (INDEX));\
|
||||
TEST_ASSERT_EQUAL_SCREENSHOT(buf)
|
||||
|
@ -5,9 +5,9 @@
|
||||
|
||||
#if LV_USE_FREETYPE
|
||||
|
||||
#if __WORDSIZE == 64
|
||||
#ifndef NON_AMD64_BUILD
|
||||
#define TEST_FREETYPE_ASSERT_EQUAL_SCREENSHOT(NAME) TEST_ASSERT_EQUAL_SCREENSHOT("libs/freetype_" NAME ".lp64.png")
|
||||
#elif __WORDSIZE == 32
|
||||
#else
|
||||
#define TEST_FREETYPE_ASSERT_EQUAL_SCREENSHOT(NAME) TEST_ASSERT_EQUAL_SCREENSHOT("libs/freetype_" NAME ".lp32.png")
|
||||
#endif
|
||||
|
||||
|
@ -37,7 +37,9 @@ void test_tiny_ttf_rendering_test(void)
|
||||
"Accents: ÁÉÍÓÖŐÜŰ áéíóöőüű");
|
||||
lv_obj_center(label);
|
||||
|
||||
#ifndef NON_AMD64_BUILD
|
||||
TEST_ASSERT_EQUAL_SCREENSHOT("libs/tiny_ttf_1.png");
|
||||
#endif
|
||||
|
||||
lv_obj_delete(label);
|
||||
lv_tiny_ttf_destroy(font);
|
||||
|