ci: Extract prepare_build() from build_nvim()

This commit is contained in:
ZyX 2016-09-10 22:48:45 +03:00
parent 4a511de881
commit da2139296d
2 changed files with 6 additions and 3 deletions

View File

@ -37,7 +37,7 @@ build_deps() {
cd "${TRAVIS_BUILD_DIR}"
}
build_nvim() {
prepare_build() {
if [[ -n "${CLANG_SANITIZER}" ]]; then
CMAKE_FLAGS="${CMAKE_FLAGS} -DCLANG_${CLANG_SANITIZER}=ON"
fi
@ -47,9 +47,11 @@ build_nvim() {
mkdir -p "${BUILD_DIR}"
cd "${BUILD_DIR}"
echo "Configuring with '${CMAKE_FLAGS}'."
cmake ${CMAKE_FLAGS} "${TRAVIS_BUILD_DIR}"
echo "Configuring with '${CMAKE_FLAGS} $@'."
cmake ${CMAKE_FLAGS} "$@" "${TRAVIS_BUILD_DIR}"
}
build_nvim() {
echo "Building nvim."
if ! ${MAKE_CMD} nvim; then
exit 1

View File

@ -7,6 +7,7 @@ CI_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "${CI_DIR}/common/build.sh"
source "${CI_DIR}/common/test.sh"
prepare_build
build_nvim
if [ "$CLANG_SANITIZER" != "TSAN" ]; then