.travis.yml 4.2 KB

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