Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
77b4aff
added test coverage for ci
mxHuber Sep 4, 2025
e2add93
merged coverage job into build, removed all but one step for testing
mxHuber Sep 4, 2025
ee27548
Merge branch 'development' into f-BetterCoverage
fabianbs96 Sep 5, 2025
3deec8a
Merge branch 'development' into f-BetterCoverage
fabianbs96 Sep 5, 2025
6537bf9
test code for meeting
mxHuber Oct 13, 2025
7cc5f63
Call-Graph Improvements (#785)
fabianbs96 Sep 8, 2025
3496cf6
Dbg-Info based Type Matching (#791)
mxHuber Sep 8, 2025
d41d02d
Some fixes in the IterativeIDESolver (#782)
fabianbs96 Sep 8, 2025
85403fd
Bump dependencies (#784)
fabianbs96 Sep 8, 2025
cce4fb6
Remove boost from BitVectorSet (#788)
fabianbs96 Sep 11, 2025
cb87890
GCC Compatibility (#787)
fabianbs96 Oct 12, 2025
201c996
backup for rebase
mxHuber Oct 15, 2025
d777268
cmake works, g++ fails
mxHuber Oct 17, 2025
a8cd372
working version (with local hacks -20)
mxHuber Oct 21, 2025
c30383d
added regex for filter, it is not working
mxHuber Oct 22, 2025
630662b
fixed filtering + cleanup
mxHuber Oct 22, 2025
1f683ea
basic ci impl, lib coverage, fixed release cmake error
mxHuber Oct 23, 2025
fd48ffb
added cmake-scripts to submodule index
mxHuber Oct 23, 2025
cd5cb7f
set llvm-cov before code-cov script
mxHuber Oct 25, 2025
61a5f6b
fixed version of llvm-cov
mxHuber Oct 25, 2025
7932b53
testing v19 due to ci issues
mxHuber Oct 25, 2025
bcd1780
testing cov only when in debug build type
mxHuber Oct 27, 2025
82f0456
fixed all build type checks
mxHuber Oct 27, 2025
a5b0ce2
added -v to see invocation of error in ci
mxHuber Oct 27, 2025
28b1ad7
only run coverage when matrix.build is Debug
mxHuber Oct 27, 2025
4ae7b95
Debug code + potential bug found?
mxHuber Oct 29, 2025
b2cde5c
only run cov when PHASAR_DEBUG_LIBDEPS is off
mxHuber Oct 29, 2025
1453f06
removed debug code, added messages for cov paths
mxHuber Oct 29, 2025
e92fbd1
testing llvm cov 19
mxHuber Oct 30, 2025
b841e93
hardcoded llvm-19 for cov
mxHuber Oct 31, 2025
b3280f3
adding llvm-19 as dependency for cov tools
mxHuber Oct 31, 2025
4142492
disabling asan for release for now
mxHuber Oct 31, 2025
0116874
removed unneccesary char
mxHuber Nov 1, 2025
e5b3549
Merge remote-tracking branch 'origin/development' into f-BetterCoverage
mxHuber Nov 2, 2025
9bedc94
development merge + json external
mxHuber Nov 2, 2025
70235b8
Is the sanitizer the problem?
mxHuber Nov 2, 2025
2779ed6
fixed cmake failing when in debug w/o -DCODE_COVERAGE=ON
mxHuber Nov 2, 2025
12a43e6
added coverage report artifact uploading
mxHuber Nov 2, 2025
c7ada2c
fixed ci
mxHuber Nov 2, 2025
b9bcbee
fixed filtering not working correctly on runner
mxHuber Nov 2, 2025
2c1c86a
docker sanitizer back ON + new matrix entry DebugCov
mxHuber Nov 2, 2025
f8b4c66
Docker sanitizer still fails, disabling for now
mxHuber Nov 2, 2025
5c98906
Removed coverage of unittests
mxHuber Nov 2, 2025
b4cd893
cleanup
mxHuber Nov 3, 2025
a730f29
Some cleanup
fabianbs96 Nov 3, 2025
8ee8f51
Add demangling to cov report
fabianbs96 Nov 3, 2025
59627b8
Merge branch 'development' into f-BetterCoverage
fabianbs96 Nov 4, 2025
15ceb93
artifact should be entire all-merged/ folder
mxHuber Nov 4, 2025
97efbe6
Merge remote-tracking branch 'refs/remotes/upstream/f-BetterCoverage'…
mxHuber Nov 4, 2025
e865969
external diff
mxHuber Nov 4, 2025
ff1863a
removed rename of index.html
mxHuber Nov 6, 2025
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
25 changes: 23 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
matrix:
os: [ubuntu-24.04, ubuntu-24.04-arm]
compiler: [ [clang++-19, clang-19, "clang-19 libclang-rt-19-dev"] ]
build: [ Debug, Release, DebugLibdeps ]
build: [ Debug, Release, DebugLibdeps, DebugCov ]
include:
- build: Debug
cmake_build_type: Debug
Expand All @@ -27,11 +27,17 @@ jobs:
- build: DebugLibdeps
cmake_build_type: Debug
flags: -DPHASAR_DEBUG_LIBDEPS=ON -DBUILD_SHARED_LIBS=ON
- build: DebugCov
cmake_build_type: Debug
flags: -DCODE_COVERAGE=ON
extra_dependencies: llvm-19 # For coverage
exclude:
- os: ubuntu-24.04-arm
build: Debug
- os: ubuntu-24.04-arm
build: DebugLibdeps
- os: ubuntu-24.04-arm
build: DebugCov

continue-on-error: false
steps:
Expand All @@ -44,7 +50,7 @@ jobs:
- name: Install Phasar Dependencies
shell: bash
run: |
./utils/InstallAptDependencies.sh --noninteractive tzdata ${{ matrix.compiler[2] }}
./utils/InstallAptDependencies.sh --noninteractive tzdata ${{ matrix.compiler[2] }} ${{ matrix.extra_dependencies }}

- name: Building Phasar in ${{ matrix.build }} with ${{ matrix.compiler[0] }}
env:
Expand Down Expand Up @@ -77,3 +83,18 @@ jobs:
cd ./examples/how-to
cmake -S . -B build -Dphasar_ROOT="$PHASAR_ROOT_DIR/INSTALL"
cmake --build ./build --target run_sample_programs

- name: Check test coverage and generate HTML report
if: matrix.build == 'DebugCov'
shell: bash
run: |
cmake --build ./build --target ccov-all

- name: Upload coverage HTML report artifact
if: matrix.build == 'DebugCov'
uses: actions/upload-artifact@v4
with:
name: CoverageReport
path: ./build/ccov/all-merged/
if-no-files-found: error
retention-days: 7
34 changes: 33 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -268,11 +268,43 @@ find_package(Threads)
set(CMAKE_CXX_CLANG_TIDY "")

# Nlohmann JSON

include(add_nlohmann_json)
add_nlohmann_json()
add_json_schema_validator()

# Coverage
if (CODE_COVERAGE)
set(CODE_COVERAGE_SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/code-coverage.cmake")
file(DOWNLOAD "https://raw.githubusercontent.com/StableCoder/cmake-scripts/refs/tags/25.08/code-coverage.cmake" "${CODE_COVERAGE_SCRIPT}"
EXPECTED_HASH SHA256=cad4dd2bdf944f77627687e0298debc8341bfdeffaf949937f319c7c4ff3fdaf
TLS_VERIFY ON
STATUS CODE_COVERAGE_SCRIPT_DOWNLOAD_STATUS
)
message(STATUS "Download code-coverage.cmake: ${CODE_COVERAGE_SCRIPT_DOWNLOAD_STATUS}")

if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
string(REGEX MATCH "^[0-9]+" COMPILER_VERSION_MAJOR "${CMAKE_CXX_COMPILER_VERSION}")
message(STATUS "Clang major version: ${COMPILER_VERSION_MAJOR}")
set(LLVM_TOOL_VERSION_SUFFIX "-${COMPILER_VERSION_MAJOR}")
endif()

# pre-populate these cmake variables as we require specific versions:
find_program(LLVM_COV_PATH "llvm-cov${LLVM_TOOL_VERSION_SUFFIX}" REQUIRED)
find_program(LLVM_PROFDATA_PATH "llvm-profdata${LLVM_TOOL_VERSION_SUFFIX}" REQUIRED)
message(STATUS "Found llvm-cov: ${LLVM_COV_PATH}")
message(STATUS "Found llvm-profdata: ${LLVM_PROFDATA_PATH}")

include("${CODE_COVERAGE_SCRIPT}")

find_program(cxxfilt "c++filt" QUIET)
if (cxxfilt)
set(DEMANGLER_OPTIONS LLVM_COV_HTML_OPTIONS "-Xdemangler=${cxxfilt}")
endif()

set(COV_FILEPATH_FILTER "(usr/*|external/|unittests/)")
add_code_coverage_all_targets(EXCLUDE ${COV_FILEPATH_FILTER} ${DEMANGLER_OPTIONS})
endif()

# Googletest
if (NOT PHASAR_IN_TREE)
if(PHASAR_BUILD_UNITTESTS AND NOT TARGET gtest)
Expand Down
1 change: 1 addition & 0 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ fi
tmp_dir=$(mktemp -d "llvm-build.XXXXXXXX" --tmpdir)
./utils/install-llvm.sh "${NUM_THREADS}" "${tmp_dir}" "${LLVM_INSTALL_DIR}" ${LLVM_RELEASE}
rm -rf "${tmp_dir}"

echo "dependencies successfully installed"

# *Always* set the LLVM root to ensure the Phasar script uses the proper toolchain
Expand Down
8 changes: 8 additions & 0 deletions cmake/phasar_macros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ function(add_phasar_unittest test_name)
)
set_tests_properties("${test}" PROPERTIES LABELS "all")
set(CTEST_OUTPUT_ON_FAILURE ON)

if (CODE_COVERAGE)
target_code_coverage(${test} AUTO ALL)
endif()
endfunction()

function(validate_binary_version result item)
Expand Down Expand Up @@ -351,6 +355,10 @@ function(add_phasar_library name)
endif()

set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})

if (CODE_COVERAGE)
target_code_coverage(${name} AUTO ALL)
endif()
endfunction(add_phasar_library)

macro(subdirlist result curdir)
Expand Down
2 changes: 1 addition & 1 deletion external/json
Submodule json updated 837 files
Loading