From 6b9218b8677ca25718e379867a841431325f661b Mon Sep 17 00:00:00 2001 From: kimci86 Date: Tue, 6 Feb 2024 22:55:22 +0100 Subject: [PATCH] Check formatting on CI --- .github/workflows/ci.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2b90aff..33c0c23 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,10 +39,27 @@ jobs: build/*.zip build/*.tar.gz + format: + name: Formatting + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Configure project + run: cmake -S . -B build -DBKCRACK_CLANG_FORMAT_EXECUTABLE=/usr/bin/clang-format-15 + + - name: Format C++ code + run: cmake --build build --target format + + - name: Check for difference + run: git diff --exit-code + release: name: Release runs-on: ubuntu-latest - needs: build + needs: [build, format] if: startsWith(github.ref, 'refs/tags/') steps: