Skip to content

Commit eed7b60

Browse files
authored
Fix codeql to work on newer version of Ubuntu (#6445)
since Github [updated their runners](https://github.blog/changelog/2024-11-05-notice-of-breaking-changes-for-github-actions/#ubuntu-latest-upcoming-breaking-changes) to use a more recent version of ubuntu, it broke the codeQL job because it couldn't find LLVM using the new version name (`noble`). The error we're seeing is `The repository 'http://apt.llvm.org/noble llvm-toolchain-noble-16 Release' does not have a Release file.` It turns out Clang-16 is available by default in ubuntu Noble (24.04), so we don't need the script at all and we can just install from apt. `DEBIAN_FRONTEND=noninteractive` is necessary to prevent a prompt from tzdata asking us to choose our timezone.
1 parent 9870dbe commit eed7b60

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,10 @@ jobs:
4242
# queries: ./path/to/local/query, your-org/your-repo/queries@main
4343
# Learn more about CodeQL language support at https://git.io/codeql-language-support
4444

45-
- name: Install Clang-16
45+
- name: Setup Clang-16
46+
# clang-16 is already installed in the ubuntu 24.04 used, but the default is clang-18,
47+
# so we just need to modify where clang points.
4648
run: |
47-
wget https://apt.llvm.org/llvm.sh
48-
chmod +x ./llvm.sh
49-
sudo ./llvm.sh 16
5049
sudo ln -s -f `which clang-16` `which clang`
5150
sudo ln -s -f `which clang++-16` `which clang++`
5251
@@ -119,11 +118,10 @@ jobs:
119118
# queries: ./path/to/local/query, your-org/your-repo/queries@main
120119
# Learn more about CodeQL language support at https://git.io/codeql-language-support
121120

122-
- name: Install Clang-16
121+
- name: Setup Clang-16
122+
# clang-16 is already installed in the ubuntu 24.04 used, but the default is clang-18,
123+
# so we just need to modify where clang points.
123124
run: |
124-
wget https://apt.llvm.org/llvm.sh
125-
chmod +x ./llvm.sh
126-
sudo ./llvm.sh 16
127125
sudo ln -s -f `which clang-16` `which clang`
128126
sudo ln -s -f `which clang++-16` `which clang++`
129127

0 commit comments

Comments
 (0)