2020-04-19 14:04:04 +02:00
|
|
|
name: C/C++ CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2021-06-28 11:02:48 +02:00
|
|
|
branches: [ master, release/v8.* ]
|
2020-04-19 14:04:04 +02:00
|
|
|
pull_request:
|
2021-06-28 11:02:48 +02:00
|
|
|
branches: [ master, release/v8.* ]
|
2020-04-19 14:04:04 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2022-03-07 10:04:59 -05:00
|
|
|
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
|
2020-04-19 14:04:04 +02:00
|
|
|
runs-on: ubuntu-latest
|
2021-09-01 02:58:14 -07:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
# A valid option parameter to the cmake file.
|
|
|
|
# See BUILD_OPTIONS in tests/CMakeLists.txt.
|
2023-07-05 13:08:31 +02:00
|
|
|
build_option: ['OPTIONS_16BIT',
|
2023-02-20 21:11:57 +01:00
|
|
|
'OPTIONS_24BIT',
|
2024-01-11 14:32:34 +08:00
|
|
|
'OPTIONS_FULL_32BIT',
|
|
|
|
"OPTIONS_VG_LITE"]
|
2021-09-01 02:58:14 -07:00
|
|
|
name: Build ${{ matrix.build_option }}
|
|
|
|
steps:
|
2023-11-02 11:03:37 +01:00
|
|
|
- uses: actions/checkout@v4
|
2021-09-01 02:58:14 -07:00
|
|
|
- uses: ammaraskar/gcc-problem-matcher@master
|
|
|
|
- name: Install prerequisites
|
|
|
|
run: scripts/install-prerequisites.sh
|
|
|
|
- name: Building ${{ matrix.build_option }}
|
|
|
|
run: python tests/main.py --build-option=${{ matrix.build_option }} build
|
2020-04-19 14:04:04 +02:00
|
|
|
|
2022-01-24 09:55:47 -05:00
|
|
|
test-native:
|
2021-09-01 02:58:14 -07:00
|
|
|
runs-on: ubuntu-latest
|
2022-01-24 09:55:47 -05:00
|
|
|
name: amd64 Executable Tests
|
2020-04-19 14:04:04 +02:00
|
|
|
steps:
|
2023-11-02 11:03:37 +01:00
|
|
|
- uses: actions/checkout@v4
|
2021-02-15 14:47:24 -05:00
|
|
|
- uses: ammaraskar/gcc-problem-matcher@master
|
2021-08-27 15:57:46 -07:00
|
|
|
- name: Install prerequisites
|
|
|
|
run: scripts/install-prerequisites.sh
|
2020-04-19 14:04:04 +02:00
|
|
|
- name: Run tests
|
2024-01-19 17:38:30 +08:00
|
|
|
run: python tests/main.py --report --update-image test
|
2023-11-09 18:37:33 +08:00
|
|
|
- name: Archive screenshot errors
|
|
|
|
if: failure()
|
2024-01-02 08:08:38 +01:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-11-09 18:37:33 +08:00
|
|
|
with:
|
|
|
|
name: screenshot-errors-amd64
|
|
|
|
path: |
|
|
|
|
tests/ref_imgs/**/*_err.png
|
|
|
|
test_screenshot_error.h
|
2024-02-08 14:52:58 +01:00
|
|
|
# - name: Upload coverage to Codecov
|
|
|
|
# uses: codecov/codecov-action@v4
|
|
|
|
# if: github.event_name == 'push' && github.repository == 'lvgl/lvgl'
|
|
|
|
# with:
|
|
|
|
# fail_ci_if_error: true
|
|
|
|
# verbose: true
|
2022-01-24 09:55:47 -05:00
|
|
|
test-cross:
|
|
|
|
# The host should always be linux
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: ${{ matrix.arch }} Executable Tests
|
|
|
|
|
|
|
|
# Run steps on a matrix of 3 arch/distro combinations
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
arch: [ 'aarch64', 'armv6', 'armv7' ]
|
|
|
|
|
|
|
|
steps:
|
2023-11-02 11:03:37 +01:00
|
|
|
- uses: actions/checkout@v4
|
2022-01-31 09:28:02 -05:00
|
|
|
- uses: ammaraskar/gcc-problem-matcher@master
|
2022-01-24 10:42:54 -05:00
|
|
|
- name: Setup cache
|
2024-02-02 17:55:23 +01:00
|
|
|
uses: actions/cache@v4
|
2022-01-24 10:42:54 -05:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.ccache
|
2022-01-24 11:26:58 -05:00
|
|
|
key: lvgl_ci_cross_test_ccache_${{ matrix.arch }}_${{ github.sha }}
|
|
|
|
restore-keys: |
|
|
|
|
lvgl_ci_cross_test_ccache_${{ matrix.arch }}
|
2024-02-02 17:54:25 +01:00
|
|
|
- uses: uraimo/run-on-arch-action@v2.7.1
|
2022-01-24 09:55:47 -05:00
|
|
|
name: Run tests
|
|
|
|
id: build
|
|
|
|
with:
|
|
|
|
arch: ${{ matrix.arch }}
|
|
|
|
distro: bullseye
|
|
|
|
|
|
|
|
# Not required, but speeds up builds
|
|
|
|
githubToken: ${{ github.token }}
|
|
|
|
|
|
|
|
# The shell to run commands with in the container
|
|
|
|
shell: /bin/bash
|
2022-11-23 23:46:30 +01:00
|
|
|
|
2022-01-24 10:42:54 -05:00
|
|
|
# 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"
|
2022-01-24 09:55:47 -05:00
|
|
|
|
|
|
|
install: |
|
2022-01-24 10:01:00 -05:00
|
|
|
apt-get update -y
|
2024-02-20 04:43:57 +08:00
|
|
|
apt-get install build-essential ccache libgcc-10-dev python3 libpng-dev ruby-full gcovr cmake libjpeg62-turbo-dev libfreetype6-dev libasan6 pngquant python3-pip libinput-dev libxkbcommon-dev pkg-config ninja-build -q -y
|
2024-01-19 17:38:30 +08:00
|
|
|
pip install pypng lz4
|
2022-01-24 10:42:54 -05:00
|
|
|
/usr/sbin/update-ccache-symlinks
|
|
|
|
echo 'export PATH="/usr/lib/ccache:$PATH"' | tee -a ~/.bashrc
|
2022-01-24 09:55:47 -05:00
|
|
|
|
|
|
|
run: |
|
2023-11-09 18:37:33 +08:00
|
|
|
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()
|
2024-01-02 08:08:38 +01:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-11-09 18:37:33 +08:00
|
|
|
with:
|
|
|
|
name: screenshot-errors-${{ matrix.arch }}
|
|
|
|
path: |
|
|
|
|
tests/ref_imgs/**/*_err.png
|
|
|
|
test_screenshot_error.h
|