Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coverage report in CI #13

Merged
merged 3 commits into from
Dec 21, 2024
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
32 changes: 28 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@ jobs:
include:
- llvm-version: 12
os: ubuntu-20.04
preset: develop
preset: coverage
- llvm-version: 14
os: ubuntu-22.04
preset: develop
preset: coverage
- llvm-version: 15
os: ubuntu-22.04
preset: develop
preset: coverage
- llvm-version: 18
os: ubuntu-24.04
preset: develop
preset: coverage

runs-on: ${{ matrix.os }}

Expand All @@ -68,6 +68,9 @@ jobs:
- name: Install Clang
run: sudo apt-get install clang-${{ matrix.llvm-version }} clang-tidy-${{ matrix.llvm-version }}

- name: Install lcov
run: sudo apt-get install lcov

- name: Setup env
run: |
sudo ln -f -s /usr/bin/clang-${{ matrix.llvm-version }} /usr/bin/clang
Expand All @@ -83,3 +86,24 @@ jobs:

- name: Test with lit-suite
run: cmake --build build --target check-dimeta

- name: Build coverage report
run: cmake --build build --target dimeta-coverage

- name: Coveralls (parallel)
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: build/coverage.info
flag-name: ${{ matrix.llvm-version }}-${{ matrix.os }}
parallel: true

finish-coverage:
needs: lit-suite
runs-on: ubuntu-22.04
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# llvm-dimeta · [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
# llvm-dimeta · [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) [![Coverage Status](https://coveralls.io/repos/github/ahueck/llvm-dimeta/badge.svg?branch=main)](https://coveralls.io/github/ahueck/llvm-dimeta)

llvm-dimeta is library to determine the type of stack (`AllocaInst`), globals (`GlobalVariables`) and heap allocations in LLVM IR based only on the LLVM debug information and metadata.

Expand Down
4 changes: 2 additions & 2 deletions cmake/modules/coverage-lcov.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ endif()

set(
DIMETA_COVERAGE_TRACE_COMMAND
${DIMETA_LCOV_EXEC} ${GCOV_TOOL} -c -q
${DIMETA_LCOV_EXEC} ${GCOV_TOOL} --rc branch_coverage=1 --rc derive_function_end_line=0 -c -q
-o "${PROJECT_BINARY_DIR}/coverage.info"
-d "${PROJECT_BINARY_DIR}"
--include "${PROJECT_SOURCE_DIR}/*"
Expand All @@ -35,7 +35,7 @@ set(

set(
DIMETA_COVERAGE_HTML_COMMAND
${DIMETA_GENHTML_EXEC} --legend -f -q
${DIMETA_GENHTML_EXEC} --rc branch_coverage=1 --rc derive_function_end_line=0 --legend -f -q
"${PROJECT_BINARY_DIR}/coverage.info"
-p "${PROJECT_SOURCE_DIR}"
-o "${PROJECT_BINARY_DIR}/coverage_html"
Expand Down