Skip to content

Commit

Permalink
Config for github actions
Browse files Browse the repository at this point in the history
Nothing
  • Loading branch information
kyrillh committed Apr 13, 2024
1 parent ea2df99 commit 99b2f87
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
IndentWidth: 4
ColumnLimit: 120
Language: Cpp
29 changes: 29 additions & 0 deletions .github/workflows/linter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# https://github.com/cpp-linter/cpp-linter-action?tab=readme-ov-file
name: cpp-linter
on:
pull_request:
# branches: [main, master, develop]
paths: ['**.c', '**.cpp', '**.h', '**.hpp', '**.cxx', '**.hxx', '**.cc', '**.hh', '**CMakeLists.txt', 'meson.build', '**.cmake']
push:
# branches: [main, master, develop]
paths: ['**.c', '**.cpp', '**.h', '**.hpp', '**.cxx', '**.hxx', '**.cc', '**.hh', '**CMakeLists.txt', 'meson.build', '**.cmake']

jobs:
cpp-linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

# ... optionally setup build env to create a compilation database

- uses: cpp-linter/cpp-linter-action@v2
id: linter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
style: 'file' # Use .clang-format config file.
tidy-checks: '' # disable clang-tidy checks.

- name: Fail fast?!
if: steps.linter.outputs.clang-format-checks-failed > 0
run: exit 1
7 changes: 0 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,3 @@
*.dylib
/build*
/.vscode
.uuid
.cache/
.idea/
*.yaml
misc/
.clang-format
compile_commands.json

0 comments on commit 99b2f87

Please sign in to comment.