Skip to contentSkip to conversation

github: Upgrade clang version to 22

PATCH Applied Ammar Faizi 2 participants 2 messages Feb 15 io_uring

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 github: Upgrade clang version to 22

Commit 5cb44fe56b58 ("workflows/build.yml: install default ubuntu-24.04 clang") downgraded the CI to the Ubuntu 24.04 default Clang (v18). As noted by @cmazakas, it was because it broke bindgen.

@cmazakas recently confirmed that Clang 22 does not suffer from this bindgen incompatibility. Therefore, upgrade the environment to Clang 22 to gain access to the latest static analysis tooling.

---
 .github/workflows/ci.yml | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
.github/workflows/ci.yml +9 -2
index 8f008b94eeaa..83669e131d2d 100644
@@ -196,8 +196,15 @@ jobs:
 
       - name: Install Compilers
         run: |
-          sudo apt-get update -y;
-          sudo apt-get install -y ${{matrix.build_args.cc_pkg}} ${{matrix.build_args.cxx_pkg}};
+          if [[ "${{matrix.cc_pkg}}" == "clang" ]]; then \
+            wget https://apt.llvm.org/llvm.sh -O /tmp/llvm.sh; \
+            sudo bash /tmp/llvm.sh 22; \
+            sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-22 400; \
+            sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-22 400; \
+          else \
+            sudo apt-get update -y; \
+            sudo apt-get install -y ${{matrix.build_args.cc_pkg}} ${{matrix.build_args.cxx_pkg}}; \
+          fi;
 
       - name: Display compiler versions
         run: |

base-commit: 364a7b561fa13cffdd7771978dc5509ec4d9d7f9

Signature · 1 line
Ammar Faizi
maintainer Applied
#1 lore raw
Quoted 9 lines · Ammar Faizi

Commit 5cb44fe56b58 ("workflows/build.yml: install default ubuntu-24.04 clang") downgraded the CI to the Ubuntu 24.04 default Clang (v18). As noted by @cmazakas, it was because it broke bindgen.

@cmazakas recently confirmed that Clang 22 does not suffer from this bindgen incompatibility. Therefore, upgrade the environment to Clang 22 to gain access to the latest static analysis tooling.

[...]

Applied, thanks!

[1/1] github: Upgrade clang version to 22

      commit: fa9896fa9371e661ff158328d8c5dd906fe8cdac

Best regards,

Signature · 1 line
Jens Axboe