From 5aa5e2f35c1caeaea46166c97b66113b70fcd8f6 Mon Sep 17 00:00:00 2001 From: Oliver Lee Date: Fri, 28 Jun 2024 03:10:48 -0700 Subject: [PATCH] add check workflow Change-Id: Ib9f4c82cde301397e2f92d9a76b58443dd1a2ca4 --- .github/workflows/check.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/check.yml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..bb03316 --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,37 @@ +name: check + +on: + push: + branches: [ main ] + pull_request: + branches: [ "*" ] + types: [synchronize, opened, reopened, edited] + workflow_dispatch: + +jobs: + check-format: + runs-on: ubuntu-latest + #strategy: + # matrix: + # example: [default] + # errors: [3] + # #include: + # # - example: default + # # errors: 3 + # # - example: format-binary + # # errors: 2 + # # - example: format-config + # # errors: 0 + # # - example: format-ignore + # # errors: 0 + steps: + - uses: actions/checkout@v4 + #- run: | + # cd example/${{ matrix.example }} + + # bazel build \ + # --config=clang-format \ + # --color=yes \ + # //... 2>&1 | tee log + + # [ $(cat log | grep -c "Wclang-format-violations") -eq ${{ matrix.errors }} ]