-
Notifications
You must be signed in to change notification settings - Fork 41
ci: Add debug build to CI matrix #83
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
base: main
Are you sure you want to change the base?
Conversation
35257ff to
4aa809c
Compare
844ab2b to
d9e86a8
Compare
conanfile.py
Outdated
| tc.cache_variables["MAX_LINK_JOBS"] = num_link_job | ||
|
|
||
| if self.options.get_safe("ci_debug_minsize"): | ||
| tc.cache_variables["CMAKE_CXX_FLAGS_DEBUG"] = "" |
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.
No need to touch this?
CMAKE_CXX_FLAGS_DEBUG flag will controlled by conan build -s build_type=xxx
To use the Release dependencies:
conan install . -sbuild_type=$${DEPENDENCY_BUILD_TYPE:-${BUILD_TYPE}}
It will work, I guess.
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.
In my testing I found CMAKE_CXX_FLAGS_DEBUG is always set to "-g". In order to create a "debug" build but without the debug info, I needed to remove the "-g" argument from the compilation flags. I found if I just set this variable to "" then -g is removed from the compilation command. This variable is set even in non-debug builds. It just only gets used when the build type is set to Debug.
This was the solution I came up with to strip debug info, but I'm happy to do it another way if you have a suggestion
14f73ac to
ac59340
Compare
conanfile.py
Outdated
| "enable_test": [True, False], | ||
| "build_benchmark": ["off", "basic", "on"], | ||
| "enable_coverage": [True, False], | ||
| "ci_debug_minsize": [True, False], |
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.
The conan options are the attributes of a library, and these options will exposed to the user (gluten/presto ...)
From my point of view, "ci_debug_minsize" should not be an option.
It is only for CI. Use an environment variable?
btw, build_benchmark / enable_coverage also should be removed. (I will try to remove them later)
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.
Got it. I think that makes sense.
I changed the strategy to modify the cmake variable by instead configuring the profile with the following value in the [conf] section:
tools.cmake.cmaketoolchain:extra_variables={"CMAKE_CXX_FLAGS_DEBUG": ""}
This avoids having any specific logic in the build conanfile for CI, which I feel is a much better solution. Configuring the environment seems better to me anyways.
bb0a4e7 to
de3ebdf
Compare
- debug info makes the build very slow due to limited disk perf - debug info is not really required in CI. We just want the code and tests to run as if debug is enabled (-O0)
- BOLT_BUILD_TIME added as a cached variable. This prevents inadvertent changes to version.h which causes recompilation every time we call a `make` command - version.h is now generated to _build/<BUILD_TYPE>/gen_cpp/bolt/version/version.h - In the case you use the makefile to configure, calling the same target twice in a row will no longer delete the CMakeCache.txt - With the version.h changes, CI builds for release and release_spark profiles will now improve in time by 2-4 minutes for every job due to not recompiling. - changes benchmarks-build to build-only with a matrix using benchmarks and debug_with_test - Added IN_CI variable to force dependencies to be built in release mode as opposed to debug mode purely for CI. This is used in conjunction with the `-s &:...` arguments to the conan build
de3ebdf to
24d5bae
Compare
What problem does this PR solve?
Adds the debug and test build to the CI matrix
Type of Change
Description
Adds debug mode build to CI builds.
Performance Impact
Release Note
N/A
Checklist (For Author)
Breaking Changes