Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI improvements #14

Merged
merged 18 commits into from
Mar 4, 2024
Merged

CI improvements #14

merged 18 commits into from
Mar 4, 2024

Conversation

romangg
Copy link
Member

@romangg romangg commented Mar 4, 2024

Main points:

  • Prepare running clang-tidy, including some code fixes.
  • Run tests with gcc build.

Now uses references instead of QPointer.
Add infrastructure and a CI job to run the static analysis tool clang-tidy. For
now we only enable two checks. The goal is to progressively enable more checks
until we at least cover all the default checks.

For now the ci job is stopping short of actually running clang-tidy though
because the GitHub Actions runner consistently terminate likely due to oom.

Locally clang-tidy can be run with the new Python script in tooling/analysis.
Instead of using QPointers, which is marked by clang-tidy.
The QPointer is marked by clang-tidy.
Instead of calling delete on a raw pointer.
Use the member directly instead.
This also fixes a clang-tidy warning about delete-after-free.
The QPointers are marked by clang-tidy as use-after-free.
This was marked by clang-tidy. For now we just assume that we have the
precondition that these values can't be zero and assert on it.
This was marked by clang-tidy.
The QPointer is not needed here. Fixes a clang-tidy warning.
Instead of having a single clang/coverage build for all statid and dynamic
analysis, adapt the CMake presets to have different presets for test builds
with coverage using clang and gcc.

We also directly switch the ci coverage build to the gcc preset. This allows to
use gcc-only features in the coverage reporting.
gcov executable is failing on finding Catch2 source, which is built via
FetchContent. For now ignore the error. The coverage reporting seems to
work anyway.
The default retention duration for artifacts is 90 days with GitHub Actions.
These reports are rather small in size. We may just store them for this period
as they might be useful sometimes when comparing them to Codecov results.
Fetch the latest release.
The most recent release works again. The regresssion from gcovr 6, and why
gcovr 5 was used, has been fixed.
Copy link

codecov bot commented Mar 4, 2024

Codecov Report

Attention: Patch coverage is 41.05263% with 56 lines in your changes are missing coverage. Please review.

Project coverage is 50.01%. Comparing base (99f3a61) to head (68107aa).

Files Patch % Lines
como/render/effect/interface/animation_effect.cpp 54.54% 18 Missing and 12 partials ⚠️
como/render/effect/interface/quick_scene.cpp 0.00% 12 Missing ⚠️
plugins/effects/private/expolayout.cpp 0.00% 6 Missing ⚠️
tests/integration/opengl_shadow.cpp 0.00% 4 Missing ⚠️
como/script/window_thumbnail_item.cpp 0.00% 3 Missing ⚠️
como/win/move.h 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master      #14       +/-   ##
===========================================
+ Coverage   28.65%   50.01%   +21.36%     
===========================================
  Files         924      938       +14     
  Lines       90405    87251     -3154     
  Branches    40954    45473     +4519     
===========================================
+ Hits        25906    43642    +17736     
+ Misses      40752    38638     -2114     
+ Partials    23747     4971    -18776     

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

@romangg romangg merged commit d7cd173 into winft:master Mar 4, 2024
14 checks passed
@romangg romangg deleted the clang-tidy branch March 4, 2024 15:40
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.

1 participant