NuRaft icon indicating copy to clipboard operation
NuRaft copied to clipboard

Support build with Bazel

Open lizhanhui opened this issue 3 years ago • 6 comments

Support build and run tests through Bazel so developers from Bazel community can reuse scripts, as is discussed in Issue 284

lizhanhui avatar Feb 10 '22 11:02 lizhanhui

As I mentioned above, please remove cert/key files and make them auto-generated.

greensky00 avatar Feb 11 '22 19:02 greensky00

@greensky00 Got a few busy days and I would fix issues raised in the next commit.

lizhanhui avatar Feb 22 '22 08:02 lizhanhui

"This PR almost look good to me. But one concern is: do we have a better way to unify the cmake and bazel? otherwise they are hard to maintain." It is true that Bazel may use rules_foreign_cc to compile directly. But doing so would undermine dependency management, rendering automatic dependency version resolution infeasible.

As a matter of fact, glob is used while defining nuraft artifact. It would be a rare case when there is a need to modify bazel script in the future.

lizhanhui avatar Feb 22 '22 08:02 lizhanhui

Is there any update?

jovany-wang avatar Apr 06 '22 23:04 jovany-wang

@greensky00 If there is no more update, how about merging this PR and then we're refining it in the next PR?

I'm looking forward this feature to integrate it to our repo in bazel building toolchain.

jovany-wang avatar Apr 15 '22 04:04 jovany-wang

Hi @jovany-wang I'm ok with partial merging, but before that, the cert files must be removed as it is monitored by the security team. Since those dummy cert files are used for SSL testing only, this PR may need to exclude building unit tests, but still compiling the library itself should be fine.

greensky00 avatar Apr 15 '22 17:04 greensky00