aboutsummaryrefslogtreecommitdiff
path: root/util/travis/script.sh
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2017-05-26 17:03:46 +0200
committerLoïc Blot <nerzhul@users.noreply.github.com>2017-06-04 09:57:08 +0200
commitbf6569b57019d070246d947ed929cb2b5eb67faf (patch)
tree3a8a3d4858f20a57930e0a0d0ad1f7c3fb48b512 /util/travis/script.sh
parent0e58168fe5bce607f64805b854420e7558372f24 (diff)
downloaddragonfireclient-bf6569b57019d070246d947ed929cb2b5eb67faf.tar.xz
Minetest for C++11 (CMakeLists + Travis)
* Move GCC to GCC 6 & GCC 7 * Move Clang to Clang 3.6 & Clang 4.0 * LINT moves from Clang 3.9 to Clang 4.0 * Move XCode 7.3 to 8.0 * Use more travis tricks to install compilers instead of adding complexity to our build script * Clang format fixes on checked files (compat Cpp11 instead of Cpp03) * Mingw GCC update from 4.8.4 to 5.3 (Ubuntu Xenial) * Drop mingw cmake generated files and add them to gitignore
Diffstat (limited to 'util/travis/script.sh')
-rwxr-xr-xutil/travis/script.sh19
1 files changed, 6 insertions, 13 deletions
diff --git a/util/travis/script.sh b/util/travis/script.sh
index 14b8dfb73..e5be1fe32 100755
--- a/util/travis/script.sh
+++ b/util/travis/script.sh
@@ -10,22 +10,15 @@ if [[ "$LINT" == "1" ]]; then
exit 0
fi
-if [[ $PLATFORM == "Unix" ]]; then
+set_linux_compiler_env
+
+if [[ ${PLATFORM} == "Unix" ]]; then
mkdir -p travisbuild
cd travisbuild || exit 1
CMAKE_FLAGS=''
- if [[ $COMPILER == "g++-6" ]]; then
- export CC=gcc-6
- export CXX=g++-6
- fi
-
- # Clang builds with FreeType fail on Travis
- if [[ $CC == "clang" ]]; then
- CMAKE_FLAGS+=' -DENABLE_FREETYPE=FALSE'
- fi
- if [[ $TRAVIS_OS_NAME == "osx" ]]; then
+ if [[ ${TRAVIS_OS_NAME} == "osx" ]]; then
CMAKE_FLAGS+=' -DCUSTOM_GETTEXT_PATH=/usr/local/opt/gettext'
fi
@@ -33,12 +26,12 @@ if [[ $PLATFORM == "Unix" ]]; then
-DRUN_IN_PLACE=TRUE \
-DENABLE_GETTEXT=TRUE \
-DBUILD_SERVER=TRUE \
- $CMAKE_FLAGS ..
+ ${CMAKE_FLAGS} ..
make -j2
echo "Running unit tests."
CMD="../bin/minetest --run-unittests"
- if [[ "$VALGRIND" == "1" ]]; then
+ if [[ "${VALGRIND}" == "1" ]]; then
valgrind --leak-check=full --leak-check-heuristics=all --undef-value-errors=no --error-exitcode=9 ${CMD} && exit 0
else
${CMD} && exit 0