.travis.yml 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  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.4
  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" = "linux" ]; then
  51. if [ "$CXX" = "g++" ]; then export CXX="g++-8" CC="gcc-8"; fi;
  52. if [ "$CXX" = "clang++" ]; then export CXX="clang++-6.0" CC="clang-6.0"; fi;
  53. fi
  54. # Try building with GLBinding
  55. # Note: glbindings ./configure needs to be run twice in order to generate a makefile
  56. - if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$USE_GLBINDING" = "ON" ]; then
  57. wget https://github.com/cginternals/glbinding/archive/v$GLBINDING_VERSION.tar.gz -O - | tar xz;
  58. cd glbinding-$GLBINDING_VERSION && ./configure --prefix=/usr && ./configure --prefix=/usr;
  59. cd build && make && sudo make install;
  60. cd ../..;
  61. fi
  62. # Fetch the entire git history
  63. - git fetch --unshallow
  64. # Install libRAQM
  65. - git clone --depth 1 https://github.com/HOST-Oman/libraqm.git;
  66. if [ "$TRAVIS_OS_NAME" = "linux" ]; then cd libraqm && ./autogen.sh && ./configure --prefix=/usr --disable-Werror && make -j3 && sudo make install; fi;
  67. if [ "$TRAVIS_OS_NAME" = "osx" ]; then cd libraqm && ./autogen.sh && ./configure --prefix=/usr/local --disable-Werror && make -j3 && sudo make install; fi;
  68. cd ..;
  69. - if [ "$TRAVIS_OS_NAME" = "linux" ]; then
  70. wget https://netcologne.dl.sourceforge.net/project/glew/glew/2.1.0/glew-2.1.0.tgz -O - | tar xz;
  71. cd glew-2.1.0/;
  72. make;
  73. sudo make install LIBDIR=/usr/lib;
  74. cd ..;
  75. fi;
  76. script:
  77. - cmake --version
  78. - $CXX --version
  79. - env
  80. - mkdir "build-$BUILD_TYPE"
  81. - cd "build-$BUILD_TYPE"
  82. - 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
  83. - make VERBOSE=1
  84. - make install DESTDIR="/tmp/supertux-$BUILD_TYPE" VERBOSE=1
  85. - ./test_supertux2
  86. after_success:
  87. - ../.travis/package.sh
  88. deploy:
  89. - provider: s3
  90. # script: ../.travis/deploy.sh
  91. access_key_id:
  92. secure: "YV+ri7L3ewSkbj0OUDCw3f4QA45YJ2NQg4Hy43traiebBcZ9up1w20uwy9jNCltivVWw/o6I3LT1KkBkblaAtD2jUemFfOfiB9gy8KRintjaR4OSCtr5bSiB0JbDNZwOONn5UHNTi/JbEX83jZxmn/V0p0RJZPmKShpS4sxYHH8="
  93. secret_access_key:
  94. secure: "SInYqjQuB0NAchIyqlaS1WjRdvYEpVhRNhPVO2y5H0fHcK+LDHdpkvtuieclD3ayUg/96qOOzKj0Sr7RqSFN4TCrTOmJYIK6JPtYqonor8AZcDucqOnw31v/HOIZ+Y15mvuWJfXY8sWmBXZiXc5l1a+J1A0NSgfdikKyjdULC58="
  95. bucket: supertux-ci-downloads
  96. region: us-west-2
  97. local_dir: s3-upload
  98. upload-dir: ${TRAVIS_COMMIT}/travis/${TRAVIS_OS_NAME}/${TRAVIS_JOB_ID}
  99. skip_cleanup: true
  100. on:
  101. all_branches: true
  102. condition: $RELEASE = ON
  103. - provider: releases
  104. api_key:
  105. secure: DF4cqURrLmxI+NNsOgPDsMHe9IHld0qMpxG4HZw2P2oJKJ9/QHMhBiq3Bi1x5lGMuWnJ02vq8s2mIm056qXOSxBJh6fCJO8Q+tUuUHIWm4tO9Jogy/10sDBLnKUq6sNjsM8BrRoeMWApfSVPqu9D/9k5mI3Zv1pVR+ip4ECQVBE=
  106. file: "s3-upload/SuperTux*"
  107. file_glob: true
  108. skip_cleanup: true
  109. on:
  110. tags: true
  111. condition: $RELEASE = ON
  112. after_deploy:
  113. - ../.travis/deploy.sh
  114. addons:
  115. apt:
  116. sources:
  117. - ubuntu-toolchain-r-test
  118. - llvm-toolchain-trusty-6.0
  119. packages:
  120. - cmake
  121. - build-essential
  122. - automake
  123. - clang-6.0
  124. - g++-8
  125. - libc++-dev
  126. - libogg-dev
  127. - libvorbis-dev
  128. - libopenal-dev
  129. - libboost-all-dev
  130. - libsdl2-dev
  131. - libsdl2-image-dev
  132. - libfreetype6-dev
  133. - libharfbuzz-dev
  134. - libfribidi-dev
  135. - libglib2.0-dev
  136. - gtk-doc-tools
  137. - rpm
  138. - sshpass
  139. homebrew:
  140. packages:
  141. - cmake
  142. - bash
  143. - libogg
  144. - libvorbis
  145. - glew
  146. - openal-soft
  147. - sdl2
  148. - sdl2_image
  149. - sdl2_ttf
  150. - freetype
  151. - harfbuzz
  152. - fribidi
  153. - glib
  154. - gtk-doc
  155. - glbinding
  156. update: true
  157. coverity_scan:
  158. project:
  159. name: "SuperTux/supertux"
  160. description: "Build submitted via Travis CI"
  161. notification_email: supertux-commit@lists.lethargik.org
  162. build_command_prepend: "cmake . && make clean"
  163. build_command: "make -j 3"
  164. branch_pattern: coverity_scan
  165. notifications:
  166. email:
  167. - supertux-commit@lists.lethargik.org
  168. slack:
  169. secure: cH9u9+EfaPGIcmIcy06hxp5coMmBSKorgABXwE5M06hWbwL+4SIaAlOf9QhrOPi7TZKyyI5GXh687pWNtrgUzaBFhNrPOa/tIzr6kJryAkoFBRdn0sOsf/xYyDgTUfzS79HLYxdv7KDckmiPcgTxGGJOJ3797HBeKaEeufefzlU=