.travis.yml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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. - provider: releases
  72. api_key:
  73. secure: oOoWGIvtMne9b413EGv3GSaV8PE/X1P3e85hIdTvRdxs5VTWHi9eeWpEknru8N8hQ+iIkvD2QpUvwL6Qgf7myP3OwXWEf7o6+Qxjfl49oJaROTeVUR7uzOYTmYYTCZG0b3jQKYu5JkVqJzwTNmT0GturHkW5pzsAy/rHUDuLfkI=
  74. file: "SuperTux-*"
  75. file_glob: true
  76. skip_cleanup: true
  77. on:
  78. tags: true
  79. condition: $BUILD_TYPE = Release
  80. addons:
  81. apt:
  82. packages:
  83. - cmake
  84. - build-essential
  85. - libc++-dev
  86. - libogg-dev
  87. - libvorbis-dev
  88. - libglew-dev
  89. - libopenal-dev
  90. - libboost-all-dev
  91. - libsdl2-dev
  92. - libsdl2-image-dev
  93. - rpm
  94. - sshpass
  95. coverity_scan:
  96. project:
  97. name: "SuperTux/supertux"
  98. description: "Build submitted via Travis CI"
  99. notification_email: supertux-commit@lists.lethargik.org
  100. build_command_prepend: "cmake . && make clean"
  101. build_command: "make -j 3"
  102. branch_pattern: coverity_scan
  103. notifications:
  104. email:
  105. - supertux-commit@lists.lethargik.org
  106. slack:
  107. secure: cH9u9+EfaPGIcmIcy06hxp5coMmBSKorgABXwE5M06hWbwL+4SIaAlOf9QhrOPi7TZKyyI5GXh687pWNtrgUzaBFhNrPOa/tIzr6kJryAkoFBRdn0sOsf/xYyDgTUfzS79HLYxdv7KDckmiPcgTxGGJOJ3797HBeKaEeufefzlU=