[action] add cpp-linter to pr-checker
authorYelin Jeong <yelini.jeong@samsung.com>
Tue, 1 Aug 2023 10:27:38 +0000 (19:27 +0900)
committer추지호/SoC Architecture팀(SR)/삼성전자 <jiho.chu@samsung.com>
Thu, 7 Sep 2023 01:43:08 +0000 (10:43 +0900)
This patch adds cpp-linter to pr-checker

Signed-off-by: Yelin Jeong <yelini.jeong@samsung.com>
.github/workflows/pr-build.yml

index 09dc040c0efefa4cbf76dae1795a2c325bcad738..3956b4e2026731728c2422030fbbf8e81d410839 100644 (file)
@@ -5,9 +5,27 @@ on:
     branches: [ tizen ]
 
 jobs:
+  prebuild:
+    runs-on: [ code-linux, code-large ]
+
+    steps:
+      - name: Clone your repository
+        uses: CODE-Actions/checkout@v2
+        with:
+          ref: ${{ github.event.pull_request.head.sha }}
+      - name: Run clang-format style check for C/C++
+        uses: CODE-Actions/cpp-linter-cpp-linter-action@v2
+        env:
+          GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
+        with:
+          style: file
+          lines-changed-only: true
+          thread-comments: true
+
   build:
     # CODE-hosted runner
     runs-on: [ code-linux, code-large ]
+    needs: prebuild
     strategy:
       matrix:
         arch: ['aarch64', 'armv7l', 'x86_64']