.travis.yml 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. # Travis-CI configuration file for SuperTuxKart
  2. #
  3. # Configuration manual:
  4. # http://docs.travis-ci.com/user/build-configuration/
  5. #
  6. # Heavily borrowed from SuperTuxKart's travis.yml.
  7. #
  8. # SuperTuxKart's travis.yml file can be found here:
  9. # https://github.com/supertuxkart/stk-code/blob/master/.travis.yml
  10. # License: https://github.com/supertuxkart/stk-code/blob/master/COPYING
  11. #
  12. language: cpp
  13. compiler:
  14. - gcc
  15. - clang
  16. matrix:
  17. fast_finish: true
  18. env:
  19. global:
  20. # The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
  21. # via the "travis encrypt" command using the project repo's public key
  22. - secure: "eVEyzIVjDlB16EPkXmj74tyF9pgX34kpgvBUMXJJ+hduuPwaGC6vl8T164fNQUIua2Z2/PqxmTLJRR3n5Bbkdf859NdX+4JUzc3SoFEKlgcLMYnOQeuimUAiMKxe4vmC4sub5LZVFsp9ORzVYkXgiMBnxiD5GuYxvZPy1lCaH9E="
  23. - CMAKE_VERSION=3.3.2 SDL2_VERSION=2.0.3 SDL2IMAGE_VERSION=2.0.0 GLBINDING_VERSION=1.1.0
  24. matrix:
  25. - BUILD_TYPE="Debug"
  26. - BUILD_TYPE="Release"
  27. - USE_GLBINDING=OFF
  28. # glbinding fails to compile on clang:
  29. #- USE_GLBINDING=ON
  30. before_install:
  31. - sudo apt-get update -qq
  32. - sudo apt-get install build-essential libogg-dev libvorbis-dev libphysfs-dev libglew-dev libopenal-dev libboost-all-dev
  33. # Current gcc that supports C++ 11 features
  34. - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
  35. - sudo apt-get update -qq
  36. - if [ "$CXX" = "g++" ]; then sudo apt-get install -qq g++-4.9; fi
  37. - if [ "$CXX" = "g++" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi
  38. # CMake
  39. - wget http://www.cmake.org/files/v3.3/cmake-$CMAKE_VERSION.tar.gz -O - | tar xz
  40. - (cd cmake-$CMAKE_VERSION && cmake . && make -j3 && sudo make install)
  41. # SDL dependencies
  42. - wget http://libsdl.org/release/SDL2-$SDL2_VERSION.tar.gz -O - | tar xz
  43. - (cd SDL2-$SDL2_VERSION && ./configure --prefix=/usr && make -j3 && sudo make install)
  44. - wget http://www.libsdl.org/projects/SDL_image/release/SDL2_image-$SDL2IMAGE_VERSION.tar.gz -O - | tar xz
  45. - (cd SDL2_image-$SDL2IMAGE_VERSION && ./configure --prefix=/usr && make -j3 && sudo make install)
  46. # Try building with GLBinding
  47. # Note: glbindings ./configure needs to be run twice in order to generate a makefile
  48. - if [ "$USE_GLBINDING" = "ON" ]; then
  49. wget https://github.com/cginternals/glbinding/archive/v$GLBINDING_VERSION.tar.gz -O - | tar xz;
  50. cd glbinding-$GLBINDING_VERSION && ./configure --prefix=/usr && ./configure --prefix=/usr;
  51. cd build && make -j3 && sudo make install;
  52. cd ../..;
  53. fi
  54. script:
  55. # Clean from previous Travis build
  56. - git clean -f
  57. # Then build:
  58. - mkdir "build-$BUILD_TYPE"
  59. - cd "build-$BUILD_TYPE"
  60. - cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DWARNINGS=ON -DWERROR=ON -DGLBINDING_ENABLED=$USE_GLBINDING
  61. - make VERBOSE=1 -j3
  62. addons:
  63. coverity_scan:
  64. project:
  65. name: "SuperTux/supertux"
  66. description: "Build submitted via Travis CI"
  67. notification_email: supertux-commit@lists.lethargik.org
  68. build_command_prepend: "cmake . && make clean"
  69. build_command: "make -j 3"
  70. branch_pattern: coverity_scan
  71. notifications:
  72. email:
  73. - supertux-commit@lists.lethargik.org