diff options
author | ShadowNinja <shadowninja@minetest.net> | 2017-06-03 14:55:10 -0400 |
---|---|---|
committer | ShadowNinja <shadowninja@minetest.net> | 2017-06-03 14:55:10 -0400 |
commit | caecdb681c428c1aab9c0f7eec2570c0460f995c (patch) | |
tree | e5115982ea59bbf2343ba9b35bc4a0cfbb56f407 /util/travis/script.sh | |
parent | 81d56b94919dceb7b2e51d70b21a7ca22f852bd5 (diff) | |
parent | 80dc961d24e1964e25d57039ddb2ba639f9f4d22 (diff) | |
download | minetest-caecdb681c428c1aab9c0f7eec2570c0460f995c.tar.gz minetest-caecdb681c428c1aab9c0f7eec2570c0460f995c.tar.bz2 minetest-caecdb681c428c1aab9c0f7eec2570c0460f995c.zip |
Merge 0.4.16 into stable-0.4
Diffstat (limited to 'util/travis/script.sh')
-rwxr-xr-x | util/travis/script.sh | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/util/travis/script.sh b/util/travis/script.sh index 1bafb26cd..14b8dfb73 100755 --- a/util/travis/script.sh +++ b/util/travis/script.sh @@ -1,30 +1,49 @@ #!/bin/bash -e . util/travis/common.sh +. util/travis/lint.sh needs_compile || exit 0 +if [[ "$LINT" == "1" ]]; then + # Lint with exit CI + perform_lint + exit 0 +fi + 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 CMAKE_FLAGS+=' -DCUSTOM_GETTEXT_PATH=/usr/local/opt/gettext' fi + cmake -DCMAKE_BUILD_TYPE=Debug \ -DRUN_IN_PLACE=TRUE \ -DENABLE_GETTEXT=TRUE \ + -DBUILD_SERVER=TRUE \ $CMAKE_FLAGS .. make -j2 + echo "Running unit tests." - ../bin/minetest --run-unittests && exit 0 + CMD="../bin/minetest --run-unittests" + 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 + fi + elif [[ $PLATFORM == Win* ]]; then [[ $CC == "clang" ]] && exit 1 # Not supposed to happen # We need to have our build directory outside of the minetest directory because |