Skip to content

Commit

Permalink
[#258] Add GCov
Browse files Browse the repository at this point in the history
  • Loading branch information
rjbrown2 authored Jan 2, 2025
1 parent 8946ecc commit d074d7d
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions .github/workflows/mc_dc_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,29 +33,29 @@ jobs:
apt-get update
apt-get install -y \
lcov libcurl4-openssl-dev libmariadb-dev libmariadb-dev-compat \
python3 python3-pip python3-venv gcovr bc pipx wget \
python3 python3-pip python3-venv gcov gcovr bc pipx wget \
software-properties-common
# Add the official LLVM repository and install Clang 19
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
./llvm.sh 19
apt-get install -y clang-19 libclang-19-dev python3-clang-19
apt-get remove -y libclang-14-dev libclang-common-14-dev libclang1-14 libllvm14 python3-clang-14
# Ensure Clang 19 is the default
update-alternatives --install /usr/bin/clang clang /usr/lib/llvm-19/bin/clang 100
update-alternatives --install /usr/bin/clang++ clang++ /usr/lib/llvm-19/bin/clang++ 100
pipx install --system-site-packages mcdc-checker
pipx ensurepath
- name: Verify Clang Installation
run: |
echo "Checking clang binary..."
which clang || { echo "clang not found in PATH"; exit 1; }
echo "clang version:"
clang --version
- name: Verify Clang Python Bindings
run: |
echo "Testing Clang Python bindings..."
python3 -c "import clang.cindex; print('Clang bindings are working')"
# # Add the official LLVM repository and install Clang 19
# wget https://apt.llvm.org/llvm.sh
# chmod +x llvm.sh
# ./llvm.sh 19
# apt-get install -y clang-19 libclang-19-dev python3-clang-19
# apt-get remove -y libclang-14-dev libclang-common-14-dev libclang1-14 libllvm14 python3-clang-14
# # Ensure Clang 19 is the default
# update-alternatives --install /usr/bin/clang clang /usr/lib/llvm-19/bin/clang 100
# update-alternatives --install /usr/bin/clang++ clang++ /usr/lib/llvm-19/bin/clang++ 100
# pipx install --system-site-packages mcdc-checker
# pipx ensurepath
# - name: Verify Clang Installation
# run: |
# echo "Checking clang binary..."
# which clang || { echo "clang not found in PATH"; exit 1; }
# echo "clang version:"
# clang --version
# - name: Verify Clang Python Bindings
# run: |
# echo "Testing Clang Python bindings..."
# python3 -c "import clang.cindex; print('Clang bindings are working')"
- name: Build with Coverage Flags
run: |
export CFLAGS="-fprofile-arcs -ftest-coverage -fcondition-coverage -g"
Expand Down

0 comments on commit d074d7d

Please sign in to comment.