From 6ac8605ce35fc94c6f5f6ed19aeaa4f3d8d95aa3 Mon Sep 17 00:00:00 2001 From: Ivan Komissarov Date: Wed, 27 Dec 2023 01:13:25 +0300 Subject: [PATCH] Add clang-format job Change-Id: I325a3843e9b35eb92d911d3f8c6ed55976962950 --- .github/workflows/main.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ae91640d93..785fbc7aa8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -130,6 +130,21 @@ jobs: - name: Print ccache stats run: docker-compose run ${{ matrix.config.image }} ccache -s + clang-format: + name: Check Style + runs-on: macos-13 + timeout-minutes: 60 + strategy: + fail-fast: false + steps: + - uses: actions/checkout@v1 + - name: Run clang-format + run: | + git diff -U0 --no-color --relative HEAD^ | $(brew --prefix llvm@15)/share/clang/clang-format-diff.py -i -p1 -regex ".*\.(cxx|cpp|hpp|h)" -v + - name: Check diff + run: git diff --exit-code + + build-macos: name: Build on macOS runs-on: macos-11