Skip to content

ci: add cppcheck#12

Merged
Kemo321 merged 10 commits intomainfrom
cicd
Mar 11, 2026
Merged

ci: add cppcheck#12
Kemo321 merged 10 commits intomainfrom
cicd

Conversation

@Kemo321
Copy link
Owner

@Kemo321 Kemo321 commented Mar 11, 2026

No description provided.

Copilot AI review requested due to automatic review settings March 11, 2026 20:35
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the GitHub Actions CI workflow to expand checks and consolidate build/test execution into a single matrix job.

Changes:

  • Renames the workflow and consolidates formatting + static analysis into one job.
  • Adds cppcheck and updates clang-format file selection/exclusions.
  • Replaces separate build/test jobs with a GCC 14/15 × Debug/Release matrix build using CTest.
Comments suppressed due to low confidence (1)

.github/workflows/ci.yml:69

  • This benchmark step is effectively non-functional right now: the repo doesn’t build a build/benchmarks/bench_tensor binary, and || true will also mask real benchmark crashes/regressions. If benchmarks are intended to be part of CI, add/build the benchmark target and let failures surface; otherwise remove this step (or at least explicitly skip when the binary is absent).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

run: |
clang-format -style=file -i --dry-run --Werror $(find . \( -name "*.cpp" -o -name "*.cc" -o -name "*.cxx" -o -name "*.c" -o -name "*.h" -o -name "*.hpp" -o -name "*.hxx" -o -name "*.inl" \) -not -path "*/build*/*")
find . \( -name "*.cpp" -o -name "*.cc" -o -name "*.cxx" -o -name "*.c" -o -name "*.h" -o -name "*.hpp" -o -name "*.hxx" -o -name "*.inl" \) \
-not -path "*/build*/*" | xargs clang-format -style=file --dry-run --Werror
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

The find ... | xargs clang-format pipeline isn’t robust: filenames with spaces/newlines will be split by xargs, and if find matches nothing, xargs may still invoke clang-format with no files (failing the step). Prefer using find ... -print0 | xargs -0 -r clang-format ... (or find ... -exec clang-format ... +) to make this reliable.

Suggested change
-not -path "*/build*/*" | xargs clang-format -style=file --dry-run --Werror
-not -path "*/build*/*" -print0 | xargs -0 -r clang-format -style=file --dry-run --Werror

Copilot uses AI. Check for mistakes.
Comment on lines +54 to 58
-DBUILD_BENCHMARKS=${{ matrix.build_type == 'Release' && 'ON' || 'OFF' }} \
-DPRODUCTION=${{ matrix.build_type == 'Release' && 'ON' || 'OFF' }}

- name: Build
run: |
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

The workflow passes -DUSE_SANITIZERS=... and -DBUILD_BENCHMARKS=..., but these options aren’t defined/used anywhere in the repo’s CMake files (so they won’t actually enable anything). Either implement these CMake options (and wire them to targets/flags) or remove them from CI to avoid misleading configuration.

Copilot uses AI. Check for mistakes.
@Kemo321 Kemo321 merged commit 3e1fe70 into main Mar 11, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants