before_install.sh 1003 B

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/bash -e
  2. echo "Preparing for $TRAVIS_COMMIT_RANGE"
  3. . util/travis/common.sh
  4. if [[ ! -z "${CLANG_FORMAT}" ]]; then
  5. exit 0
  6. fi
  7. needs_compile || exit 0
  8. if [[ $PLATFORM == "Unix" ]] || [[ ! -z "${CLANG_TIDY}" ]]; then
  9. if [[ $TRAVIS_OS_NAME == "linux" ]] || [[ ! -z "${CLANG_TIDY}" ]]; then
  10. install_linux_deps
  11. else
  12. install_macosx_deps
  13. fi
  14. elif [[ $PLATFORM == "Win32" ]]; then
  15. sudo apt-get update
  16. sudo apt-get install p7zip-full
  17. wget http://minetest.kitsunemimi.pw/mingw-w64-i686_7.1.1_ubuntu14.04.7z -O mingw.7z
  18. # buildwin32.sh detects the installed toolchain automatically
  19. sudo 7z x -y -o/usr mingw.7z
  20. elif [[ $PLATFORM == "Win64" ]]; then
  21. sudo apt-get update
  22. sudo apt-get install p7zip-full
  23. wget http://minetest.kitsunemimi.pw/mingw-w64-x86_64_7.1.1_ubuntu14.04.7z -O mingw.7z
  24. sed -e "s|%PREFIX%|x86_64-w64-mingw32|" \
  25. -e "s|%ROOTPATH%|/usr/x86_64-w64-mingw32|" \
  26. < util/travis/toolchain_mingw.cmake.in > util/buildbot/toolchain_mingw64.cmake
  27. sudo 7z x -y -o/usr mingw.7z
  28. fi