diff options
Diffstat (limited to 'util')
-rwxr-xr-x | util/buildbot/buildwin32.sh | 12 | ||||
-rwxr-xr-x | util/buildbot/buildwin64.sh | 12 | ||||
-rwxr-xr-x | util/travis/before_install.sh | 40 | ||||
-rw-r--r-- | util/travis/common.sh | 35 | ||||
-rw-r--r-- | util/travis/lint.sh | 4 | ||||
-rwxr-xr-x | util/travis/script.sh | 19 |
6 files changed, 67 insertions, 55 deletions
diff --git a/util/buildbot/buildwin32.sh b/util/buildbot/buildwin32.sh index d807003d2..26f43b235 100755 --- a/util/buildbot/buildwin32.sh +++ b/util/buildbot/buildwin32.sh @@ -16,13 +16,13 @@ toolchain_file=$dir/toolchain_mingw.cmake irrlicht_version=1.8.4 ogg_version=1.3.2 vorbis_version=1.3.5 -curl_version=7.50.3 +curl_version=7.54.0 gettext_version=0.19.8.1 -freetype_version=2.7 -sqlite3_version=3.14.2 -luajit_version=2.1.0-beta2 -leveldb_version=1.18 -zlib_version=1.2.8 +freetype_version=2.8 +sqlite3_version=3.19.2 +luajit_version=2.1.0-beta3 +leveldb_version=1.19 +zlib_version=1.2.11 mkdir -p $packagedir mkdir -p $libdir diff --git a/util/buildbot/buildwin64.sh b/util/buildbot/buildwin64.sh index 3d6965f1e..31d9aad7a 100755 --- a/util/buildbot/buildwin64.sh +++ b/util/buildbot/buildwin64.sh @@ -16,13 +16,13 @@ toolchain_file=$dir/toolchain_mingw64.cmake irrlicht_version=1.8.4 ogg_version=1.3.2 vorbis_version=1.3.5 -curl_version=7.50.3 +curl_version=7.54.0 gettext_version=0.19.8.1 -freetype_version=2.7 -sqlite3_version=3.14.2 -luajit_version=2.1.0-beta2 -leveldb_version=1.18 -zlib_version=1.2.8 +freetype_version=2.8 +sqlite3_version=3.19.2 +luajit_version=2.1.0-beta3 +leveldb_version=1.19 +zlib_version=1.2.11 mkdir -p $packagedir mkdir -p $libdir diff --git a/util/travis/before_install.sh b/util/travis/before_install.sh index a4328fa46..afc16c332 100755 --- a/util/travis/before_install.sh +++ b/util/travis/before_install.sh @@ -1,49 +1,33 @@ #!/bin/bash -e + echo "Preparing for $TRAVIS_COMMIT_RANGE" -if [[ "$LINT" == "1" ]]; then - curl http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - - sudo add-apt-repository "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.9 main" - sudo apt-get -yq update - sudo apt-get install clang-format-3.9 +. util/travis/common.sh + +if [[ "${LINT}" == "1" ]]; then exit 0 fi -. util/travis/common.sh needs_compile || exit 0 -if [[ $TRAVIS_OS_NAME == "linux" ]]; then - sudo apt-get update - sudo apt-get install p7zip-full $COMPILER -fi - if [[ $PLATFORM == "Unix" ]]; then if [[ $TRAVIS_OS_NAME == "linux" ]]; then - sudo apt-get update - sudo apt-get install libirrlicht-dev cmake libbz2-dev libpng12-dev \ - libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev \ - libhiredis-dev libogg-dev libgmp-dev libvorbis-dev libopenal-dev \ - gettext libpq-dev postgresql-server-dev-all - # Linking to LevelDB is broken, use a custom build - wget http://minetest.kitsunemimi.pw/libleveldb-1.18-ubuntu12.04.7z - sudo 7z x -o/usr libleveldb-1.18-ubuntu12.04.7z - if [[ "$VALGRIND" == "1" ]]; then - sudo apt-get install valgrind - fi - + install_linux_deps else - brew update - brew install freetype gettext hiredis irrlicht jpeg leveldb libogg libvorbis luajit - #brew upgrade postgresql + install_macosx_deps fi elif [[ $PLATFORM == "Win32" ]]; then - wget http://minetest.kitsunemimi.pw/mingw_w64_i686_ubuntu12.04_4.9.1.7z -O mingw.7z + 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 - wget http://minetest.kitsunemimi.pw/mingw_w64_x86_64_ubuntu12.04_4.9.1.7z -O mingw.7z + 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 diff --git a/util/travis/common.sh b/util/travis/common.sh index 35ceec08d..a5b2de728 100644 --- a/util/travis/common.sh +++ b/util/travis/common.sh @@ -1,5 +1,40 @@ #!/bin/bash -e +set_linux_compiler_env() { + if [[ "${COMPILER}" == "gcc-5.1" ]]; then + export CC=gcc-5.1 + export CXX=g++-5.1 + elif [[ "${COMPILER}" == "gcc-6" ]]; then + export CC=gcc-6 + export CXX=g++-6 + elif [[ "${COMPILER}" == "gcc-7" ]]; then + export CC=gcc-7 + export CXX=g++-7 + 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 + fi +} + +# Linux build only +install_linux_deps() { + sudo apt-get update + sudo apt-get install libirrlicht-dev cmake libbz2-dev libpng12-dev \ + libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev \ + libhiredis-dev libogg-dev libgmp-dev libvorbis-dev libopenal-dev \ + gettext libpq-dev libleveldb-dev +} + +# Mac OSX build only +install_macosx_deps() { + brew update + brew install freetype gettext hiredis irrlicht jpeg leveldb libogg libvorbis luajit + #brew upgrade postgresql +} + # Relative to git-repository root: TRIGGER_COMPILE_PATHS="src/.*\.(c|cpp|h)|CMakeLists.txt|cmake/Modules/|util/travis/|util/buildbot/" diff --git a/util/travis/lint.sh b/util/travis/lint.sh index cd5f41779..555cf3ebe 100644 --- a/util/travis/lint.sh +++ b/util/travis/lint.sh @@ -1,8 +1,8 @@ #! /bin/bash function perform_lint() { echo "Performing LINT..." - if hash clang-format-3.9 2>/dev/null; then - CLANG_FORMAT=clang-format-3.9 + if hash clang-format-4.0 2>/dev/null; then + CLANG_FORMAT=clang-format-4.0 else CLANG_FORMAT=clang-format fi 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 |