From df7431ef0078da5ca2ba69c4510b8a35cf3c50ed Mon Sep 17 00:00:00 2001 From: Yunze Xu Date: Mon, 11 Mar 2024 12:54:36 +0800 Subject: [PATCH] Add format check --- .github/workflows/format-check.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/format-check.yaml diff --git a/.github/workflows/format-check.yaml b/.github/workflows/format-check.yaml new file mode 100644 index 0000000..00a8c2e --- /dev/null +++ b/.github/workflows/format-check.yaml @@ -0,0 +1,21 @@ +name: PR validation +on: + push: + branches: ['master'] + + pull_request: + branches: ['master'] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + + formatting-check: + name: Formatting Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Run clang-format style check for C/C++/Protobuf programs. + uses: jidicula/clang-format-action@v4.11.0 + with: + clang-format-version: '11'