diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3a118780c..aa6f59a3c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ defaults: jobs: clang-format: - name: clang-format-17 + name: clang-format-18 runs-on: ubuntu-20.04 steps: - name: Checkout code @@ -25,8 +25,8 @@ jobs: - name: Install clang-format run: | wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - && - sudo apt-add-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-17 main" && - sudo apt-get install clang-format-17 + sudo apt-add-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-18 main" && + sudo apt-get install clang-format-18 - name: clang-format run: "./ci/run-clang-format.py -r --clang-format-executable clang-format-17 --color always ./lib/ ./projects/ ./examples/" clang-tidy: diff --git a/run_clang_format.sh b/run_clang_format.sh index a6a27538b..77d68ef80 100755 --- a/run_clang_format.sh +++ b/run_clang_format.sh @@ -13,17 +13,17 @@ if [ -x "$(command -v clang-format)" ]; then ct=$(command -v clang-format) fi -if [ -x "$(command -v clang-format-17)" ]; then - ct=$(command -v clang-format-17) +if [ -x "$(command -v clang-format-18)" ]; then + ct=$(command -v clang-format-18) fi if [ -z "$ct" ]; then - echo "clang-format or clang-format-17 not found in path" + echo "clang-format or clang-format-18 not found in path" exit 1 fi version=$($ct --version) -if [[ ! $version =~ "version 17." ]]; then - echo "ERROR: Found clang-format but it doesn't have version 17.x. Please install clang-format-17" +if [[ ! $version =~ "version 18." ]]; then + echo "ERROR: Found clang-format but it doesn't have version 18.x. Please install clang-format-18" exit 1 fi echo "using $ct"