before_install.sh 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #!/bin/bash -e
  2. echo "Preparing for $TRAVIS_COMMIT_RANGE"
  3. . util/travis/common.sh
  4. if [[ "${LINT}" == "1" ]]; then
  5. exit 0
  6. fi
  7. needs_compile || exit 0
  8. if [[ $PLATFORM == "Unix" ]] || [[ $CLANG_TIDY == "1" ]]; then
  9. if [[ $TRAVIS_OS_NAME == "linux" ]] || [[ $CLANG_TIDY == "1" ]]; 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. sed -e "s|%PREFIX%|i686-w64-mingw32|" \
  19. -e "s|%ROOTPATH%|/usr/i686-w64-mingw32|" \
  20. < util/travis/toolchain_mingw.cmake.in > util/buildbot/toolchain_mingw.cmake
  21. sudo 7z x -y -o/usr mingw.7z
  22. elif [[ $PLATFORM == "Win64" ]]; then
  23. sudo apt-get update
  24. sudo apt-get install p7zip-full
  25. wget http://minetest.kitsunemimi.pw/mingw-w64-x86_64_7.1.1_ubuntu14.04.7z -O mingw.7z
  26. sed -e "s|%PREFIX%|x86_64-w64-mingw32|" \
  27. -e "s|%ROOTPATH%|/usr/x86_64-w64-mingw32|" \
  28. < util/travis/toolchain_mingw.cmake.in > util/buildbot/toolchain_mingw64.cmake
  29. sudo 7z x -y -o/usr mingw.7z
  30. fi