From 71d2345e66277550ddfbcf692f7d89e73d005e96 Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Tue, 26 Nov 2024 23:45:05 -0600 Subject: [PATCH] Fixes for clang-format-check --- .github/workflows/clang-format-check.yml | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/workflows/clang-format-check.yml b/.github/workflows/clang-format-check.yml index 8fe8c790..c75bab14 100644 --- a/.github/workflows/clang-format-check.yml +++ b/.github/workflows/clang-format-check.yml @@ -13,18 +13,28 @@ concurrency: jobs: format: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v4 with: - path: source + fetch-depth: 0 submodules: false + - name: Update References + shell: bash + run: | + git fetch origin develop + + - name: Setup Ubuntu Environment + shell: bash + run: | + sudo apt-get install clang-format-17 + - name: Check Formatting - uses: jayllyz/clang-format-action@v1 - with: - check: true - clang-version: 17 - base-ref: refs/remotes/origin/develop + shell: bash + run: | + MERGE_BASE=$(git merge-base origin/develop ${{ github.ref }}) + echo "Comparing against ${MERGE_BASE}" + git clang-format-17 --diff --style=file -v ${MERGE_BASE}