From 1e87ddffdde22a618b4d400e384e6ea432b16213 Mon Sep 17 00:00:00 2001 From: Shawn Xu Date: Mon, 2 Jun 2025 23:31:36 -0700 Subject: [PATCH 1/2] Add Linter to CI --- .github/workflows/clockwork.yml | 5 ++++- .github/workflows/linter.yml | 27 +++++++++++++++++++++++++++ .github/workflows/prerelease.yml | 2 +- 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/linter.yml diff --git a/.github/workflows/clockwork.yml b/.github/workflows/clockwork.yml index 78e2bebb..1448c38c 100644 --- a/.github/workflows/clockwork.yml +++ b/.github/workflows/clockwork.yml @@ -4,7 +4,6 @@ on: push: branches: - main - - pre-releases pull_request: branches: - main @@ -12,6 +11,10 @@ on: jobs: Compilation: uses: ./.github/workflows/compilation.yml + Linter: + uses: ./.github/workflows/linter.yml + secrets: + token: ${{ secrets.ACCESS_TOKEN }} Prerelease: needs: [Compilation] uses: ./.github/workflows/prerelease.yml diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml new file mode 100644 index 00000000..c48a5aef --- /dev/null +++ b/.github/workflows/linter.yml @@ -0,0 +1,27 @@ +name: Linter + +on: + workflow_call: + secrets: + token: + required: true + +jobs: + cpp-linter: + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Run cpp-linter + uses: cpp-linter/cpp-linter-action@v2.15.0 + id: linter + continue-on-error: true + env: + GITHUB_TOKEN: ${{ secrets.token }} + with: + style: file + files-changed-only: false + thread-comments: false diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 6c359b00..25138e93 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -18,7 +18,7 @@ jobs: - x86-64-v4 runs-on: ubuntu-latest steps: - - name: Check Out Repo + - name: Checkout Repo uses: actions/checkout@v4 with: persist-credentials: false From 4b1000000cd24babcb5cd8df0ee8945cb1f8fca1 Mon Sep 17 00:00:00 2001 From: Shawn Xu Date: Mon, 2 Jun 2025 23:55:30 -0700 Subject: [PATCH 2/2] use .clang-tidy --- .github/workflows/linter.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index c48a5aef..b933c4d1 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -23,5 +23,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.token }} with: style: file + tidy-checks: files-changed-only: false thread-comments: false