summaryrefslogtreecommitdiff
path: root/travis.sh
diff options
context:
space:
mode:
authorAlan Antonuk <alan.antonuk@gmail.com>2015-06-06 23:19:51 -0700
committerAlan Antonuk <alan.antonuk@gmail.com>2015-06-06 23:19:51 -0700
commit91db548a93f2ba09b4d1f168f247c89731932a5a (patch)
treeb17c0836be5df40f1da81e9de77417544f5dd39d /travis.sh
parent45caaefb97a09ef41881e69203b30433c1f2069e (diff)
downloadrabbitmq-c-91db548a93f2ba09b4d1f168f247c89731932a5a.tar.gz
ci: add travis.sh for running various ci configs.
Diffstat (limited to 'travis.sh')
-rwxr-xr-xtravis.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/travis.sh b/travis.sh
new file mode 100755
index 0000000..aab940a
--- /dev/null
+++ b/travis.sh
@@ -0,0 +1,25 @@
+#!/usr/bin/env bash
+
+build_autotools() {
+ autoreconf -i
+ ./configure --prefix=$PWD/_install
+ make install
+}
+
+build_cmake() {
+ mkdir $PWD/_build
+ cd $PWD/_build
+ cmake .. -DCMAKE_INSTALL_PREFIX=$PWD/../_install
+ cmake --build . --target install
+ ctest -V .
+}
+
+if [ "$#" -ne 1 ]; then
+ echo "Usage: $0 {autotools|cmake}"
+ exit 1
+fi
+
+set -e # exit on error.
+set -x # echo commands.
+
+eval "build_$1"