From: Vincent Bernat Date: Sun, 2 Mar 2014 23:30:17 +0000 (+0100) Subject: travis: put installation and test instructions into shell scripts X-Git-Tag: 0.7.8~38 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ed9e6f4143056ce39bdde4d2a4f626b76c163dbd;p=thirdparty%2Flldpd.git travis: put installation and test instructions into shell scripts --- diff --git a/.travis.yml b/.travis.yml index fbea7996..479fa408 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,13 +6,9 @@ compiler: - clang - gcc install: - - [[ "$(uname -s)" != "Darwin" ]] || sudo apt-get -qqy update - - [[ "$(uname -s)" != "Darwin" ]] || sudo apt-get -qqy install automake autoconf libtool pkg-config - - [[ "$(uname -s)" != "Darwin" ]] || sudo apt-get -qqy install libsnmp-dev libxml2-dev libjansson-dev libevent-dev libreadline-dev libbsd-dev check - - [[ "$(uname -s)" == "Darwin" ]] && brew update - - [[ "$(uname -s)" == "Darwin" ]] && brew install pkg-config autoconf automake libtool - - [[ "$(uname -s)" == "Darwin" ]] && brew install readline libevent net-snmp jansson libxml2 check -script: ./autogen.sh && ./configure $LLDPD_CONFIG_ARGS && make && make check && make distcheck && sudo make install + - ./.travis/install.sh +script: + - ./.travis/run.sh env: - LLDPD_CONFIG_ARGS="" - LLDPD_CONFIG_ARGS="--with-embedded-libevent" diff --git a/.travis/install.sh b/.travis/install.sh new file mode 100755 index 00000000..4a5ec264 --- /dev/null +++ b/.travis/install.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +set -e + +case "$(uname -s)" in + Darwin) + brew update + brew install \ + pkg-config autoconf automake libtool \ + readline libevent net-snmp jansson libxml2 check + ;; + *) + sudo apt-get -qqy update + sudo apt-get -qqy install \ + automake autoconf libtool pkg-config \ + libsnmp-dev libxml2-dev libjansson-dev \ + libevent-dev libreadline-dev libbsd-dev \ + check + ;; +esac diff --git a/.travis/run.sh b/.travis/run.sh new file mode 100755 index 00000000..810663ff --- /dev/null +++ b/.travis/run.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +set -e + +./autogen.sh +./configure $LLDPD_CONFIG_ARGS +make +make check +make distcheck +sudo make install