aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Komissarov <abbapoh@gmail.com>2023-12-27 01:13:25 +0300
committerIvan Komissarov <ABBAPOH@gmail.com>2024-01-11 12:27:22 +0000
commit4b5b7fbd3316434fe6ed2d6edc5191f0d994ad2f (patch)
treeeaa9435f4c8c850f31826483a00177604766f464
parent142623f8a1021416a7de28993425347e5b9c4c12 (diff)
Add clang-format job
Change-Id: I325a3843e9b35eb92d911d3f8c6ed55976962950 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r--.github/workflows/main.yml16
1 files changed, 16 insertions, 0 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index be8d7ac3b..6f6a5b6ef 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -130,6 +130,22 @@ 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: Update PATH
+ run: echo "$(brew --prefix llvm@15)/bin" >> ${GITHUB_PATH}
+ - 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