g3log/scripts/buildAndRunTests.sh
Murat Kilivan 68f3b174d9
Use CMake to download GoogleTest as part of build (#355)
Having GoogleTest source in the project means we are likely using a stale version of test. This change is to use CMake to download GoogleTest as part of the build's configuration step.
2020-06-03 15:37:46 -06:00

27 lines
540 B
Bash
Executable File

#!/bin/bash
set -ev
set -x
mkdir -p build_travis
cd build_travis
cmake -DADD_G3LOG_BENCH_PERFORMANCE=ON -DADD_G3LOG_UNIT_TEST=ON -DCMAKE_INSTALL_PREFIX=./install -DCPACK_PACKAGING_INSTALL_PREFIX=/opt/g3log ..
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
#makeArg=`grep -c ^processor /proc/cpuinfo`
make -j
/bin/bash ../scripts/runAllTests.sh