From 0aecf50c0c44817987df39b49b153bf820870fbe Mon Sep 17 00:00:00 2001 From: John Kerl Date: Fri, 10 Jan 2025 10:20:06 -0500 Subject: [PATCH] Misc. operability tweaks for `clang-format` (#5422) Found while debugging CI fails on #5421. --- TYPE: NO_HISTORY --------- Co-authored-by: Theodore Tsirpanis --- .github/workflows/check-formatting.yml | 7 ++----- scripts/ci/check_formatting_linux.sh | 2 +- scripts/install-clangformat.sh | 4 ++++ 3 files changed, 7 insertions(+), 6 deletions(-) mode change 100644 => 100755 scripts/ci/check_formatting_linux.sh diff --git a/.github/workflows/check-formatting.yml b/.github/workflows/check-formatting.yml index 7e640558774..c21caaaf0e0 100644 --- a/.github/workflows/check-formatting.yml +++ b/.github/workflows/check-formatting.yml @@ -36,8 +36,5 @@ jobs: printenv shell: bash - - name: Check formatting (linux only)' - run: | - source $GITHUB_WORKSPACE/scripts/ci/check_formatting_linux.sh - shell: bash - if: ${{ runner.os == 'Linux' }} + - name: Check formatting + run: $GITHUB_WORKSPACE/scripts/ci/check_formatting_linux.sh diff --git a/scripts/ci/check_formatting_linux.sh b/scripts/ci/check_formatting_linux.sh old mode 100644 new mode 100755 index 99b40e1e331..c9eccf74827 --- a/scripts/ci/check_formatting_linux.sh +++ b/scripts/ci/check_formatting_linux.sh @@ -32,7 +32,7 @@ set -e pipefail ls -la sudo ./scripts/install-clangformat.sh -src=$GITHUB_WORKSPACE +src=$(dirname $0)/../.. cd $src $src/scripts/run-clang-format.sh $src clang-format-17 0 diff --git a/scripts/install-clangformat.sh b/scripts/install-clangformat.sh index 64d48d2464f..f0a990e714c 100755 --- a/scripts/install-clangformat.sh +++ b/scripts/install-clangformat.sh @@ -58,6 +58,10 @@ install_clang_format() { run() { install_clang_format + + echo + echo "clang-format --version" $(clang-format --version) + echo } run