Refactor build system - remove readies from module build [MOD-5722]#5737
Refactor build system - remove readies from module build [MOD-5722]#5737
Conversation
|
My concerns with removing readies from our build path (I'm sure you thought about it too 😃)
|
run unit tests with old "make unit-tests" way (until this is fixed via ./build.sh)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5737 +/- ##
==========================================
+ Coverage 87.05% 87.25% +0.20%
==========================================
Files 211 197 -14
Lines 38569 36019 -2550
Branches 1893 0 -1893
==========================================
- Hits 33576 31429 -2147
+ Misses 4986 4590 -396
+ Partials 7 0 -7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
| TESTS|tests) | ||
| BUILD_TESTS=1 |
There was a problem hiding this comment.
Bad name IMO. This script also runs the tests (we may want to rename the script as well)
There was a problem hiding this comment.
Will address it in next PR that is dedicated for building tests
| SA|sa) | ||
| SA=1 | ||
| ;; | ||
| REDIS_STANDALONE|redis_standalone) | ||
| REDIS_STANDALONE=1 | ||
| ;; |
There was a problem hiding this comment.
Some say this is not intuitive, and we better use CLUSTER=1 instead of SA=0
There was a problem hiding this comment.
I agree
WIll address it in next PR :)
build.sh
Outdated
| COORD="oss" # Coordinator type: oss or rlec | ||
| DEBUG=0 # Debug build flag | ||
| PROFILE=0 # Profile build flag | ||
| FORCE=0 # Force clean build flag | ||
| VERBOSE=0 # Verbose output flag | ||
| QUICK=0 # Quick test mode (subset of tests) | ||
|
|
||
| # Test configuration (0=disabled, 1=enabled) | ||
| BUILD_TESTS=0 # Build test binaries | ||
| RUN_UNIT_TESTS=0 # Run C/C++ unit tests | ||
| RUN_RUST_TESTS=0 # Run Rust tests | ||
| RUN_PYTEST=0 # Run Python tests | ||
| RUN_ALL_TESTS=0 # Run all test types |
There was a problem hiding this comment.
Consider taking the environment variable values as default, instead of ignoring them
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
| # Define debug symbols extraction function | ||
| function(extract_debug_symbols target) | ||
| if(CMAKE_BUILD_TYPE STREQUAL "Release" AND NOT APPLE AND NOT WIN32) | ||
| if(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo" AND NOT APPLE) |
| RUN_RUST_TESTS=0 # Run Rust tests | ||
| RUN_PYTEST=0 # Run Python tests | ||
| RUN_ALL_TESTS=0 # Run all test types | ||
| RUN_ALL_TESTS=${RUN_ALL_TESTS:-0} # Run all test types |
There was a problem hiding this comment.
meant to do it on all inputs... so we can accept both attributes (./build.sh ARG=value) and environment variables (VAR=value ./build.sh)
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 2.8
git worktree add -d .worktree/backport-5737-to-2.8 origin/2.8
cd .worktree/backport-5737-to-2.8
git switch --create backport-5737-to-2.8
git cherry-pick -x 39fcd2c0a38a915d73ad5aa6a56a19f7a88c18e0 |
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 2.6
git worktree add -d .worktree/backport-5737-to-2.6 origin/2.6
cd .worktree/backport-5737-to-2.6
git switch --create backport-5737-to-2.6
git cherry-pick -x 39fcd2c0a38a915d73ad5aa6a56a19f7a88c18e0 |
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 2.10
git worktree add -d .worktree/backport-5737-to-2.10 origin/2.10
cd .worktree/backport-5737-to-2.10
git switch --create backport-5737-to-2.10
git cherry-pick -x 39fcd2c0a38a915d73ad5aa6a56a19f7a88c18e0 |
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 8.0
git worktree add -d .worktree/backport-5737-to-8.0 origin/8.0
cd .worktree/backport-5737-to-8.0
git switch --create backport-5737-to-8.0
git cherry-pick -x 39fcd2c0a38a915d73ad5aa6a56a19f7a88c18e0 |
…5737) * purge readeis from cmake. Use new build script instead of makefile * call script in CI * libuv * restore build folder * libuv * unit tests * pretty build.sh * pytest * fixed extension build error * Add profile flags + try pass linker flag properly (wip) * fix build and linkage + pytest + adjust json * small cleanup * Add pytz dep * bump googletest version, use same variant name as before * remove ld libs * Fix executable linker flags - build unit test properly. run unit tests with old "make unit-tests" way (until this is fixed via ./build.sh) * fix rust build via build.sh * fix san build * Set coverage flags and use the same bin dir for sanitizer (build it for debug) * update benchmark image for regression test * remove leftover * Build hiredis static * fix json env flag in CI * CR changes * Restore deleted files until unit tests are done as well, use boolean params * restore vecsim version * fix profile and fix build error * fix for profile * try fix mac build * fix unit tests for arm * Define boost dir * remove the policies * try fix the binroot for unit-tests * change dir name for arm * remove policy from hash as well * use clang in mac * try to set hardcoded clang * try to mimic readies in macos includes * try set CMAKE_OSX_DEPLOYMENT_TARGET * whitespace formatting * Set CC to clang in apple * try to export llvm * try set compiler in build script * use bin in path * try EXPORT properly with homebrew * remove setting bad path to clang * set clang path * update to llvm@18 * update c++ path * set compiler with LLVM env var * fix? * set proper link flags for mac * remove bsymbolic from hiredis * revert hiredis in non macos to how it was * clean stuff * cleanups --------- Co-authored-by: alon <alonreshef24@gmail.com> Co-authored-by: GuyAv46 <guy.avimor@gmail.com>
…5737) * purge readeis from cmake. Use new build script instead of makefile * call script in CI * libuv * restore build folder * libuv * unit tests * pretty build.sh * pytest * fixed extension build error * Add profile flags + try pass linker flag properly (wip) * fix build and linkage + pytest + adjust json * small cleanup * Add pytz dep * bump googletest version, use same variant name as before * remove ld libs * Fix executable linker flags - build unit test properly. run unit tests with old "make unit-tests" way (until this is fixed via ./build.sh) * fix rust build via build.sh * fix san build * Set coverage flags and use the same bin dir for sanitizer (build it for debug) * update benchmark image for regression test * remove leftover * Build hiredis static * fix json env flag in CI * CR changes * Restore deleted files until unit tests are done as well, use boolean params * restore vecsim version * fix profile and fix build error * fix for profile * try fix mac build * fix unit tests for arm * Define boost dir * remove the policies * try fix the binroot for unit-tests * change dir name for arm * remove policy from hash as well * use clang in mac * try to set hardcoded clang * try to mimic readies in macos includes * try set CMAKE_OSX_DEPLOYMENT_TARGET * whitespace formatting * Set CC to clang in apple * try to export llvm * try set compiler in build script * use bin in path * try EXPORT properly with homebrew * remove setting bad path to clang * set clang path * update to llvm@18 * update c++ path * set compiler with LLVM env var * fix? * set proper link flags for mac * remove bsymbolic from hiredis * revert hiredis in non macos to how it was * clean stuff * cleanups --------- Co-authored-by: alon <alonreshef24@gmail.com> Co-authored-by: GuyAv46 <guy.avimor@gmail.com>
Describe the changes in the pull request
(PR started by @DvirDukhan, continue by @alonre24)
The goal is to purge https://github.com/RedisLabsModules/readies from our build system.
In this PR we introduce a new script
.build.shwhich is an alternative entry point for building the module usingcmakewithout going through the makefile.This includes refactoring of our CMakeLists.txt so it will account for the rules and flags that are passed via readies.
Now we can to the following operations without going through readies:
./build.sh [TESTS]./build.sh RUN_PYTEST./build.sh [RUN_PYTEST]This is still an intermediate step on the way to purge readies, and building the module in the "old way" using
makefilerules is still possible (and will probably be available in the future as well, but internally will call to./build.sh- TBD).As part of that, I also:
** Benchmarks flow does not show any regression **
Left to do (in upcoming PRs):
make coveragecall only.make unit-testsMark if applicable