Skip to content

Commit 5cbb303

Browse files
committed
Update cmake.yml
1 parent 806444a commit 5cbb303

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.github/workflows/cmake.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,21 @@ jobs:
7171
run: |
7272
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
7373
74-
- name: Set Clang 16 as default
75-
if: matrix.os == 'ubuntu-24.04' && matrix.c_compiler == 'clang'
74+
- name: Debug Clang Alternatives
7675
run: |
77-
clang-16 --version
78-
clang++-16 --version
76+
update-alternatives --query clang
77+
update-alternatives --query clang++
78+
79+
- name: Set Clang 16 as Default
80+
run: |
81+
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-16 100
82+
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-16 100
7983
sudo update-alternatives --set clang /usr/bin/clang-16
8084
sudo update-alternatives --set clang++ /usr/bin/clang++-16
85+
86+
# Verify the change
87+
clang --version
88+
clang++ --version
8189

8290
- name: Configure CMake
8391
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.

0 commit comments

Comments
 (0)