Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
148 changes: 148 additions & 0 deletions .github/workflows/v3-e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
name: v3.0.0-rc0 e2e

on:
push:
branches: [claude/project-thread-3y9j3l]
pull_request:
branches: [master]

permissions:
contents: read

jobs:
# Cross-platform smoke test: v3.0.0-rc0 vs v2 on the same commit.
matrix:
if: github.event_name == 'push'
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest, windows-11-arm]
version: ['21']
action: [v3]
include:
- { os: ubuntu-latest, version: '12', action: v3 }
- { os: ubuntu-latest, version: '17', action: v3 }
- { os: ubuntu-latest, version: '23', action: v3 }
- { os: ubuntu-latest, version: '21', action: v2 }
- { os: macos-latest, version: '21', action: v2 }
- { os: windows-latest, version: '21', action: v2 }
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- name: Generate compilation database
run: cmake -B build -S src -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- name: cpp-linter-action v3.0.0-rc0
if: matrix.action == 'v3'
id: v3
uses: cpp-linter/cpp-linter-action@claude/project-thread-3y9j3l
env:
GITHUB_TOKEN: ${{ github.token }}
with:
style: file
files-changed-only: false
ignore: build
database: build
version: ${{ matrix.version }}
step-summary: true
extra-args: -std=c++14 -Wall
- name: cpp-linter-action v2
if: matrix.action == 'v2'
id: v2
uses: cpp-linter/cpp-linter-action@v2
env:
GITHUB_TOKEN: ${{ github.token }}
with:
style: file
files-changed-only: false
ignore: build
database: build
version: ${{ matrix.version }}
step-summary: true
extra-args: -std=c++14 -Wall
- name: Outputs
shell: bash
run: |
echo "${{ matrix.action }} ${{ matrix.os }} clang ${{ matrix.version }}: total=${{ steps.v3.outputs.checks-failed }}${{ steps.v2.outputs.checks-failed }} format=${{ steps.v3.outputs.clang-format-checks-failed }}${{ steps.v2.outputs.clang-format-checks-failed }} tidy=${{ steps.v3.outputs.clang-tidy-checks-failed }}${{ steps.v2.outputs.clang-tidy-checks-failed }}" | tee -a "$GITHUB_STEP_SUMMARY"

# Only the deprecated alias is set: a review is expected if the alias works.
pr-alias:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- run: cmake -B build -S src -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- uses: cpp-linter/cpp-linter-action@claude/project-thread-3y9j3l
id: linter
env:
GITHUB_TOKEN: ${{ github.token }}
with:
style: file
lines-changed-only: true
ignore: build
database: build
tidy-review: true
file-annotations: false
extra-args: -std=c++14 -Wall
- run: echo "alias run done at $(date -u +%FT%TZ), checks-failed=${{ steps.linter.outputs.checks-failed }}" | tee -a "$GITHUB_STEP_SUMMARY"

pr-review:
needs: pr-alias
if: always() && github.event_name == 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- run: cmake -B build -S src -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- uses: cpp-linter/cpp-linter-action@claude/project-thread-3y9j3l
id: linter
env:
GITHUB_TOKEN: ${{ github.token }}
with:
style: file
lines-changed-only: true
ignore: build
database: build
pr-review: true
thread-comments: update
step-summary: true
extra-args: -std=c++14 -Wall
- run: echo "pr-review done at $(date -u +%FT%TZ), checks-failed=${{ steps.linter.outputs.checks-failed }}" | tee -a "$GITHUB_STEP_SUMMARY"

# Runs after the review jobs so a pushed fix cannot move their diff mid-run.
auto-fix:
needs: pr-review
if: always() && github.event_name == 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v7
- run: cmake -B build -S src -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- uses: cpp-linter/cpp-linter-action@claude/project-thread-3y9j3l
id: linter
env:
GITHUB_TOKEN: ${{ github.token }}
with:
style: file
lines-changed-only: true
ignore: build
database: build
auto-fix: true
file-annotations: false
extra-args: -std=c++14 -Wall
- name: State after auto-fix
run: |
git log --oneline -3
git status --short
ls -la .cpp-linter-cache || true
2 changes: 2 additions & 0 deletions src/demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@

return 0;
}

static auto addedForV3Test(int x) -> int { return x * 2; }

Check warning on line 19 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / pr-review

src/demo.cpp:19:32 [readability-identifier-length]

parameter name 'x' is too short, expected at least 3 characters

Check warning on line 19 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / pr-review

src/demo.cpp:19:13 [misc-use-anonymous-namespace]

function 'addedForV3Test' declared 'static', move to anonymous namespace instead

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy diagnostic

src/demo.cpp:19:13 warning: [misc-use-anonymous-namespace]

function 'addedForV3Test' declared 'static', move to anonymous namespace instead

   19 | static auto addedForV3Test(int x) -> int { return x * 2; }
      |             ^

clang-tidy diagnostic

src/demo.cpp:19:32 warning: [readability-identifier-length]

parameter name 'x' is too short, expected at least 3 characters

   19 | static auto addedForV3Test(int x) -> int { return x * 2; }
      |                                ^

Loading