Skip to content

Commit

Permalink
[CI] Add cpp file format checker
Browse files Browse the repository at this point in the history
This patch adds a Github Action workflow to check cpp file format
- this file imported from deviceMLOps.MLAgent
- this file use cpp_linter marketplace actions

**Self evaluation:**
1. Build test:	 [X]Passed [ ]Failed [ ]Skipped
2. Run test:	 [X]Passed [ ]Failed [ ]Skipped

Signed-off-by: Donghak PARK <[email protected]>
  • Loading branch information
DonghakPark committed Jan 24, 2024
1 parent 07db2d5 commit ef9919f
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/cpp_linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: C++ Format Checker

on: pull_request

jobs:
cpp-linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cpp-linter/cpp-linter-action@v2
id: linter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
style: file
extensions: 'cc'
version: 16
lines-changed-only: true


- name: failing fast
if: steps.linter.outputs.clang-format-checks-failed > 0
run: |
echo "This PR failed to pass the C++ source file format checks."
exit 1

0 comments on commit ef9919f

Please sign in to comment.