Skip to content

Commit 2877ca5

Browse files
authored
MOD: migrate the CI from travis to github actions (apache#158)
1 parent 0260356 commit 2877ca5

File tree

3 files changed

+55
-63
lines changed

3 files changed

+55
-63
lines changed

.github/workflows/kvrocks.yaml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: kvrocks ci actions # don't edit while the badge was depend on this
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
lint-build-test:
13+
name: Lint/Build
14+
strategy:
15+
matrix:
16+
os: [ubuntu-18.04]
17+
runs-on: ${{ matrix.os }}
18+
steps:
19+
- name: Checkout Code Base
20+
uses: actions/checkout@v2
21+
22+
- name: Install Dependencies
23+
run: |
24+
sudo apt-get install -y cppcheck
25+
sudo pip install --upgrade pip
26+
sudo pip install cpplint==1.5.0
27+
sudo pip install nose
28+
sudo pip install git+https://github.com/andymccurdy/[email protected]
29+
sudo apt-get install -y tar libsnappy-dev
30+
mkdir build
31+
32+
- name: Lint
33+
run: |
34+
make lint
35+
36+
- name: Build
37+
run: |
38+
make -j4
39+
cp src/kvrocks build/kvrocks
40+
41+
- name: Unit Test
42+
run: |
43+
wget https://github.com/google/googletest/archive/release-1.8.1.tar.gz
44+
tar -zxvf release-1.8.1.tar.gz
45+
cd googletest-release-1.8.1/
46+
cmake CMakeLists.txt
47+
make
48+
sudo make install
49+
cd -
50+
51+
- name: Functional Test
52+
run: |
53+
sh tests/scripts/setup-env.sh ./build
54+
cd tests/functional && nosetests -v

.travis.yml

-62
This file was deleted.

src/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ endif
8888

8989
lint:
9090
cd ..; ./cpplint.sh
91-
cd ..; ./cppcheck.sh
91+
# cd ..; ./cppcheck.sh
9292

9393
$(PROG): $(GLOG) $(LIBEVENT) $(ROCKSDB) $(KVROCKS_OBJS)
9494
$(KVROCKS_LD) -o $(PROG) $(KVROCKS_OBJS) $(FINAL_LIBS) $(LDFLAGS)

0 commit comments

Comments
 (0)