Skip to content

build: add cmake configure step to linting - #527

Merged
mlohvynenko merged 3 commits into
developfrom
feature_fix_ci
Mar 12, 2026
Merged

build: add cmake configure step to linting#527
mlohvynenko merged 3 commits into
developfrom
feature_fix_ci

Conversation

@mlohvynenko

Copy link
Copy Markdown
Member

compile_commands.json is generated during cmake configure step, so it should be run before cppcheck.
This patch makes it possible to execute lint step without building the project, which fixes the issue with linting on CI.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds an explicit CMake configure phase ahead of cppcheck so compile_commands.json exists, allowing the CI “lint” job to run without building.

Changes:

  • Extracted Conan + CMake configure into a new cmake_configure() helper.
  • Updated build_project() and run_lint() to invoke cmake_configure() before build / cppcheck.
  • Removed the now-duplicate conan_setup call from build_target().

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

Comment thread build.sh Outdated
Comment thread build.sh Outdated
Comment thread build.sh
@codecov

codecov Bot commented Mar 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.28%. Comparing base (da9a6e0) to head (612f613).
⚠️ Report is 20 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #527      +/-   ##
===========================================
+ Coverage    85.26%   85.28%   +0.02%     
===========================================
  Files          308      310       +2     
  Lines        27527    27763     +236     
  Branches      3716     3742      +26     
===========================================
+ Hits         23470    23679     +209     
- Misses        4057     4084      +27     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mykola-kobets-epam mykola-kobets-epam left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed-by: Mykola Kobets <mykola_kobets@epam.com>

Comment thread build.sh

@al1img al1img left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>

@MykolaSuperman MykolaSuperman left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Reviewed-by: Mykola Solianko <mykola_solianko@epam.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

build.sh:66

  • conan_setup installs to --output-folder build, which is where Conan generates conan_toolchain.cmake. The subsequent CMake configure uses -DCMAKE_TOOLCHAIN_FILE=./conan_toolchain.cmake, but there is no such file at repo root, so configure/lint will fail. Point CMAKE_TOOLCHAIN_FILE at the toolchain under the build directory (e.g., build/conan_toolchain.cmake) or adjust the Conan output folder accordingly.
    cmake -S . -B build \
        -DCMAKE_TOOLCHAIN_FILE=./conan_toolchain.cmake \
        -DCMAKE_BUILD_TYPE="$ARG_BUILD_TYPE" \
        -G "Unix Makefiles" \

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

Comment thread build.sh
compile_commands.json is generated during cmake configure step,
so it should be run before cppcheck.
This patch makes it possible to execute lint step without
building the project, which fixes the issue with linting on CI.

Signed-off-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>
Reviewed-by: Mykola Kobets <mykola_kobets@epam.com>
Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
Reviewed-by: Mykola Solianko <mykola_solianko@epam.com>
Signed-off-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>
Reviewed-by: Mykola Kobets <mykola_kobets@epam.com>
Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
Reviewed-by: Mykola Solianko <mykola_solianko@epam.com>
Signed-off-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>
Reviewed-by: Mykola Kobets <mykola_kobets@epam.com>
Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
Reviewed-by: Mykola Solianko <mykola_solianko@epam.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

build.sh:66

  • conan install is configured with --output-folder build, so the generated CMake toolchain file will be under build/ (e.g., build/conan_toolchain.cmake). Passing -DCMAKE_TOOLCHAIN_FILE=./conan_toolchain.cmake points to a non-existent file in the repo root and will cause cmake_configure (and therefore lint) to fail. Update the toolchain path to the location where Conan actually generates it (or compute an absolute path).
    cmake -S . -B build \
        -DCMAKE_TOOLCHAIN_FILE=./conan_toolchain.cmake \
        -DCMAKE_BUILD_TYPE="$ARG_BUILD_TYPE" \
        -G "Unix Makefiles" \

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

Comment thread .github/workflows/build-test.yaml
@sonarqubecloud

Copy link
Copy Markdown

@mlohvynenko
mlohvynenko merged commit aeffd9f into develop Mar 12, 2026
20 checks passed
@mlohvynenko
mlohvynenko deleted the feature_fix_ci branch March 12, 2026 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants