2014-10-12 04:16:54 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -ev
|
2017-03-31 06:52:09 +02:00
|
|
|
set -x
|
2014-10-12 07:00:18 +02:00
|
|
|
|
|
|
|
|
2014-12-12 10:05:51 +01:00
|
|
|
mkdir -p build_travis
|
2014-10-12 07:00:18 +02:00
|
|
|
cd build_travis
|
2020-06-03 23:37:46 +02:00
|
|
|
cmake -DADD_G3LOG_BENCH_PERFORMANCE=ON -DADD_G3LOG_UNIT_TEST=ON -DCMAKE_INSTALL_PREFIX=./install -DCPACK_PACKAGING_INSTALL_PREFIX=/opt/g3log ..
|
2019-05-14 06:42:15 +02:00
|
|
|
cmake --build . --target install
|
|
|
|
|
|
|
|
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
|
|
|
cpack -G "ZIP"
|
|
|
|
unzip g3log-*-Darwin.zip
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
|
|
|
cpack -G "DEB;TGZ"
|
|
|
|
tar zxvf g3log-*-Linux.tar.gz
|
|
|
|
fi
|
2016-08-11 08:27:52 +02:00
|
|
|
|
2020-06-19 21:49:30 +02:00
|
|
|
# LINUX OR OSX
|
|
|
|
makeArg=`grep -c ^processor /proc/cpuinfo || sysctl -n hw.ncpu`
|
2016-08-11 08:27:52 +02:00
|
|
|
|
2020-06-19 21:49:30 +02:00
|
|
|
make -j$makeArg
|
|
|
|
ctest -V
|
2016-08-11 08:27:52 +02:00
|
|
|
|