-
Notifications
You must be signed in to change notification settings - Fork 18
/
.travis.yml
70 lines (60 loc) · 1.7 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
63
64
65
66
67
68
69
70
language: c++
# add branches you want to triger CI
branches:
only:
- master
- unstable
- nvmestore
- fuse-ustack
- testing
sudo: required
services:
- docker
compiler:
- g++
notifications:
email:
on_success: never
on_failure: always
# TODO: we can auto-build and publish this docker image
# see https://docs.docker.com/docker-cloud/builds/automated-build
env:
global:
matrix:
- CONTAINER_NAME="comanche-build-fedora27"
DOCKERIMG="fedora:27"
BOOTSTRAP_FILE="./install-yum.sh"
HOSTMODULE="-v /lib/modules:/lib/modules:ro -v /usr/src:/usr/src:ro"
- CONTAINER_NAME="comanche-build-ubuntu1604"
DOCKERIMG="ubuntu:16.04"
BOOTSTRAP_FILE="./install-apts.sh"
# for local building testing, remember to run git submodule init/update
# https://stackoverflow.com/questions/33013539/docker-loading-kernel-modules
before_install:
- sudo apt-get update
- sudo apt-get install linux-headers-`uname -r`
- docker run -d --name ${CONTAINER_NAME} --privileged --cap-add=ALL
-v $(pwd):/travis ${HOSTMODULE}
${DOCKERIMG}
tail -f /dev/null
- docker ps
- docker exec -t ${CONTAINER_NAME} bash -c "
cd /travis/deps;
${BOOTSTRAP_FILE};"
install:
- docker exec -t ${CONTAINER_NAME} bash -c "
cd /travis;
cd deps;
./fetch-deps.sh"
# note: limit job number to 2 to avoid out-of-memory for rocksdb build
script:
- docker exec -t ${CONTAINER_NAME} bash -c "
cd /travis ;
mkdir build;
cd build;
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=`pwd`/dist .. -DTBB_CI_BUILD=ON -DCOMANCHE_CI_TASK_LIMIT=2 &&
make bootstrap &&
make &&
make install"
after_success:
- echo 'comanche build complete'