From 67cd43d0d369d4ea76b6c7feb9f88180fd5b3d84 Mon Sep 17 00:00:00 2001 From: Pablo Hoch Date: Tue, 10 Sep 2024 11:09:58 +0200 Subject: [PATCH] ci: clang 18 --- .github/actions/install-llvm/action.yml | 2 +- .github/workflows/unix.yml | 2 +- CMakeLists.txt | 2 +- CMakePresets.json | 30 ++++++++++++------------- cmake/clang-tidy.cmake | 2 +- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/actions/install-llvm/action.yml b/.github/actions/install-llvm/action.yml index 5126710..55ee5b9 100644 --- a/.github/actions/install-llvm/action.yml +++ b/.github/actions/install-llvm/action.yml @@ -4,7 +4,7 @@ inputs: version: description: 'LLVM version' required: false - default: 16 + default: 18 packages: description: 'Packages to install' required: false diff --git a/.github/workflows/unix.yml b/.github/workflows/unix.yml index 80376e7..e5761e6 100644 --- a/.github/workflows/unix.yml +++ b/.github/workflows/unix.yml @@ -24,7 +24,7 @@ concurrency: cancel-in-progress: true env: - LLVM_VERSION: 16 + LLVM_VERSION: 18 GCC_VERSION: 12 jobs: diff --git a/CMakeLists.txt b/CMakeLists.txt index 53839ed..92b0246 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -334,7 +334,7 @@ gtest_discover_tests(ppr-test) ################################ # clang-format check ################################ -find_program(CLANG_FORMAT_COMMAND NAMES clang-format clang-format-16) +find_program(CLANG_FORMAT_COMMAND NAMES clang-format clang-format-18) add_custom_target(ppr-format-check COMMAND find ${CMAKE_CURRENT_SOURCE_DIR}/src diff --git a/CMakePresets.json b/CMakePresets.json index a5a6554..68005db 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -26,11 +26,11 @@ } }, { - "name": "clang-16-preset", + "name": "clang-18-preset", "hidden": true, "cacheVariables": { - "CMAKE_C_COMPILER": "clang-16", - "CMAKE_CXX_COMPILER": "clang++-16", + "CMAKE_C_COMPILER": "clang-18", + "CMAKE_CXX_COMPILER": "clang++-18", "CMAKE_CXX_FLAGS": "-stdlib=libc++", "CMAKE_EXE_LINKER_FLAGS": "-lc++abi" } @@ -64,10 +64,10 @@ } }, { - "name": "clang-16-release", - "displayName": "Clang 16 Release", + "name": "clang-18-release", + "displayName": "Clang 18 Release", "inherits": [ - "clang-16-preset", + "clang-18-preset", "base-preset" ], "cacheVariables": { @@ -75,10 +75,10 @@ } }, { - "name": "clang-16-debug", - "displayName": "Clang 16 Debug", + "name": "clang-18-debug", + "displayName": "Clang 18 Debug", "inherits": [ - "clang-16-preset", + "clang-18-preset", "base-preset" ], "cacheVariables": { @@ -86,10 +86,10 @@ } }, { - "name": "clang-16-tidy", - "displayName": "Clang 16 Tidy", + "name": "clang-18-tidy", + "displayName": "Clang 18 Tidy", "inherits": [ - "clang-16-preset", + "clang-18-preset", "base-preset" ], "cacheVariables": { @@ -98,10 +98,10 @@ } }, { - "name": "clang-16-sanitizer", - "displayName": "Clang 16 Sanitizer", + "name": "clang-18-sanitizer", + "displayName": "Clang 18 Sanitizer", "inherits": [ - "clang-16-preset", + "clang-18-preset", "base-preset" ], "cacheVariables": { diff --git a/cmake/clang-tidy.cmake b/cmake/clang-tidy.cmake index a9823f8..6baeca5 100644 --- a/cmake/clang-tidy.cmake +++ b/cmake/clang-tidy.cmake @@ -8,7 +8,7 @@ if(NOT "${RELATIVE_SOURCE_DIR}" MATCHES ".+/$") set(RELATIVE_SOURCE_DIR "${RELATIVE_SOURCE_DIR}/") endif() -find_program(CLANG_TIDY_COMMAND NAMES clang-tidy-16 clang-tidy) +find_program(CLANG_TIDY_COMMAND NAMES clang-tidy-18 clang-tidy) if (NOT CLANG_TIDY_COMMAND) message(FATAL_ERROR "CMake_RUN_CLANG_TIDY is ON but clang-tidy is not found!") endif ()