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

Fix clang-tidy ci #60659

Merged
merged 2 commits into from
Feb 19, 2025
Merged

Fix clang-tidy ci #60659

merged 2 commits into from
Feb 19, 2025

Conversation

ptitjano
Copy link
Collaborator

Description

At the moment the clang-tidy CI fails on each file with the following
message:

error: PCH file uses an older PCH format that is no longer supported
[clang-diagnostic-error]

This is because clang-tidy version 18 is used while QGIS
compilation is achieved with clang 15. Indeed, QGIS is built with
clazy support which relies on clang 15.

This issue is fixed by using clang version 15 instead of version 18 in
docker-qgis-clangtidy.sh.

The 3rd commit should be removed before merge. It is only present to check that the CI detects errors correctly.

@github-actions github-actions bot added this to the 3.42.0 milestone Feb 18, 2025
Copy link

github-actions bot commented Feb 18, 2025

🪟 Windows builds

Download Windows builds of this PR for testing.
Debug symbols for this build are available here.
(Built from commit f9e2fd7)

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit f9e2fd7)

@troopa81 troopa81 added the NOT FOR MERGE Don't merge! label Feb 18, 2025
Copy link
Contributor

@troopa81 troopa81 left a comment

Choose a reason for hiding this comment

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

Thank you to take the time to get to the bottom of that!

I imagine that we will get some issues when we will build QGIS with clang 16, no?

I just added "NOT FOR MERGE" label to avoid merging this PR before you remove the test commit. You can get rid of it and merge once everything is OK.

@ptitjano ptitjano added the CI/GitHub-Actions issues related to GitHub Actions label Feb 18, 2025
…4.04

At the moment the clang-tidy CI fails on each file with the following
message:

```
error: PCH file uses an older PCH format that is no longer supported
[clang-diagnostic-error]
```

This is because clang-tidy version 18 is used while QGIS
compilation is achieved with clang 15. Indeed, QGIS is built with
clazy support which relies on clang 15.

This issue is fixed by using clang version 15 instead of version 18 in
`docker-qgis-clangtidy.sh`.
This script is already part of the of the `clang-tidy-15` package
@ptitjano ptitjano closed this Feb 18, 2025
@ptitjano ptitjano reopened this Feb 18, 2025
@ptitjano ptitjano closed this Feb 18, 2025
@ptitjano ptitjano reopened this Feb 18, 2025
@ptitjano
Copy link
Collaborator Author

clang-tidy CI now correctly detects an error: https://github.com/qgis/QGIS/actions/runs/13394386771/job/37413710375?pr=60659

@ptitjano
Copy link
Collaborator Author

I have now removed the test commit. This PR is ready.

@ptitjano ptitjano removed the NOT FOR MERGE Don't merge! label Feb 18, 2025
@ptitjano ptitjano self-assigned this Feb 18, 2025
@ptitjano
Copy link
Collaborator Author

I imagine that we will get some issues when we will build QGIS with clang 16, no?

Yes, we need to update the clang version every time the ubuntu CI is updated.

@troopa81 troopa81 merged commit 04b0ec5 into qgis:master Feb 19, 2025
30 checks passed
@ptitjano ptitjano deleted the fix-clang-tidy-ci branch February 19, 2025 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/GitHub-Actions issues related to GitHub Actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants