From eed7b60720fd1df2a34e218761b17a13d5c6a14f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vandon?= Date: Tue, 17 Dec 2024 17:50:32 +0100 Subject: [PATCH] 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. --- .github/workflows/codeql-analysis.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index d232807eeaa7..4c40dd0d4aa7 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -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++` @@ -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++`