Commit 518549f 1 parent 6ab3ff4 commit 518549f Copy full SHA for 518549f
File tree 17 files changed +46
-486
lines changed
17 files changed +46
-486
lines changed Original file line number Diff line number Diff line change 61
61
62
62
- name : Build
63
63
run : |
64
- git submodule init && git submodule update
65
64
mkdir _build && cd _build
66
65
cmake -DDISABLE_JEMALLOC=true -DCMAKE_BUILD_TYPE=Release ..
67
66
make -j4 kvrocks kvrocks2redis
@@ -82,12 +81,13 @@ jobs:
82
81
83
82
- name : Install Dependencies
84
83
run : |
85
- brew install snappy googletest gcc autoconf automake libtool
84
+ brew install cmake gcc autoconf automake libtool
86
85
mkdir build
87
86
- name : Build
88
87
run : |
88
+ cd build
89
+ cmake ..
89
90
make -j4
90
- cp src/kvrocks build/kvrocks
91
91
- name : Unit Test
92
92
run : make test
93
93
Original file line number Diff line number Diff line change @@ -48,26 +48,24 @@ jobs:
48
48
sudo apt-get update
49
49
sudo apt-get install -y cppcheck
50
50
sudo pip install cpplint==1.5.0
51
- sudo apt-get install -y tar libsnappy-dev
51
+ sudo apt-get install -y tar cmake
52
52
mkdir build
53
53
54
54
- name : Lint
55
55
run : |
56
- make lint
56
+ ./cpplint.sh
57
+ ./cppcheck.sh
57
58
58
59
- name : Build
59
60
run : |
61
+ cd build
62
+ cmake ..
60
63
make -j4
61
- cp src/kvrocks build/kvrocks
64
+ cd ..
62
65
63
66
- name : Unit Test
64
67
run : |
65
- wget https://github.com/google/googletest/archive/release-1.8.1.tar.gz
66
- tar -zxvf release-1.8.1.tar.gz
67
- cd googletest-release-1.8.1/
68
- cmake CMakeLists.txt
69
- make && sudo make install && cd -
70
- make test
68
+ ./build/unittest
71
69
72
70
- name : Redis Tcl Test
73
71
run : |
79
77
cd tests/tcl && sh runtest
80
78
sh runtest --single integration/redis-cli && cd -
81
79
82
- build-on-ubuntu-with-cmake :
83
- strategy :
84
- matrix :
85
- os : [ubuntu-18.04]
86
- runs-on : ${{ matrix.os }}
87
- needs : [license]
88
- steps :
89
- - name : Checkout Code Base
90
-
91
- with :
92
- fetch-depth : 64
93
-
94
- - name : Install Dependencies
95
- run : |
96
- sudo apt update
97
- sudo apt-get install -y gcc g++ cmake
98
- mkdir _build
99
-
100
- - name : Build
101
- run : |
102
- sh build.sh _build
103
-
104
80
build-on-macos-latest :
105
81
runs-on : macos-11
106
82
needs : [license]
@@ -112,8 +88,11 @@ jobs:
112
88
113
89
- name : Install Dependencies
114
90
run : |
115
- brew install snappy googletest gcc autoconf automake libtool
91
+ brew install gcc autoconf automake libtool cmake
116
92
mkdir build
117
93
118
94
- name : Build
119
- run : make -j4
95
+ run : |
96
+ cd build
97
+ cmake ..
98
+ make -j4
Original file line number Diff line number Diff line change @@ -41,16 +41,19 @@ jobs:
41
41
42
42
- name : Install Dependencies
43
43
run : |
44
- sudo apt-get install -y tar libsnappy-dev
44
+ sudo apt-get install -y tar cmake
45
45
mkdir -p build/bin
46
46
mkdir -p build/conf
47
47
48
48
- name : Build
49
49
run : |
50
+ cd build
51
+ cmake -DCMAKE_BUILD_TYPE=Release ..
50
52
make -j4
51
- cp src/kvrocks build/bin/
52
- cp src/kvrocks2redis build/bin/
53
- cp kvrocks.conf build/conf/
53
+ cp kvrocks bin/
54
+ cp kvrocks2redis bin/
55
+ cp ../kvrocks.conf conf/
56
+ cd ..
54
57
55
58
- name : Set ENV
56
59
run : |
@@ -101,7 +104,7 @@ jobs:
101
104
run : |
102
105
yum install -y epel-release
103
106
yum install -y https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm
104
- yum install -y git gcc gcc-c++ make snappy snappy-devel autoconf automake libtool which gtest gtest-devel
107
+ yum install -y git gcc gcc-c++ make cmake autoconf automake libtool which
105
108
106
109
- name : Checkout Code Base
107
110
@@ -110,12 +113,14 @@ jobs:
110
113
111
114
- name : Build
112
115
run : |
116
+ cd build
117
+ cmake -DCMAKE_BUILD_TYPE=Release
113
118
make -j4
114
- mkdir -p build/ bin
115
- mkdir -p build/ conf
116
- cp src/ kvrocks build/ bin/
117
- cp src/ kvrocks2redis build/ bin/
118
- cp kvrocks.conf build/ conf/
119
+ mkdir -p bin
120
+ mkdir -p conf
121
+ cp kvrocks bin/
122
+ cp kvrocks2redis bin/
123
+ cp ../ kvrocks.conf conf/
119
124
120
125
- name : Set ENV
121
126
run : |
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 17
17
18
18
FROM ubuntu:22.04 as build
19
19
20
- RUN apt update && apt install -y make git autoconf libtool g++ libsnappy-dev
20
+ RUN apt update && apt install -y cmake make git autoconf libtool g++
21
21
WORKDIR /kvrocks
22
22
23
23
COPY . .
24
- RUN make -j4
24
+ RUN mkdir docker-build && ./build.sh docker-build
25
25
26
26
27
27
FROM ubuntu:22.04
28
28
29
- RUN apt update && apt install -y libsnappy-dev
30
29
WORKDIR /kvrocks
31
30
32
- COPY --from=build /kvrocks/src /kvrocks ./bin/
31
+ COPY --from=build /kvrocks/docker-build /kvrocks ./bin/
33
32
34
33
COPY ./kvrocks.conf ./conf/
35
34
RUN sed -i -e 's|dir /tmp/kvrocks|dir /var/lib/kvrocks|g' ./conf/kvrocks.conf
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -43,44 +43,44 @@ Kvrocks has the following key features:
43
43
44
44
#### requirements
45
45
* g++ (required by c++11, version >= 4.8)
46
- * autoconf automake libtool snappy
46
+ * autoconf automake libtool cmake
47
47
48
48
#### Build
49
49
50
- *** NOTE: You should install the snappy first:***
51
-
52
50
``` shell
53
51
# Centos/Redhat
54
- sudo yum install -y epel-release && sudo yum install -y git gcc gcc-c++ make snappy snappy-devel autoconf automake libtool which gtest gtest-devel
52
+ sudo yum install -y epel-release && sudo yum install -y git gcc gcc-c++ make cmake autoconf automake libtool which
55
53
56
54
# Ubuntu/Debian
57
55
sudo apt update
58
- sudo apt-get install gcc g++ make libsnappy-dev autoconf automake libtool googletest libgtest-dev
56
+ sudo apt-get install gcc g++ make cmake autoconf automake libtool
59
57
60
58
# MACOSX
61
- brew install autoconf automake libtool snappy googletest
59
+ brew install autoconf automake libtool cmake
62
60
```
63
61
64
62
It is as simple as:
65
63
66
64
``` shell
67
- $ git clone --recursive https://github.com/apache/incubator-kvrocks.git
65
+ $ git clone https://github.com/apache/incubator-kvrocks.git
68
66
$ cd kvrocks
69
- $ make -j4
67
+ $ mkdir build
68
+ $ ./build.sh build # manually run CMake if you want to build Debug version or add some build options
70
69
```
71
70
72
71
### Running kvrocks
73
72
74
73
``` shell
75
- $ ./src /kvrocks -c kvrocks.conf
74
+ $ ./build /kvrocks -c kvrocks.conf
76
75
```
77
76
78
77
### Running test cases
79
78
80
- *** NOTE: You should install the googletest first***
81
-
82
79
``` shell
83
- make test
80
+ $ # make sure CMake was executed in ./build
81
+ $ cd build
82
+ $ make unittest
83
+ $ ./unittest
84
84
```
85
85
86
86
### Supported platforms
You can’t perform that action at this time.
0 commit comments