.travis.yml 3.4 KB

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