From 316754dd6d938800feac24245c587dd6eef14855 Mon Sep 17 00:00:00 2001 From: Abhay D Date: Sat, 9 Dec 2023 15:21:50 -0800 Subject: [PATCH] Upgrade format checker CI to clang-format-18 --- .github/workflows/format-checker.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/format-checker.yml b/.github/workflows/format-checker.yml index 6aeae5f0d..00ae3c010 100644 --- a/.github/workflows/format-checker.yml +++ b/.github/workflows/format-checker.yml @@ -12,14 +12,16 @@ jobs: submodules: true - name: Install dependencies from APT run: | - sudo apt install -y git clang-format-11 - sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-11 100 \ - --slave /usr/share/man/man1/clang-format.1.gz clang-format.1.gz /usr/share/man/man1/clang-format-11.1.gz + wget https://apt.llvm.org/llvm.sh + chmod +x llvm.sh + sudo ./llvm.sh 18 + sudo apt install -y git clang-format-18 + sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-18 100 - name: Check Formatting run: | cd ${{ github.workspace }} git reset --soft $(git merge-base HEAD origin/master) - diff=$(git clang-format-11 --diff) + diff=$(git clang-format-18 --style=file --diff) if [ $(echo "${diff}" | wc -l) != 1 ]; then echo "Formatting errors detected! Suggested changes:" >&2 echo "${diff}" >&2