-
Notifications
You must be signed in to change notification settings - Fork 8
/
.travis.yml
40 lines (32 loc) · 2.28 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
language: c
os:
- linux
- osx
matrix:
include:
- os: linux
dist: trusty
sudo: required
before_install:
# Linux
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo wget -nv -O /etc/apt/trusted.gpg.d/debian-farsightsec.gpg https://dl.farsightsecurity.com/debian/archive.pubkey; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo sh -c 'echo "deb [arch=amd64] http://dl.farsightsecurity.com/debian wheezy-farsightsec main" > /etc/apt/sources.list.d/debian-farsightsec.list'; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo sh -c 'echo "deb [arch=amd64] http://dl.farsightsecurity.com/debian wheezy-farsightsec-staging main" >> /etc/apt/sources.list.d/debian-farsightsec.list'; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get -qy update; fi
# OS X
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; fi
install:
# Linux
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qy libpcap0.8-dev libxs-dev zlib1g-dev docbook5-xml docbook-xsl-ns xsltproc libjson-c-dev libwdns-dev; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$(lsb_release -sc)" == "precise" ]; then sudo apt-get install -qy libprotobuf-c-dev protobuf-c-compiler; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$(lsb_release -sc)" == "trusty" ]; then sh -c 'wget -nv https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz && tar xf protobuf-2.6.1.tar.gz && cd protobuf-2.6.1 && ./configure --prefix=/usr && make && sudo make install'; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$(lsb_release -sc)" == "trusty" ]; then sh -c 'git clone -b next https://github.com/protobuf-c/protobuf-c.git && cd protobuf-c && ./autogen.sh && ./configure --prefix=/usr && make && sudo make install'; fi
# OS X
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install protobuf-c; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install json-c; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then sh -c 'git clone https://github.com/farsightsec/wdns.git && cd wdns && ./autogen.sh && ./configure && make && sudo make install'; fi
script:
# Linux
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then ./autogen.sh && ./configure && make && make clean && make distcheck; fi
# OS X
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then ./autogen.sh && ./configure --without-libxs && make; fi