diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2017-04-25 17:21:38 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2017-04-25 17:21:38 +0200 |
commit | c46113823e5bde62ef5a1ff53ec26d954b3ff53e (patch) | |
tree | d0cb8ca3fb43c3d97abbb0cfa2451ea92263bd1c /dist/travis/script.sh | |
parent | 6753ffb46d7eeda1d4d6939257397ce9306e4946 (diff) | |
download | cssh-c46113823e5bde62ef5a1ff53ec26d954b3ff53e.tar.gz cssh-c46113823e5bde62ef5a1ff53ec26d954b3ff53e.tar.bz2 |
added CI on Travis
Diffstat (limited to 'dist/travis/script.sh')
-rw-r--r-- | dist/travis/script.sh | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/dist/travis/script.sh b/dist/travis/script.sh new file mode 100644 index 0000000..55c6890 --- /dev/null +++ b/dist/travis/script.sh @@ -0,0 +1,41 @@ +#!/bin/sh + +set -e + +OS=$(uname -s) + +case $OS in + Linux) + mkdir build + cd build + cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \ + -DLIB_INSTALL_DIR=lib -DCMAKE_CXX_FLAGS=-g \ + .. + make VERBOSE=1 + make VERBOSE=1 test + sudo make VERBOSE=1 install + cd .. + ;; + + Darwin) + # forcing brew versions (of gettext) over Mac versions + export CFLAGS=-I/usr/local + export CXXFLAGS=-I/usr/local + export LDFLAGS=-L/usr/local/lib + mkdir build + cd build + cmake \ + -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_FLAGS=-g -G Xcode \ + .. + xcodebuild -configuration Release -target ALL_BUILD + xcodebuild -configuration Release -target RUN_TESTS + sudo xcodebuild -configuration Release -target install + cd .. + ;; + + *) + echo "ERROR: unknown operating system '$OS'." + ;; +esac + |