forked from skydive-project/skydive
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path.travis.yml
51 lines (42 loc) · 1.74 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
language: go
go_import_path: github.com/skydive-project/skydive
go:
- 1.6
sudo: required
dist: trusty
before_install:
- sudo apt-get -qq update
- sudo apt-get install -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y openvswitch-switch unzip docker.io build-essential flex bison libxml2-dev libz-dev liblzma-dev libicu-dev libc++-dev bridge-utils libdb5.1-dev
- sudo ovs-vsctl show
- go get github.com/mattn/goveralls
- go get golang.org/x/tools/cmd/cover
- git clone https://github.com/the-tcpdump-group/libpcap.git
- cd libpcap
- git checkout libpcap-1.5.3
- ./configure --prefix=/usr/local --disable-shared --disable-dbus --disable-bluetooth --disable-canusb
- make
- sudo make install
- cd ..
- wget https://www.kernel.org/pub/linux/utils/net/iproute2/iproute2-4.0.0.tar.gz
- tar -xvzf iproute2-4.0.0.tar.gz
- cd iproute2-4.0.0
- make
- sudo make install
- cd ..
- mkdir ${HOME}/protoc
- pushd ${HOME}/protoc
- wget https://github.com/google/protobuf/releases/download/v3.1.0/protoc-3.1.0-linux-x86_64.zip
- unzip protoc-3.1.0-linux-x86_64.zip
- popd
- export PATH=${HOME}/protoc/bin:${PATH}
script:
- export BUILD_TAG=$(date +%Y-%m-%d).${TRAVIS_JOB_NUMBER}
- make install
- make static
- ./coverage.sh --coveralls
- echo "--- DOCKER IMAGE ---"
- make docker-image DOCKER_IMAGE=${DOCKER_IMAGE} DOCKER_TAG=${BUILD_TAG}
- sudo -E docker login -e "${DOCKER_EMAIL}" -u "${DOCKER_USERNAME}" -p "${DOCKER_PASSWORD}"
- sudo -E docker tag ${DOCKER_IMAGE}:${BUILD_TAG} ${DOCKER_IMAGE}:latest
- sudo -E docker push docker.io/${DOCKER_IMAGE}:${BUILD_TAG}
- sudo -E docker push docker.io/${DOCKER_IMAGE}:latest