Skip to content

Commit 364d085

Browse files
fix: resolve trailing whitespace and compilation errors
- Remove trailing whitespace from workflow and test files - Add missing MockWriter and MockReader classes to test-kv-cache-iswa.cpp - Add missing test functions to resolve compilation errors - All tests now compile successfully locally Co-Authored-By: Jaime Mizrachi <[email protected]>
1 parent 489c2ba commit 364d085

13 files changed

+965
-829
lines changed

.github/workflows/test-coverage.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,40 +9,33 @@ on:
99
jobs:
1010
test-coverage:
1111
runs-on: ubuntu-latest
12-
1312
steps:
1413
- uses: actions/checkout@v4
1514
with:
1615
submodules: recursive
17-
1816
- name: Install dependencies
1917
run: |
2018
sudo apt-get update
2119
sudo apt-get install -y build-essential cmake lcov
22-
2320
- name: Configure CMake with coverage
2421
run: |
2522
mkdir -p build
2623
cd build
2724
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="--coverage -g -O0" -DCMAKE_C_FLAGS="--coverage -g -O0" -DGGML_NATIVE=OFF
28-
2925
- name: Build
3026
run: |
3127
cd build
3228
make -j$(nproc)
33-
3429
- name: Run tests
3530
run: |
3631
cd build
3732
ctest --output-on-failure --parallel $(nproc)
38-
3933
- name: Generate coverage report
4034
run: |
4135
cd build
4236
lcov --capture --directory . --output-file coverage.info
4337
lcov --remove coverage.info '/usr/*' '*/build/*' '*/ggml/src/*' '*/vendor/*' --output-file coverage_filtered.info
4438
lcov --list coverage_filtered.info
45-
4639
- name: Check coverage thresholds
4740
run: |
4841
cd build
@@ -53,7 +46,6 @@ import re
5346
def parse_lcov_summary(filename):
5447
with open(filename, 'r') as f:
5548
content = f.read()
56-
5749
# Extract summary from lcov --list output
5850
lines_match = re.search(r'Total:\s*\|\s*(\d+)\s*\|\s*(\d+)\s*\|\s*([\d.]+)%', content)
5951
functions_match = re.search(r'Functions:\s*(\d+)\s*of\s*(\d+)\s*\(([\d.]+)%\)', content)
@@ -78,7 +70,6 @@ try:
7870
import subprocess
7971
result = subprocess.run(['lcov', '--list', 'coverage_filtered.info'],
8072
capture_output=True, text=True, check=True)
81-
8273
# Parse coverage from output
8374
lines = result.stdout.split('\n')
8475
line_coverage = 0.0
@@ -118,7 +109,6 @@ except Exception as e:
118109
# For now, don't fail the build on coverage parsing errors
119110
# sys.exit(1)
120111
"
121-
122112
- name: Upload coverage reports
123113
uses: actions/upload-artifact@v4
124114
with:
@@ -127,13 +117,11 @@ except Exception as e:
127117
build/coverage.info
128118
build/coverage_filtered.info
129119
if: always()
130-
131120
- name: Generate HTML coverage report
132121
run: |
133122
cd build
134123
genhtml coverage_filtered.info --output-directory coverage_html
135124
if: always()
136-
137125
- name: Upload HTML coverage report
138126
uses: actions/upload-artifact@v4
139127
with:

0 commit comments

Comments
 (0)