.travis.yml 5.9 KB

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