Skip to content

Commit 0bcde00

Browse files
authored
[#258] MCDC Test
1 parent bec891c commit 0bcde00

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

.github/workflows/mc_dc_coverage.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Configure Safe Directory
2626
run: git config --global --add safe.directory $GITHUB_WORKSPACE
2727

28-
- name: Install Dependencies (Including Clang and Python Bindings)
28+
- name: Install Dependencies
2929
env:
3030
DEBIAN_FRONTEND: noninteractive
3131
run: |
@@ -34,21 +34,28 @@ jobs:
3434
apt-get install -y \
3535
lcov libcurl4-openssl-dev libmariadb-dev libmariadb-dev-compat \
3636
python3 python3-pip python3-venv gcovr bc pipx wget \
37-
software-properties-common clang libclang-dev python3-clang
37+
software-properties-common
38+
# Add the official LLVM repository for the latest Clang
39+
wget https://apt.llvm.org/llvm.sh
40+
chmod +x llvm.sh
41+
./llvm.sh 19
42+
apt-get install -y clang-19 libclang-19-dev
43+
update-alternatives --install /usr/bin/clang clang /usr/lib/llvm-19/bin/clang 100
44+
update-alternatives --install /usr/bin/clang++ clang++ /usr/lib/llvm-19/bin/clang++ 100
3845
pipx install --system-site-packages mcdc-checker
3946
40-
- name: Verify Clang Python Bindings
41-
run: |
42-
echo "Testing Clang Python bindings..."
43-
python3 -c "import clang.cindex; print('Clang bindings are working')"
44-
4547
- name: Verify Clang Installation
4648
run: |
4749
echo "Checking clang binary..."
4850
which clang || { echo "clang not found in PATH"; exit 1; }
4951
echo "clang version:"
5052
clang --version
5153
54+
- name: Verify Clang Python Bindings
55+
run: |
56+
echo "Testing Clang Python bindings..."
57+
python3 -c "import clang.cindex; print('Clang bindings are working')"
58+
5259
- name: Build with Coverage Flags
5360
run: |
5461
export CFLAGS="-fprofile-arcs -ftest-coverage -g"

0 commit comments

Comments
 (0)