.travis.yml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. # Travis-CI configuration file for SuperTux
  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. dist: trusty
  14. sudo: required
  15. compiler:
  16. - gcc
  17. - clang
  18. matrix:
  19. fast_finish: true
  20. exclude:
  21. - compiler: gcc
  22. os: osx
  23. os:
  24. - linux
  25. - osx
  26. env:
  27. global:
  28. # The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
  29. # via the "travis encrypt" command using the project repo's public key
  30. - secure: "eVEyzIVjDlB16EPkXmj74tyF9pgX34kpgvBUMXJJ+hduuPwaGC6vl8T164fNQUIua2Z2/PqxmTLJRR3n5Bbkdf859NdX+4JUzc3SoFEKlgcLMYnOQeuimUAiMKxe4vmC4sub5LZVFsp9ORzVYkXgiMBnxiD5GuYxvZPy1lCaH9E="
  31. # BINTRAY_KEY env var
  32. - secure: "E++FmjzZZrvkJpUHZajLUaO1wd0QHcyVidVx8qVeGUJm/khCPBJuhkSe6R2BphcBeeAuhVlsXo26SWCAn89r2KT2OHB/lwtK2CWhO5vOl5bI5o4nFc+m55e2gDIebSBrXQPITEQJpQx1zBL4FVw/A2xQRl+IcjF/EiIzG8Znslc="
  33. - GLBINDING_VERSION=2.1.1
  34. matrix:
  35. - BUILD_TYPE="Debug"
  36. - BUILD_TYPE="Release"
  37. - USE_GLBINDING=OFF
  38. - USE_GLBINDING=ON
  39. before_install:
  40. - if [ "$TRAVIS_OS_NAME" = "osx" ]; then
  41. brew update;
  42. brew upgrade cmake;
  43. brew install libogg libvorbis glew openal-soft sdl2 sdl2_image;
  44. fi
  45. # Try building with GLBinding
  46. # Note: glbindings ./configure needs to be run twice in order to generate a makefile
  47. - if [ "$USE_GLBINDING" = "ON" ]; then
  48. wget https://github.com/cginternals/glbinding/archive/v$GLBINDING_VERSION.tar.gz -O - | tar xz;
  49. cd glbinding-$GLBINDING_VERSION && ./configure --prefix=/usr && ./configure --prefix=/usr;
  50. cd build && make -j3 && sudo make install;
  51. cd ../..;
  52. fi
  53. # Fetch the entire git history
  54. - git fetch --unshallow
  55. script:
  56. - mkdir "build-$BUILD_TYPE"
  57. - cd "build-$BUILD_TYPE"
  58. - cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DWARNINGS=ON -DWERROR=ON -DGLBINDING_ENABLED=$USE_GLBINDING -DBUILD_TESTS=ON
  59. - make -j3
  60. - make install DESTDIR="/tmp/supertux-$BUILD_TYPE"
  61. - ./test_supertux2
  62. after_success:
  63. - ../.travis/package.sh
  64. deploy:
  65. - provider: script
  66. script: ../.travis/deploy.sh
  67. skip_cleanup: true
  68. on:
  69. branch: master
  70. condition: $BUILD_TYPE = Release
  71. addons:
  72. apt:
  73. packages:
  74. - cmake
  75. - build-essential
  76. - libc++-dev
  77. - libogg-dev
  78. - libvorbis-dev
  79. - libglew-dev
  80. - libopenal-dev
  81. - libboost-all-dev
  82. - libsdl2-dev
  83. - libsdl2-image-dev
  84. - rpm
  85. - sshpass
  86. coverity_scan:
  87. project:
  88. name: "SuperTux/supertux"
  89. description: "Build submitted via Travis CI"
  90. notification_email: supertux-commit@lists.lethargik.org
  91. build_command_prepend: "cmake . && make clean"
  92. build_command: "make -j 3"
  93. branch_pattern: coverity_scan
  94. notifications:
  95. email:
  96. - supertux-commit@lists.lethargik.org
  97. slack:
  98. secure: cH9u9+EfaPGIcmIcy06hxp5coMmBSKorgABXwE5M06hWbwL+4SIaAlOf9QhrOPi7TZKyyI5GXh687pWNtrgUzaBFhNrPOa/tIzr6kJryAkoFBRdn0sOsf/xYyDgTUfzS79HLYxdv7KDckmiPcgTxGGJOJ3797HBeKaEeufefzlU=