Skip to content

Commit 59fc1b7

Browse files
authored
Merge pull request #213 from WEBcodeX1/copilot/fix-analyze-c-cpp-job-again
Stabilize CodeQL by pinning default compiler aliases to gcc-14
2 parents 05107a7 + 178643a commit 59fc1b7

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

‎.github/workflows/codeql.yml‎

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,19 @@ jobs:
3939
run: |
4040
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 140
4141
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 140
42+
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-14 140
43+
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-14 140
4244
sudo update-alternatives --set gcc /usr/bin/gcc-14
4345
sudo update-alternatives --set g++ /usr/bin/g++-14
44-
cc --version | head -n1
46+
sudo update-alternatives --set cc /usr/bin/gcc-14
47+
sudo update-alternatives --set c++ /usr/bin/g++-14
48+
which gcc
49+
which g++
50+
which cc
51+
which c++
4552
gcc --version | head -n1
4653
g++ --version | head -n1
54+
cc --version | head -n1
4755
c++ --version | head -n1
4856
4957
- name: Initialize CodeQL
@@ -54,10 +62,10 @@ jobs:
5462

5563
- name: Build
5664
env:
57-
CC: gcc-14
58-
CXX: g++-14
65+
CC: cc
66+
CXX: c++
5967
run: |
60-
cmake -B _build -DCMAKE_C_COMPILER=gcc-14 -DCMAKE_CXX_COMPILER=g++-14
68+
cmake -B _build -DCMAKE_C_COMPILER=cc -DCMAKE_CXX_COMPILER=c++
6169
cmake --build _build --parallel $(nproc)
6270
6371
- name: Perform CodeQL Analysis

0 commit comments

Comments
 (0)