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: