Skip to content

Commit 7f917a1

Browse files
authored
[#258] MCDC Test
1 parent 0b240f2 commit 7f917a1

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

.github/workflows/mc_dc_coverage.yml

Lines changed: 15 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 (Including Clang 19)
2929
env:
3030
DEBIAN_FRONTEND: noninteractive
3131
run: |
@@ -34,21 +34,29 @@ 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 and install Clang 19
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 python3-clang
43+
# Ensure Clang 19 is the default
44+
update-alternatives --install /usr/bin/clang clang /usr/lib/llvm-19/bin/clang 100
45+
update-alternatives --install /usr/bin/clang++ clang++ /usr/lib/llvm-19/bin/clang++ 100
3846
pipx install --system-site-packages mcdc-checker
3947
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-
4548
- name: Verify Clang Installation
4649
run: |
4750
echo "Checking clang binary..."
4851
which clang || { echo "clang not found in PATH"; exit 1; }
4952
echo "clang version:"
5053
clang --version
5154
55+
- name: Verify Clang Python Bindings
56+
run: |
57+
echo "Testing Clang Python bindings..."
58+
python3 -c "import clang.cindex; print('Clang bindings are working')"
59+
5260
- name: Build with Coverage Flags
5361
run: |
5462
export CFLAGS="-fprofile-arcs -ftest-coverage -g"

0 commit comments

Comments
 (0)