.travis.yml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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. - GLBINDING_VERSION=1.1.0
  32. matrix:
  33. - BUILD_TYPE="Debug"
  34. - BUILD_TYPE="Release"
  35. - USE_GLBINDING=OFF
  36. # glbinding fails to compile on clang:
  37. #- USE_GLBINDING=ON
  38. before_install:
  39. - if [ "$TRAVIS_SECURE_ENV_VARS" = "true" ]; then
  40. openssl aes-256-cbc -K $encrypted_d8a9ffcc8634_key -iv $encrypted_d8a9ffcc8634_iv -in .travis/travis-upload.pem.enc -out .travis/travis-upload.pem -d;
  41. fi
  42. - if [ "$TRAVIS_OS_NAME" = "osx" ]; then
  43. brew update;
  44. brew upgrade cmake;
  45. brew install libogg libvorbis physfs glew openal-soft sdl2 sdl2_image;
  46. fi
  47. # Try building with GLBinding
  48. # Note: glbindings ./configure needs to be run twice in order to generate a makefile
  49. - if [ "$USE_GLBINDING" = "ON" ]; then
  50. wget https://github.com/cginternals/glbinding/archive/v$GLBINDING_VERSION.tar.gz -O - | tar xz;
  51. cd glbinding-$GLBINDING_VERSION && ./configure --prefix=/usr && ./configure --prefix=/usr;
  52. cd build && make -j3 && sudo make install;
  53. cd ../..;
  54. fi
  55. script:
  56. - git fetch --unshallow
  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 -DBUILD_TESTS=ON
  61. - make -j3
  62. - make install DESTDIR="/tmp/supertux-$BUILD_TYPE"
  63. - ./test_supertux2
  64. deploy:
  65. - provider: script
  66. script: ../.travis/deploy-osx.sh
  67. skip_cleanup: true
  68. on:
  69. branch: master
  70. condition: $BUILD_TYPE = Release
  71. - provider: script
  72. script: ../.travis/deploy-tarball.sh
  73. skip_cleanup: true
  74. on:
  75. branch: master
  76. condition: $BUILD_TYPE = Release
  77. addons:
  78. apt:
  79. packages:
  80. - cmake
  81. - build-essential
  82. - libc++-dev
  83. - libogg-dev
  84. - libvorbis-dev
  85. - libphysfs-dev
  86. - libglew-dev
  87. - libopenal-dev
  88. - libboost-all-dev
  89. - libsdl2-dev
  90. - libsdl2-image-dev
  91. - rpm
  92. - sshpass
  93. coverity_scan:
  94. project:
  95. name: "SuperTux/supertux"
  96. description: "Build submitted via Travis CI"
  97. notification_email: supertux-commit@lists.lethargik.org
  98. build_command_prepend: "cmake . && make clean"
  99. build_command: "make -j 3"
  100. branch_pattern: coverity_scan
  101. notifications:
  102. email:
  103. - supertux-commit@lists.lethargik.org