From ed9e6f4143056ce39bdde4d2a4f626b76c163dbd Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Mon, 3 Mar 2014 00:30:17 +0100 Subject: [PATCH] travis: put installation and test instructions into shell scripts --- .travis.yml | 10 +++------- .travis/install.sh | 20 ++++++++++++++++++++ .travis/run.sh | 10 ++++++++++ 3 files changed, 33 insertions(+), 7 deletions(-) create mode 100755 .travis/install.sh create mode 100755 .travis/run.sh 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 -- 2.39.5