Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/api_audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: API Coverage Audit

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Run API Audit
run: |
python3 scripts/audit_api_coverage.py ../lvgl .
working-directory: ${{ github.workspace }}

- name: Check for Coverage Regressions
run: |
# Currently we just run it to ensure it passes.
# Future: Compare with baseline.
echo "API Coverage Audit Completed"
13 changes: 11 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,19 @@ set(SOURCES
font/owned_font.cpp
misc/file_system.cpp
core/observer.cpp
draw/image_decoder.cpp
)

set(DRAW_SOURCES
draw/draw.cpp
draw/draw_buf.cpp
draw/draw_task.cpp
draw/image_decoder.cpp
draw/image_descriptor.cpp

)

list(APPEND SOURCES ${DRAW_SOURCES})

set(WIDGET_SOURCES
widgets/button.cpp
widgets/label.cpp
widgets/bar.cpp
Expand Down Expand Up @@ -60,6 +68,7 @@ set(SOURCES
misc/theme.cpp
misc/vector.cpp
)
list(APPEND SOURCES ${WIDGET_SOURCES})

if(IDF_TARGET)
idf_component_register(SRCS ${SOURCES}
Expand Down
2 changes: 1 addition & 1 deletion design/api_coverage_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The audit scans all lvgl_cpp source files (`.h` and `.cpp`) for actual usage of:

| Category | Total | Used | Coverage |
|----------|-------|------|----------|
| **Functions** | 1,836 | 949 | **51.7%** |
| **Functions** | 1,836 | 968 | **52.7%** |
| **Enums and Constants** | 859 | 289 | **33.6%** |

## Function coverage
Expand Down
Loading
Loading