From 44bb74a1284db61ba2f8e78c299f2c4ea140d7df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Ferenc=20Nagy-Egri?= Date: Wed, 29 May 2024 15:33:19 +0200 Subject: [PATCH] Add .clang-format CI check --- .github/workflows/formatting.yml | 20 ++++++++++++++++++++ .github/workflows/windows.yml | 4 ++++ 2 files changed, 24 insertions(+) create mode 100644 .github/workflows/formatting.yml diff --git a/.github/workflows/formatting.yml b/.github/workflows/formatting.yml new file mode 100644 index 0000000000..971f148ba7 --- /dev/null +++ b/.github/workflows/formatting.yml @@ -0,0 +1,20 @@ +# Copyright 2024 The Khronos Group Inc. +# Copyright 2024 RasterGrid Kft. +# SPDX-License-Identifier: Apache-2.0 +name: Formatting + +on: + workflow_call: + +permissions: + contents: read + +jobs: + clang-format: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Run clang-format + uses: jidicula/clang-format-action@v4.13.0 + with: + clang-format-version: '17' \ No newline at end of file diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index ddf0421c8c..3fdf1ec9e8 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -25,7 +25,11 @@ on: workflow_dispatch: jobs: + formatting: + uses: ./.github/workflows/formatting.yml windows: + # Shortcircuit and don't burn CI time when formatting will reject + needs: formatting strategy: matrix: os: [ windows-latest ]