.travis.yml 5.6 KB

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