1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +00:00

Travis: Update clang from 4.0 to 5.0 (#6467)

* Update clang from 4.0 to 5.0
This commit is contained in:
Loïc Blot 2017-10-09 11:32:06 +02:00 committed by GitHub
parent e6e5fa3bf8
commit 17016090e3
12 changed files with 55 additions and 37 deletions

View file

@ -13,9 +13,9 @@ set_linux_compiler_env() {
elif [[ "${COMPILER}" == "clang-3.6" ]]; then
export CC=clang-3.6
export CXX=clang++-3.6
elif [[ "${COMPILER}" == "clang-4.0" ]]; then
export CC=clang-4.0
export CXX=clang++-4.0
elif [[ "${COMPILER}" == "clang-5.0" ]]; then
export CC=clang-5.0
export CXX=clang++-5.0
fi
}
@ -45,7 +45,7 @@ TRIGGER_COMPILE_PATHS="src/.*\.(c|cpp|h)|CMakeLists.txt|cmake/Modules/|util/trav
needs_compile() {
RANGE="$TRAVIS_COMMIT_RANGE"
if [[ "$(git diff --name-only $RANGE -- 2>/dev/null)" == "" ]]; then
if [[ "$(git diff --name-only $RANGE -- 2>/dev/null)" == "" ]]; then
RANGE="$TRAVIS_COMMIT^...$TRAVIS_COMMIT"
echo "Fixed range: $RANGE"
fi

View file

@ -1,8 +1,8 @@
#! /bin/bash
function perform_lint() {
echo "Performing LINT..."
if hash clang-format-4.0 2>/dev/null; then
CLANG_FORMAT=clang-format-4.0
if hash clang-format-5.0 2>/dev/null; then
CLANG_FORMAT=clang-format-5.0
else
CLANG_FORMAT=clang-format
fi