Files
lvgl/.github/workflows/perf_emulation.yml
T
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> d1e005b1f7 ci(deps): bump actions/checkout from 4 to 7 (#10323)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-02 10:45:53 +02:00

106 lines
3.8 KiB
YAML

name: Emulated Performance Test
on:
push:
branches: 'master'
pull_request:
branches: 'master'
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
check_scripts:
runs-on: ubuntu-24.04
name: ARM Emulated Benchmark - Script Check
strategy:
fail-fast: false
matrix:
test_script:
- scripts/perf/tests/filter_docker_logs/test.sh
# These scripts aren't executed in this workflow directly. Instead, they're run
# by the `Emulated Performance Test Results Handler` workflow.
# That workflow runs in the context of the `master` branch, so this workflow ensures
# the scripts are tested in the PR context before merging. Helping to prevent CI failures in `master`
- scripts/perf/tests/benchmark_results_comment/test.sh
- scripts/perf/tests/serialize_results/test.sh
steps:
- name: Checkout
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Check Script
run: |
pip3 install msgpack==1.1.0
./${{ matrix.test_script }}
run_benchmark:
runs-on: ubuntu-24.04
name: ARM Emulated Benchmark ${{ matrix.image_type }} - ${{matrix.config }}
needs: check_scripts
strategy:
fail-fast: false
matrix:
# Pinned by digest to the SO3 6.2.0 nested-layout images (built from the
# :lvgl Dockerfiles). The digests and the /so3/so3/usr mount paths in the
# "Run Benchmark Demo" step below must always change together.
include:
- image_type: 32b
image_version : |
latest@sha256:8d977ad76d3893bae23e9bfda3217390afe24ba448852edd7579fb8e5fa38a23
config : lv_conf_perf32b
- image_type: 64b
image_version: |
latest@sha256:1d3674adb634be728d79ffeff37e55183d3d9d228cd536266fa5db444ee0ce77
config : lv_conf_perf64b
steps:
- name: Checkout
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Generate lv_conf.h
run: |
python scripts/generate_lv_conf.py \
--template lv_conf_template.h \
--config configs/ci/perf/lv_conf_perf.h \
--defaults configs/ci/perf/${{matrix.config}}.defaults
- name: Run Benchmark Demo
run: |
# Mounts the current lvgl source code into the container and runs the demo benchmark
# To add additional build dependencies, modify the `lvperf_dependencies.sh` script
docker run -t --privileged \
--name so3-lvperf \
-v /dev:/dev \
-v $(pwd)/configs/ci/perf/lv_conf_perf.h:/so3/so3/usr/lib/lv_conf.h \
-v $(pwd):/so3/so3/usr/lib/lvgl \
-v $(pwd)/scripts/perf/lvperf_dependencies.sh:/so3/install_dependencies.sh \
ghcr.io/smartobjectoriented/so3-lvperf${{matrix.image_type}}:${{matrix.image_version}}
- name: Collect Logs
run: |
sudo cat $(docker inspect --format='{{.LogPath}}' so3-lvperf) | python scripts/perf/filter_docker_benchmark_logs.py results-${{matrix.image_type}}-${{matrix.config}}.json
- name: Upload Results
uses: actions/upload-artifact@v7
with:
name: results-${{matrix.image_type}}-${{matrix.config}}
path: results-${{matrix.image_type}}-${{matrix.config}}.json
if-no-files-found: error
save_pr_number:
runs-on: ubuntu-24.04
if: ${{ github.event_name == 'pull_request' }}
name: ARM Emulated Benchmark - Save PR Number
needs: run_benchmark
steps:
- name: Save PR number
run: |
echo ${{ github.event.number }} > pr_number
- name: Upload PR number as artifact
uses: actions/upload-artifact@v7
with:
name: pr_number
path: pr_number