forked from apache/kvrocks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
62 lines (60 loc) · 1.63 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
dist: trusty
language: c++
os:
- linux
sudo: yes
compiler:
- gcc
cache:
directories:
- $TRAVIS_BUILD_DIR/build/
- $TRAVIS_BUILD_DIR/external/
stages:
- analysis
- build
- test
- push
jobs:
include:
- stage: analysis
name: Static check the source code and lint
install:
- sudo apt-get install -y cppcheck
- sudo pip install --upgrade pip
- sudo pip install cpplint
script:
make lint
- stage: build
name: Build the kvrocks
script:
- mkdir -p build
- sudo apt-get install libsnappy-dev
- make -j4
- cp src/kvrocks build/kvrocks
- stage: test
name: Unit Tests
script:
- sudo apt-get install tar libsnappy-dev
- wget https://github.com/google/googletest/archive/release-1.8.1.tar.gz && tar -zxvf release-1.8.1.tar.gz
&& cd googletest-release-1.8.1/ && cmake CMakeLists.txt && make && sudo make install && cd -
- make test
- stage: test
name: Functional Tests
install:
- sudo pip install nose
- sudo apt-get install libsnappy-dev
- sudo pip install git+https://github.com/andymccurdy/[email protected]
script:
- sh tests/scripts/setup-env.sh ./build
- cd tests/functional && nosetests -v
- stage: push
name: Push to dockerhub
on:
tags: true
if: tag IS present
services:
- docker
before_install:
- docker build -t hulkdev/kvrocks:$TRAVIS_TAG .
- docker tag hulkdev/kvrocks:$TRAVIS_TAG hulkdev/kvrocks:latest
script: bash docker_push.sh