Skip to content

Commit ff5c480

Browse files
committed
Only coverage collection for X86_64 targets
1 parent 4f94ced commit ff5c480

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

.github/workflows/compilation_on_android_ubuntu.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,13 +370,23 @@ jobs:
370370
sudo apt-get install -y lcov
371371
372372
- name: Build and run unit tests
373+
if: matrix.build_target == 'X86_32'
374+
run: |
375+
rm -rf build
376+
cmake -S . -B build -DWAMR_BUILD_TARGET=${{ matrix.build_target }}
377+
cmake --build build --config Release --parallel 4
378+
ctest --test-dir build --output-on-failure
379+
380+
- name: Build and run unit tests and collect coverage-data
381+
if: matrix.build_target == 'X86_64'
373382
run: |
374383
rm -rf build
375384
cmake -S . -B build -DWAMR_BUILD_TARGET=${{ matrix.build_target }} -DCOLLECT_CODE_COVERAGE=1
376385
cmake --build build --config Release --parallel 4
377386
ctest --test-dir build --output-on-failure
378387
379388
lcov --quiet --capture --directory build --output-file coverage.all.info
389+
# only keep coverage data for platform independent code
380390
lcov --quiet --extract coverage.all.info "*/core/iwasm/*" "*/core/shared/*" --output-file coverage.info
381391
lcov --summary coverage.info >> $GITHUB_STEP_SUMMARY
382392
working-directory: tests/unit

0 commit comments

Comments
 (0)