Skip to content

Commit

Permalink
Fix codeql to work on newer version of Ubuntu (#6445)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
vandonr authored Dec 17, 2024
1 parent 9870dbe commit eed7b60
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,10 @@ jobs:
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Learn more about CodeQL language support at https://git.io/codeql-language-support

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

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

0 comments on commit eed7b60

Please sign in to comment.