-
Notifications
You must be signed in to change notification settings - Fork 166
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
chore: update presets and add a basic clang-tidy config #2056
Conversation
Signed-off-by: Andrea Terzolo <[email protected]>
CMakePresets.json
Outdated
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.
we probably need a formatter also for json :/
Perf diff from master - unit tests
Heap diff from master - unit tests
Heap diff from master - scap file
Benchmarks diff from master
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2056 +/- ##
==========================================
- Coverage 73.55% 73.55% -0.01%
==========================================
Files 253 253
Lines 31863 31863
Branches 5651 5635 -16
==========================================
- Hits 23438 23437 -1
+ Misses 8420 8402 -18
- Partials 5 24 +19
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Co-authored-by: Mauro Ezequiel Moltrasio <[email protected]> Co-authored-by: Mauro Ezequiel Moltrasio <[email protected]> Signed-off-by: Andrea Terzolo <[email protected]>
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.
/approve
LGTM label has been added. Git tree hash: 4537809a0d97dfe0d8ea1503a359ffd349da277c
|
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.
/lgtm
Left a suggestion for a potential follow up PR.
"configurePresets": [ | ||
{ | ||
"name": "scap-drivers", | ||
"displayName": "Build scap drivers and their tests", | ||
"description": "Build all scap drivers (modern eBPF, legacy eBPF, kmod) and their tests", | ||
"generator": "Unix Makefiles", | ||
"binaryDir": "${sourceDir}/build-scap-drivers", | ||
"cacheVariables": { | ||
"CMAKE_BUILD_TYPE": "Release", | ||
"BUILD_BPF": "ON", | ||
"BUILD_DRIVER": "ON", | ||
"USE_BUNDLED_DEPS": "ON", | ||
"ENABLE_DRIVERS_TESTS": "ON", | ||
"MODERN_BPF_DEBUG_MODE": "ON", | ||
"BUILD_LIBSCAP_MODERN_BPF": "ON", | ||
"BUILD_LIBSCAP_GVISOR": "OFF", | ||
"CREATE_TEST_TARGETS": "ON", | ||
"ENABLE_LIBSCAP_TESTS": "ON", | ||
"SCAP_FILES_SUITE_ENABLE": "OFF", | ||
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON", | ||
"BUILD_WARNINGS_AS_ERRORS": "ON" | ||
} | ||
}, | ||
{ | ||
"name": "sinsp-minimal", | ||
"displayName": "Build sinsp in minimal build", | ||
"description": "Build sinsp in minimal build with its tests", | ||
"generator": "Unix Makefiles", | ||
"binaryDir": "${sourceDir}/build-sinsp-minimal", | ||
"cacheVariables": { | ||
"CMAKE_BUILD_TYPE": "Release", | ||
"BUILD_DRIVER": "ON", | ||
"BUILD_BPF": "ON", | ||
"USE_BUNDLED_DEPS": "ON", | ||
"CREATE_TEST_TARGETS": "ON", | ||
"MINIMAL_BUILD": "ON", | ||
"SCAP_FILES_SUITE_ENABLE": "OFF", | ||
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON", | ||
"BUILD_WARNINGS_AS_ERRORS": "ON" | ||
} | ||
} |
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.
Not something for this PR, but we could create a default
preset in order to reduce some of the configuration.
"configurePresets": [ | |
{ | |
"name": "scap-drivers", | |
"displayName": "Build scap drivers and their tests", | |
"description": "Build all scap drivers (modern eBPF, legacy eBPF, kmod) and their tests", | |
"generator": "Unix Makefiles", | |
"binaryDir": "${sourceDir}/build-scap-drivers", | |
"cacheVariables": { | |
"CMAKE_BUILD_TYPE": "Release", | |
"BUILD_BPF": "ON", | |
"BUILD_DRIVER": "ON", | |
"USE_BUNDLED_DEPS": "ON", | |
"ENABLE_DRIVERS_TESTS": "ON", | |
"MODERN_BPF_DEBUG_MODE": "ON", | |
"BUILD_LIBSCAP_MODERN_BPF": "ON", | |
"BUILD_LIBSCAP_GVISOR": "OFF", | |
"CREATE_TEST_TARGETS": "ON", | |
"ENABLE_LIBSCAP_TESTS": "ON", | |
"SCAP_FILES_SUITE_ENABLE": "OFF", | |
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON", | |
"BUILD_WARNINGS_AS_ERRORS": "ON" | |
} | |
}, | |
{ | |
"name": "sinsp-minimal", | |
"displayName": "Build sinsp in minimal build", | |
"description": "Build sinsp in minimal build with its tests", | |
"generator": "Unix Makefiles", | |
"binaryDir": "${sourceDir}/build-sinsp-minimal", | |
"cacheVariables": { | |
"CMAKE_BUILD_TYPE": "Release", | |
"BUILD_DRIVER": "ON", | |
"BUILD_BPF": "ON", | |
"USE_BUNDLED_DEPS": "ON", | |
"CREATE_TEST_TARGETS": "ON", | |
"MINIMAL_BUILD": "ON", | |
"SCAP_FILES_SUITE_ENABLE": "OFF", | |
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON", | |
"BUILD_WARNINGS_AS_ERRORS": "ON" | |
} | |
} | |
"configurePresets": [ | |
{ | |
"name": "default", | |
"generator": "Unix Makefiles", | |
"cacheVariables": { | |
"CMAKE_BUILD_TYPE": "Release", | |
"BUILD_DRIVER": "ON", | |
"BUILD_BPF": "ON", | |
"USE_BUNDLED_DEPS": "ON", | |
"CREATE_TEST_TARGETS": "ON", | |
"MINIMAL_BUILD": "ON", | |
"SCAP_FILES_SUITE_ENABLE": "OFF", | |
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON", | |
"BUILD_WARNINGS_AS_ERRORS": "ON" | |
} | |
}, | |
{ | |
"name": "scap-drivers", | |
"displayName": "Build scap drivers and their tests", | |
"description": "Build all scap drivers (modern eBPF, legacy eBPF, kmod) and their tests", | |
"inherits": "default", | |
"binaryDir": "${sourceDir}/build-scap-drivers", | |
"cacheVariables": { | |
"CMAKE_BUILD_TYPE": "Release", | |
"ENABLE_DRIVERS_TESTS": "ON", | |
"MODERN_BPF_DEBUG_MODE": "ON", | |
"BUILD_LIBSCAP_MODERN_BPF": "ON", | |
"BUILD_LIBSCAP_GVISOR": "OFF", | |
"ENABLE_LIBSCAP_TESTS": "ON" | |
} | |
}, | |
{ | |
"name": "sinsp-minimal", | |
"displayName": "Build sinsp in minimal build", | |
"description": "Build sinsp in minimal build with its tests", | |
"inherits": "default", | |
"binaryDir": "${sourceDir}/build-sinsp-minimal" | |
} |
You might need to also specify binaryDir
for the default profile, I haven't tested the change.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Andreagit97, FedeDP, Molter73 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind cleanup
Any specific area of the project related to this PR?
/area build
Does this PR require a change in the driver versions?
What this PR does / why we need it:
this PR updates presets with "CMAKE_EXPORT_COMPILE_COMMANDS": "ON" and "BUILD_WARNINGS_AS_ERRORS": "ON". Moreover it adds a clang-tidy config if someone want to use it locally
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: