Skip to content

Commit

Permalink
Add clang-format CI action
Browse files Browse the repository at this point in the history
  • Loading branch information
eliaskosunen committed Feb 13, 2024
1 parent de51508 commit 0d7b1b6
Showing 1 changed file with 20 additions and 22 deletions.
42 changes: 20 additions & 22 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,30 @@
name: Checks

on:
#push:
# branches:
# - master
# paths-ignore:
# - '**.md'
# - '**/docs/**'
#pull_request:
# branches:
# - master
# paths-ignore:
# - '**.md'
# - '**/docs/**'
push:
paths:
- '.github/**'
- '**.cpp'
- '**.h'
- '**.hpp'
pull_request:
paths:
- '.github/**'
- '**.cpp'
- '**.h'
- '**.hpp'
workflow_dispatch:

jobs:
clang-tidy:
runs-on: ubuntu-22.04

strategy:
fail-fast: false
matrix:
std: [ 17, 20 ]
clang-format:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Run Clang-Tidy
run: |
#clang-tidy-14 tests/clang-tidy/main.cpp -warnings-as-errors=* -header-filter=.* -extra-arg=-std=c++${{ matrix.std }} --
- name: Run clang-format
uses: jidicula/[email protected]
with:
check-path: '.'
clang-format-version: '17'
exclude-regex: '.*\/external\/.*'

0 comments on commit 0d7b1b6

Please sign in to comment.