From 9c27c25d4b49c0a4e75f4551117f2b1e5c7b8173 Mon Sep 17 00:00:00 2001 From: Chris Von Bargen Date: Fri, 15 Mar 2024 15:12:06 -0400 Subject: [PATCH] SKETCH-2185. Add clang-format step which fails for improperly formatted changes (#7) --- .github/workflows/sketcher-builder.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sketcher-builder.yml b/.github/workflows/sketcher-builder.yml index 49d4ee4..1f5bf51 100644 --- a/.github/workflows/sketcher-builder.yml +++ b/.github/workflows/sketcher-builder.yml @@ -28,6 +28,12 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Install Python packages + run: python3 -m pip install ninja clang-format + + - name: Code formatting check + run: find . -name *.h -o -name *.cpp | xargs clang-format -n --Werror + - name: Read external/versions.json run: | { @@ -36,9 +42,6 @@ jobs: echo -e '\nEOF' } >> "$GITHUB_ENV" - - name: Install Ninja - run: python -m pip install ninja - - name: Configure Dependency CMake run: | cmake -B build/external/ -S external/ -G Ninja \