-
Notifications
You must be signed in to change notification settings - Fork 260
CMake presets for bencher + use in CI #8287
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,7 @@ build*/ | |
| Debug*/ | ||
| Release*/ | ||
| CMakeFiles/ | ||
| /CMakeUserPresets.json | ||
| .vscode/ | ||
| .vs/ | ||
| libuv/ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -573,6 +573,8 @@ install(TARGETS verify_attestation DESTINATION bin) | |
| if(BUILD_TESTS) | ||
| enable_testing() | ||
|
|
||
| add_custom_target(ccf_bencher) | ||
|
|
||
| # Unit tests | ||
| if(BUILD_UNIT_TESTS) | ||
| add_test( | ||
|
|
@@ -1208,6 +1210,7 @@ if(BUILD_TESTS) | |
| PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/commit_latency.py | ||
| LABEL perf | ||
| CONFIGURATIONS perf | ||
| BUILD_TARGETS logging | ||
| ) | ||
|
|
||
| add_e2e_test( | ||
|
|
@@ -1465,6 +1468,7 @@ if(BUILD_TESTS) | |
| PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/logging_cert_locust.py | ||
| LABEL perf | ||
| CONFIGURATIONS perf | ||
| BUILD_TARGETS logging | ||
| ADDITIONAL_ARGS | ||
| --package | ||
| "samples/apps/logging/logging" | ||
|
|
@@ -1491,6 +1495,7 @@ if(BUILD_TESTS) | |
| PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/basicperf_locust.py | ||
| LABEL perf | ||
| CONFIGURATIONS perf | ||
| BUILD_TARGETS js_generic | ||
| ADDITIONAL_ARGS | ||
| --js-app-bundle | ||
| ${CMAKE_SOURCE_DIR}/samples/apps/basic/js | ||
|
|
@@ -1520,6 +1525,7 @@ if(BUILD_TESTS) | |
| PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/basicperf_locust.py | ||
| LABEL perf | ||
| CONFIGURATIONS perf | ||
| BUILD_TARGETS basic | ||
| ADDITIONAL_ARGS | ||
| --package | ||
| "samples/apps/basic/basic" | ||
|
|
@@ -1551,6 +1557,7 @@ if(BUILD_TESTS) | |
| PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/logging_jwt_locust.py | ||
| LABEL perf | ||
| CONFIGURATIONS perf | ||
| BUILD_TARGETS logging | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems like a roundabout way of defining this? We don't have clean ways to enable/disable individual tests, and yet this is trying to say if this test is enabled, then |
||
| ADDITIONAL_ARGS | ||
| --package | ||
| "samples/apps/logging/logging" | ||
|
|
@@ -1576,6 +1583,7 @@ if(BUILD_TESTS) | |
| PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/historical_query_locust.py | ||
| LABEL perf | ||
| CONFIGURATIONS perf | ||
| BUILD_TARGETS logging | ||
| ADDITIONAL_ARGS | ||
| --package | ||
| "samples/apps/logging/logging" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| { | ||
| "version": 3, | ||
| "cmakeMinimumRequired": { | ||
| "major": 3, | ||
| "minor": 21, | ||
| "patch": 0 | ||
| }, | ||
| "configurePresets": [ | ||
| { | ||
| "name": "bencher", | ||
| "displayName": "Bencher", | ||
| "description": "Configure the microbenchmark and end-to-end performance test build.", | ||
| "generator": "Ninja", | ||
| "binaryDir": "${sourceDir}/build", | ||
| "cacheVariables": { | ||
| "CMAKE_BUILD_TYPE": "RelWithDebInfo", | ||
| "WORKER_THREADS": "2" | ||
| } | ||
|
Comment on lines
+15
to
+18
|
||
| } | ||
| ], | ||
| "buildPresets": [ | ||
| { | ||
| "name": "bencher", | ||
| "configurePreset": "bencher", | ||
| "targets": ["ccf_bencher"] | ||
| } | ||
| ] | ||
| } | ||
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.
Is there a reason to switch to
cmake --buildinstead of (cd build &&)ninja?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.
Surely you'd want a single cmake --build command, that's the point of presets no?