2020-06-23 17:17:15 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -ex
|
|
|
|
|
|
|
|
ROOTDIR="$(dirname "$0")/../.."
|
|
|
|
cd "${ROOTDIR}"
|
|
|
|
|
|
|
|
# shellcheck disable=SC2166
|
2020-10-14 22:07:45 +00:00
|
|
|
if [ "$CIRCLE_BRANCH" = release -o -n "$CIRCLE_TAG" -o -n "$FORCE_RELEASE" ]; then echo -n >prerelease.txt; fi
|
2020-06-23 17:17:15 +00:00
|
|
|
if [ -n "$CIRCLE_SHA1" ]
|
|
|
|
then
|
|
|
|
echo -n "$CIRCLE_SHA1" >commit_hash.txt
|
|
|
|
fi
|
|
|
|
|
|
|
|
mkdir -p build
|
|
|
|
cd build
|
|
|
|
|
|
|
|
# shellcheck disable=SC2166
|
|
|
|
[ -n "$COVERAGE" -a "$CIRCLE_BRANCH" != release -a -z "$CIRCLE_TAG" ] && CMAKE_OPTIONS="$CMAKE_OPTIONS -DCOVERAGE=ON"
|
|
|
|
|
|
|
|
# shellcheck disable=SC2086
|
|
|
|
cmake .. -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE:-Release}" $CMAKE_OPTIONS -G "Unix Makefiles"
|
|
|
|
|
2020-07-15 10:10:56 +00:00
|
|
|
make
|