-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Enable cppCheck tests on ci (#2048)
- Loading branch information
Showing
6 changed files
with
44 additions
and
7 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -158,6 +158,7 @@ | |
cmake-format | ||
cmake-language-server | ||
conan | ||
cppcheck | ||
direnv | ||
gdb | ||
gtk3 | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
if [ "$#" -ne 2 ]; then | ||
echo "Usage: $0 MAX_ERRORS MAX_WARNINGS" >&2 | ||
exit 1 | ||
fi | ||
|
||
MAX_ERRORS=$1 | ||
MAX_WARNINGS=$2 | ||
|
||
# Use or true because the script should continue even if cppcheck fails | ||
cppcheck --check-level=exhaustive src 2> check.log || true | ||
|
||
ERRORS=$( cat check.log | grep -c "error:" ) | ||
WARNINGS=$( cat check.log | grep -c "warning:" ) | ||
|
||
if [ "$ERRORS" -gt "$MAX_ERRORS" ]; then | ||
cat check.log | ||
echo "Wanted $MAX_ERRORS errors, but found $ERRORS" | ||
false | ||
else | ||
|
||
if [ "$WARNINGS" -gt "$MAX_WARNINGS" ]; then | ||
cat check.log | ||
echo "Wanted $MAX_WARNINGS warnings, but found $WARNINGS" | ||
false | ||
fi | ||
fi |
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
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
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
6d6355d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold
2
.BM_Box_MinimumVector<CubicBox>
12.425796699429297
ns/iter5.604678665837181
ns/iter2.22
BM_HistogramBinning_1d/16777216
28.44803714477578
ns/iter9.875267123828793
ns/iter2.88
BM_HistogramBinning_2d/16777216
52.003089631797685
ns/iter20.265535833198363
ns/iter2.57
This comment was automatically generated by workflow using github-action-benchmark.
CC: @disorderedmaterials/dissolve-devs