minetest/util/travis/before_install.sh
Loïc Blot d88c4e1822
LINT: add clang-tidy step (#6295)
* Implement new travis clang-tidy build step

* This step enable some rules and enforce one rule as error
* This permits to have some C++ quality rules based on clang & clang contributor guidelines

* Fix clang-tidy reported problems on push_back -> emplace_back
2018-04-01 23:57:55 +02:00

36 lines
1.1 KiB
Bash
Executable File

#!/bin/bash -e
echo "Preparing for $TRAVIS_COMMIT_RANGE"
. util/travis/common.sh
if [[ "${LINT}" == "1" ]]; then
exit 0
fi
needs_compile || exit 0
if [[ $PLATFORM == "Unix" ]] || [[ $CLANG_TIDY == "1" ]]; then
if [[ $TRAVIS_OS_NAME == "linux" ]] || [[ $CLANG_TIDY == "1" ]]; then
install_linux_deps
else
install_macosx_deps
fi
elif [[ $PLATFORM == "Win32" ]]; then
sudo apt-get update
sudo apt-get install p7zip-full
wget http://minetest.kitsunemimi.pw/mingw-w64-i686_7.1.1_ubuntu14.04.7z -O mingw.7z
sed -e "s|%PREFIX%|i686-w64-mingw32|" \
-e "s|%ROOTPATH%|/usr/i686-w64-mingw32|" \
< util/travis/toolchain_mingw.cmake.in > util/buildbot/toolchain_mingw.cmake
sudo 7z x -y -o/usr mingw.7z
elif [[ $PLATFORM == "Win64" ]]; then
sudo apt-get update
sudo apt-get install p7zip-full
wget http://minetest.kitsunemimi.pw/mingw-w64-x86_64_7.1.1_ubuntu14.04.7z -O mingw.7z
sed -e "s|%PREFIX%|x86_64-w64-mingw32|" \
-e "s|%ROOTPATH%|/usr/x86_64-w64-mingw32|" \
< util/travis/toolchain_mingw.cmake.in > util/buildbot/toolchain_mingw64.cmake
sudo 7z x -y -o/usr mingw.7z
fi