diff --git a/.github/workflows/perf_tests.yml b/.github/workflows/perf_tests.yml new file mode 100644 index 0000000000..ed05b09eed --- /dev/null +++ b/.github/workflows/perf_tests.yml @@ -0,0 +1,35 @@ +name: Performance Tests CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#concurrency +# Ensure that only one commit will be running tests at a time on each PR +concurrency: + group: ${{ github.ref }}-${{ github.workflow }} + cancel-in-progress: true + +jobs: + test-perf: + runs-on: ubuntu-24.04 + strategy: + fail-fast: false + matrix: + # A valid option parameter to the cmake file. + # See BUILD_OPTIONS in tests/perf.py. + build_option: ['OPTIONS_TEST_PERF_32B', + 'OPTIONS_TEST_PERF_64B'] + + name: Perf Tests ${{ matrix.build_option }} - Ubuntu + steps: + - uses: actions/checkout@v4 + - uses: ammaraskar/gcc-problem-matcher@master + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + - name: Building ${{ matrix.build_option }} + run: python tests/perf.py --build-option=${{ matrix.build_option }} test diff --git a/tests/README.md b/tests/README.md index 3a32faba4f..13c26151a2 100644 --- a/tests/README.md +++ b/tests/README.md @@ -44,6 +44,40 @@ docker run --rm -it -v $(pwd):/work lvgl_test_env "./tests/main.py" This ensures you are testing in a consistent environment with the same dependencies as the CI pipeline. +## Performance Tests + +### Requirements + +- **Docker** +- **Linux host machine** (WSL *may* work but is untested) + +### Running Tests + +The performance tests are run inside a Docker container that launches an ARM emulated environment using QEMU to ensure consistent timing across machines. Each test runs on a lightweight ARM-based OS ([SO3](https://github.com/smartobjectoriented/so3)) within this emulated environment. + +To run the tests: + +```bash +./perf.py [--clean] [--auto-clean] [--test-suite ] [--build-options