-
Notifications
You must be signed in to change notification settings - Fork 473
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
CMake: support ninja as a build backend #626
Conversation
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, nice.
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.
Shall we add a matrix to test build with ninja in CI workflow?
I think we could add a ninja job to the daily ci now, but since the workflows haven't been refactored, it might not be easy to use an unified matrix, which is described in #572, and I will make a PR to refactor workflows later. |
Thanks for your contribution! |
Hi @PragmaTwice Currently daily CI is failed, please have a look, |
Actually I think whether we should running a daily CI or just run it every PR - with Apache INFRA we may have enough resource to run CI now. At least we may try to trigger daily CI when related files touched (however, "related files" can be any source files and thus it becomes a CI runs for every PR). |
Hi @tisonkun it will cost much time if we run also daily CI for every PR, i think it is not friendly for contributors.
This idea sounds good, could we support this feature? |
At least we can add: name: Daily CI
on:
pull_request:
paths:
- ".github/workflows/daily-ci.yaml"
schedule:
- cron: '0 1 * * *'
workflow_dispatch: If I find can find some spare time I'll make some investigation. But feel free to do it yourself. |
I think we could use
Sorry for that, seems there is no pre-installed ninja in the virtual environment, some |
thanks @tisonkun cool, i am not familiar CI, but it seems it is a light and useful way to resolve our problem. @PragmaTwice please don't say sorry, you already have done much for Kvrocks. Just let's fix it, we can adopt @tisonkun advise as above to check. PS: In redis repo, maintainers can trigger manually daily CI, maybe it also is a way for us. |
We can also trigger the daily CI manually since Just like this, click the |
found, cool, thanks @PragmaTwice |
Close #621.
Benchmark between make and ninja build for kvrocks can be found in #625.
TL;DR: The benchmark shows that ninja is slightly slower than make build in clean build, but has huge advantages in incremental build, which is very friendly to kvrocks developers who need to do frequent incremental builds.
So in this PR, kvrocks still use make by default, but the problem that blocks ninja backend to successfully build in cmake is fixed and now
build.sh
has a--ninja
option to enable ninja.