From 62823849773099726dcead6e7c2fda569f65512f Mon Sep 17 00:00:00 2001 From: PatTheMav Date: Fri, 14 Mar 2025 19:10:31 +0100 Subject: [PATCH] CI: Update clang-format version to 19.1.1 --- .github/actions/run-clang-format/action.yaml | 8 ++++---- build-aux/.run-format.zsh | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/actions/run-clang-format/action.yaml b/.github/actions/run-clang-format/action.yaml index 94dea0840..669fe8e10 100644 --- a/.github/actions/run-clang-format/action.yaml +++ b/.github/actions/run-clang-format/action.yaml @@ -35,7 +35,7 @@ runs: echo ::group::Install Dependencies eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH - echo "/home/linuxbrew/.linuxbrew/opt/clang-format@17/bin" >> $GITHUB_PATH + echo "/home/linuxbrew/.linuxbrew/opt/clang-format@19/bin" >> $GITHUB_PATH brew install --quiet zsh echo ::endgroup:: @@ -50,11 +50,11 @@ runs: : Run clang-format 🐉 if (( ${+RUNNER_DEBUG} )) setopt XTRACE - print ::group::Install clang-format-17 - brew install --quiet obsproject/tools/clang-format@17 + print ::group::Install clang-format-19 + brew install --quiet obsproject/tools/clang-format@19 print ::endgroup:: - print ::group::Run clang-format-17 + print ::group::Run clang-format-19 local -a changes=(${(s:,:)CHANGED_FILES//[\[\]\'\"]/}) ./build-aux/run-clang-format --fail-${{ inputs.failCondition }} --check ${changes} print ::endgroup:: diff --git a/build-aux/.run-format.zsh b/build-aux/.run-format.zsh index 1596b8c72..d6947fef6 100755 --- a/build-aux/.run-format.zsh +++ b/build-aux/.run-format.zsh @@ -33,24 +33,24 @@ invoke_formatter() { case ${formatter} { clang) - if (( ${+commands[clang-format-17]} )) { - local formatter=clang-format-17 + if (( ${+commands[clang-format-19]} )) { + local formatter=clang-format-19 } elif (( ${+commands[clang-format]} )) { local formatter=clang-format } else { - log_error "No viable clang-format version found (required 17.0.3)" + log_error "No viable clang-format version found (required 19.1.1)" exit 2 } local -a formatter_version=($(${formatter} --version)) - if ! is-at-least 17.0.3 ${formatter_version[-1]}; then - log_error "clang-format is not version 17.0.3 or above (found ${formatter_version[-1]}." + if ! is-at-least 19.1.1 ${formatter_version[-1]}; then + log_error "clang-format is not version 19.1.1 or above (found ${formatter_version[-1]}." exit 2 fi - if ! is-at-least ${formatter_version[-1]} 17.0.3; then - log_error "clang-format is more recent than version 17.0.3 (found ${formatter_version[-1]})." + if ! is-at-least ${formatter_version[-1]} 19.1.1; then + log_error "clang-format is more recent than version 19.1.1 (found ${formatter_version[-1]})." exit 2 fi