-
Notifications
You must be signed in to change notification settings - Fork 19
/
.travis.yml
51 lines (43 loc) · 1.21 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
# Build matrix / environment variables are explained on:
# http://about.travis-ci.org/docs/user/build-configuration/
# This file can be validated on: http://lint.travis-ci.org/
language: cpp
compiler:
- g++
os:
- linux
addons:
apt:
packages:
- g++-4.9
env:
- DTC_EVAL="CC=gcc-4.9 && CXX=g++-4.9"
before_install:
- eval "${DTC_EVAL}"
install:
- echo ${CC}
- ${CC} --version
- echo ${CXX}
- ${CXX} --version
- cmake --version
- sudo apt-get install snappy libsnappy-dev zlib1g zlib1g-dev bzip2 liblz4-dev libasan0 openssl libmxml-dev
script:
- mkdir build/
- cd build/
- cmake -DCMAKE_TEST_OPTION=ON ../
- make
after_success:
- cd ../
- cp conf/* dockerfiles/server/
- cp build/src/core/dtcd dockerfiles/server/
- cp build/src/agent/agent-main dockerfiles/agent/
- cp conf/agent.xml dockerfiles/agent/
- cp build/src/connector/connector dockerfiles/server/
- cp build/src/hwcserver/hwcserver dockerfiles/server/
- cd dockerfiles/server/
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker build -t $DOCKER_USERNAME/server:latest .
- docker push $DOCKER_USERNAME/server:latest
- cd ../agent/
- docker build -t $DOCKER_USERNAME/agent:latest .
- docker push $DOCKER_USERNAME/agent:latest