-
Notifications
You must be signed in to change notification settings - Fork 336
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
Speedup clang tidy #3219
Merged
WeiqunZhang
merged 1 commit into
AMReX-Codes:development
from
WeiqunZhang:speedup_clang-tidy
Mar 30, 2023
Merged
Speedup clang tidy #3219
WeiqunZhang
merged 1 commit into
AMReX-Codes:development
from
WeiqunZhang:speedup_clang-tidy
Mar 30, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Depend on #3218. |
WeiqunZhang
force-pushed
the
speedup_clang-tidy
branch
from
March 27, 2023 18:39
06eff92
to
b5aae75
Compare
WeiqunZhang
force-pushed
the
speedup_clang-tidy
branch
7 times, most recently
from
March 28, 2023 01:55
7380f91
to
0e27100
Compare
We make ccache save a log file, from which we find out which files need a rebuild. Instead of running clang-tidy on every file, we now only run it on those files that had a miss in ccache. This significantly speeds up clang-tidy in CIs. Note that we treat clang-tidy warnings as errors in CIs. So if there is a hit in the ccache's cache, the file is free of clang-tidy warnings. Also note that we set CCACHE_EXTRAFILES to the clang-tidy configuration file. So any changes to the config file will invalidate the cache as it should. If a CI job successfully passes the compilation stage with ccache enabled, but fails at the clang-tidy stage, the ccache's cache has been updated. One might think this will cause issues because we now have files that have been cached by ccache and meanwhile have failed the clang-tidy checks. However, this is not an issue for Github CIs. This is because ccache's cache will not be saved as a Github cache, if a CI fails. Fix various clang-tidy warnings in Tests/. They were not reported before because clang-tidy was not used on the tests.
WeiqunZhang
force-pushed
the
speedup_clang-tidy
branch
from
March 29, 2023 20:24
0e27100
to
283b5de
Compare
I turned off EB in a 1D test, because we do not support EB in 1D. |
atmyers
approved these changes
Mar 30, 2023
1 task
guj
pushed a commit
to guj/amrex
that referenced
this pull request
Jul 13, 2023
We make ccache save a log file, from which we find out which files need a rebuild. Instead of running clang-tidy on every file, we now only run it on those files that had a miss in ccache. This significantly speeds up clang-tidy in CIs. Note that we treat clang-tidy warnings as errors in CIs. So if there is a hit in the ccache's cache, the file is free of clang-tidy warnings. Also note that we set CCACHE_EXTRAFILES to the clang-tidy configuration file. So any changes to the config file will invalidate the cache as it should. If a CI job successfully passes the compilation stage with ccache enabled, but fails at the clang-tidy stage, the ccache's cache has been updated. One might think this will cause issues because we now have files that have been cached by ccache and meanwhile have failed the clang-tidy checks. However, this is not an issue for Github CIs. This is because ccache's cache will not be saved as a Github cache, if a CI fails. Fix various clang-tidy warnings in Tests/. They were not reported before because clang-tidy was not used on the tests.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We make ccache save a log file, from which we find out which files need a
rebuild. Instead of running clang-tidy on every file, we now only run it on
those files that had a miss in ccache. This significantly speeds up
clang-tidy in CIs.
Note that we treat clang-tidy warnings as errors in CIs. So if there is a
hit in the ccache's cache, the file is free of clang-tidy warnings. Also
note that we set CCACHE_EXTRAFILES to the clang-tidy configuration file. So
any changes to the config file will invalidate the cache as it should.
If a CI job successfully passes the compilation stage with ccache enabled,
but fails at the clang-tidy stage, the ccache's cache has been updated. One
might think this will cause issues because we now have files that have been
cached by ccache and meanwhile have failed the clang-tidy checks. However,
this is not an issue for Github CIs. This is because ccache's cache will not
be saved as a Github cache, if a CI fails.
Fix various clang-tidy warnings in Tests/. They were not reported before
because clang-tidy was not used on the tests.