diff options
author | Alan Antonuk <alan.antonuk@gmail.com> | 2015-06-06 23:19:51 -0700 |
---|---|---|
committer | Alan Antonuk <alan.antonuk@gmail.com> | 2015-06-06 23:19:51 -0700 |
commit | 91db548a93f2ba09b4d1f168f247c89731932a5a (patch) | |
tree | b17c0836be5df40f1da81e9de77417544f5dd39d /travis.sh | |
parent | 45caaefb97a09ef41881e69203b30433c1f2069e (diff) | |
download | rabbitmq-c-91db548a93f2ba09b4d1f168f247c89731932a5a.tar.gz |
ci: add travis.sh for running various ci configs.
Diffstat (limited to 'travis.sh')
-rwxr-xr-x | travis.sh | 25 |
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" |