1# Copyright (c) 2023 Valve Corporation
2# Copyright (c) 2023 LunarG, Inc.
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#     http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16name: format
17
18on:
19    push:
20    pull_request:
21        branches:
22            - main
23
24permissions:
25    contents: read
26
27jobs:
28  clang-format:
29    name: clang-format
30    runs-on: ubuntu-latest
31    strategy:
32      fail-fast: false
33      matrix:
34        path:
35          - 'loader'
36          - 'tests'
37    steps:
38    - uses: actions/checkout@v4
39    - name: Run clang-format
40      uses: jidicula/clang-format-action@v4.11.0
41      with:
42        clang-format-version: '16'
43        check-path: ${{ matrix.path }}
44