Skip to content
Draft
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
27 changes: 23 additions & 4 deletions .github/workflows/compilation_on_android_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -363,13 +363,32 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y g++-multilib

- name: Install lcov
run: |
sudo apt-get update
sudo apt-get install -y lcov

- name: Build and run unit tests
if: matrix.build_target == 'X86_32'
run: |
mkdir build && cd build
cmake .. -DWAMR_BUILD_TARGET=${{ matrix.build_target }}
cmake --build . --config Release --parallel 4
ctest
rm -rf build
cmake -S . -B build -DWAMR_BUILD_TARGET=${{ matrix.build_target }}
cmake --build build --config Release --parallel 4
ctest --test-dir build --output-on-failure

- name: Build and run unit tests and collect coverage-data
if: matrix.build_target == 'X86_64'
run: |
rm -rf build
cmake -S . -B build -DWAMR_BUILD_TARGET=${{ matrix.build_target }} -DCOLLECT_CODE_COVERAGE=1
cmake --build build --config Release --parallel 4
ctest --test-dir build --output-on-failure

lcov --quiet --capture --directory build --output-file coverage.all.info
# only keep coverage data for platform independent code
lcov --quiet --extract coverage.all.info "*/core/iwasm/*" "*/core/shared/*" --output-file coverage.info
lcov --summary coverage.info >> $GITHUB_STEP_SUMMARY
working-directory: tests/unit

build_regression_tests:
Expand Down
Loading