You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

129 lines
4.7 KiB

  1. language: c
  2. dist: trusty
  3. git:
  4. depth: 3
  5. # TODO we could use a 32 bit Docker container for running true 32-bit tests
  6. services:
  7. - docker
  8. matrix:
  9. include:
  10. - os: linux
  11. env: ARCH=i386
  12. sudo: required
  13. - os: linux
  14. env: ARCH=amd64 INSTALL_GLFW=YES USE_EXTERNAL_GLFW=OFF
  15. sudo: required
  16. - os: linux
  17. env: ARCH=amd64 INSTALL_GLFW=YES STATIC=OFF RELEASE=NO
  18. sudo: required
  19. - os: linux
  20. env: WAYLAND=ON ARCH=amd64 RELEASE=NO
  21. sudo: required
  22. addons:
  23. apt:
  24. packages:
  25. - libwayland-dev
  26. - libxkbcommon-dev
  27. - libegl1-mesa-dev
  28. - os: osx
  29. env: ARCH=universal
  30. - os: osx
  31. osx_image: xcode9.4
  32. env: ARCH=universal SHARED=OFF RELEASE=NO
  33. - os: windows
  34. compiler: gcc
  35. env: ARCH=i386 SHARED=OFF RELEASE=NO
  36. before_script:
  37. before_install:
  38. - if [ -z "$USE_EXTERNAL_GLFW" ]; then export USE_EXTERNAL_GLFW=IF_POSSIBLE; fi
  39. - if [ -z "$SHARED" ]; then export SHARED=ON ; fi
  40. - if [ -z "$STATIC" ]; then export STATIC=ON ; fi
  41. - if [[ "$INSTALL_GLFW" == "YES" && "$USE_EXTERNAL_GLFW" != "OFF" ]]; then
  42. export DONT_TEST=1;
  43. fi
  44. - if [ "$TRAVIS_OS_NAME" == "linux" ]; then
  45. sudo apt-get install -y gcc-multilib
  46. libasound2-dev:$ARCH
  47. libxcursor-dev:$ARCH libxinerama-dev:$ARCH mesa-common-dev:$ARCH
  48. libx11-dev:$ARCH libxrandr-dev:$ARCH libxrandr2:$ARCH libxi-dev:$ARCH
  49. libgl1-mesa-dev:$ARCH libglu1-mesa-dev:$ARCH;
  50. if [ "$ARCH" == "i386" ]; then export CMAKE_ARCH_ARGS='-DCMAKE_C_FLAGS=-m32 -DCMAKE_SYSTEM_LIBRARY_PATH=/usr/lib/i386-linux-gnu -DSUPPORT_FILEFORMAT_FLAC=OFF'; fi;
  51. export RAYLIB_PACKAGE_SUFFIX="-Linux-$ARCH";
  52. if [ "$INSTALL_GLFW" == "YES" ]; then
  53. pushd src/external/glfw;
  54. cmake . -DGLFW_BUILD_DOCS=OFF
  55. -DGLFW_BUILD_TESTS=OFF
  56. -DGLFW_BUILD_EXAMPLES=OFF
  57. -DGLFW_INSTALL=ON
  58. -DBUILD_SHARED_LIBS=ON
  59. -DGLFW_USE_WAYLAND=$WAYLAND;
  60. make;
  61. sudo make install;
  62. popd;
  63. fi;
  64. fi
  65. - if [ "$TRAVIS_OS_NAME" == "osx" ]; then
  66. export RAYLIB_PACKAGE_SUFFIX="-macOS";
  67. if [ "$INSTALL_GLFW" == "YES" ]; then brew update; brew install glfw; fi;
  68. fi
  69. - if [ "$TRAVIS_OS_NAME" == "windows" ]; then
  70. export DONT_TEST=1;
  71. export RAYLIB_PACKAGE_SUFFIX="-windows";
  72. export CMAKE_ARCH_ARGS='-DPLATFORM=Desktop';
  73. fi
  74. - mkdir build
  75. - $RUNNER $CC --version
  76. script:
  77. - cd build
  78. - if test -n "$WAYLAND"; then
  79. wget https://mirrors.edge.kernel.org/ubuntu/pool/universe/e/extra-cmake-modules/extra-cmake-modules_5.44.0-0ubuntu1_amd64.deb;
  80. sudo apt-get clean;
  81. sudo apt-get update;
  82. sudo apt-get install dpkg;
  83. sudo dpkg -i extra-cmake-modules_5.44.0-0ubuntu1_amd64.deb;
  84. git clone git://anongit.freedesktop.org/wayland/wayland-protocols;
  85. pushd wayland-protocols;
  86. git checkout 1.15 && ./autogen.sh --prefix=/usr && make && sudo make install;
  87. popd;
  88. fi
  89. - $RUNNER cmake $CMAKE_ARCH_ARGS
  90. -DMACOS_FATLIB=ON
  91. -DSTATIC=$STATIC -DSHARED=$SHARED
  92. -DBUILD_EXAMPLES=ON
  93. -DUSE_EXTERNAL_GLFW=$USE_EXTERNAL_GLFW
  94. -DUSE_WAYLAND=$WAYLAND
  95. -DINCLUDE_EVERYTHING=ON
  96. -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
  97. ..
  98. - $RUNNER cmake --build . --target
  99. - if [ "$RELEASE" != "NO" ]; then $RUNNER cmake --build . --target package; fi
  100. - if [ -n "$RUNNER" ]; then
  101. sudo $RUNNER cmake --build . --target install;
  102. else
  103. $(which sudo) $RUNNER "$(which cmake)" --build . --target install;
  104. fi
  105. - if [ ! "$DONT_TEST" ]; then
  106. pkg-config --static --libs raylib;
  107. nm -g release/libraylib.a | grep glfwGetProcAddress || (echo "libraylib.a doesn't contain GLFW symbols! Aborting..." && false);
  108. ctest --output-on-failure;
  109. fi
  110. deploy:
  111. provider: releases
  112. api_key:
  113. secure: LvqUIAN/3dJul+Ra2iK3tSaNG5IwsNMmGIwVMy0DK5IBCxiQPBc9pWGiE30RTBPt6Z+N4BhMEE8DtUl+vnISlMoHWNIIhF2zwC66hs/F7zY7qEITMRSmfiLcqxQysknFOnJB06CATgXcFqlEo9j+t4abrG/f3qcb92J4O2uNz336Au2myTx93Q5MxbyA7KiUuEutFnb2dWiPCY4d+sGeXEfsiD2R7aj/8MaWOkoGdZVrTkI9juMgvpImkjQBArvqdjUMeT3MsRrwgOIq5v2GFV9dOl8k1WzPeT8B2JHh00ed/o1/wuFq/cLLOxtYo2+Pv3+xatOrlexoX0WkDm7C9/L1W5U4rLexU3CQ9mMBmHPnp6k/WXZ5QXEE4uUF0+LpN3XlIXzFpdZmZiVV8VLxg2WvyncMmivYiu7/MTkyfZxyKkzwl7sZZslzHA9kOGedGaN7b7/2B77OFHoQK8lKfdFml7jJnarh+89nenNZYMab0E8qkOJOyb2bYlDTa0/2nyxGiyymYgq6YHLNrDbhqB/1LzdgzjMliQ8ri5q9Ux2vjfcqOzhfAmcwFwnY/D6yXJWYi0DWpHZdpKl3du6dYDrypW91/yDWbwiJ/YhrE7ZunzrcB6GH/QkbuzWxdCth39rQAHih8DG01co/K3Gvi4yGjvIH5tFUpyEolMnpMiA=
  114. file_glob: true
  115. file: raylib-*.tar.gz
  116. skip_cleanup: true
  117. on:
  118. repo: raysan5/raylib
  119. branch: master
  120. tags: true