Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

166 rindas
6.4 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: linux
  34. env: ARCH=arm64-android RELEASE=NO
  35. sudo: required
  36. - os: linux
  37. env: ARCH=arm32-android RELEASE=NO
  38. sudo: required
  39. - os: linux
  40. env: ARCH=html5 RELEASE=NO
  41. sudo: required
  42. - os: windows
  43. compiler: gcc
  44. env: ARCH=i386 SHARED=OFF RELEASE=NO
  45. before_script:
  46. before_install:
  47. - if [ -z "$USE_EXTERNAL_GLFW" ]; then export USE_EXTERNAL_GLFW=IF_POSSIBLE; fi
  48. - if [ -z "$SHARED" ]; then export SHARED=ON ; fi
  49. - if [ -z "$STATIC" ]; then export STATIC=ON ; fi
  50. - if [[ "$INSTALL_GLFW" == "YES" && "$USE_EXTERNAL_GLFW" != "OFF" ]]; then
  51. export DONT_TEST=1;
  52. fi
  53. - if [ "$TRAVIS_OS_NAME" == "linux" ]; then
  54. if [[ "$ARCH" == *-android ]]; then
  55. export DONT_TEST=1;
  56. export RAYLIB_PACKAGE_SUFFIX="-Android-arm64";
  57. wget https://dl.google.com/android/repository/android-ndk-r17-linux-x86_64.zip;
  58. unzip -qq android-ndk*.zip;
  59. if [[ "$ARCH" == arm64-* ]]; then
  60. export RAYLIB_PACKAGE_SUFFIX="-Android-arm64";
  61. TOOLCHAIN_ARCH=arm64;
  62. PREFIX=aarch64-linux-android-;
  63. else
  64. export RAYLIB_PACKAGE_SUFFIX="-Android-arm32";
  65. TOOLCHAIN_ARCH=arm;
  66. PREFIX=arm-linux-androideabi-;
  67. fi;
  68. android-ndk*/build/tools/make_standalone_toolchain.py --arch $TOOLCHAIN_ARCH --api 21 --install-dir /tmp/android-toolchain;
  69. export PATH=/tmp/android-toolchain/bin:$PATH;
  70. export CC=${PREFIX}clang;
  71. export CXX=${PREFIX}clang++;
  72. export CMAKE_ARCH_ARGS='-DPLATFORM=Android';
  73. elif [ "$ARCH" == "html5" ]; then
  74. export DONT_TEST=1;
  75. export RAYLIB_PACKAGE_SUFFIX="-html5";
  76. docker run --privileged=true -dit --name emscripten -v $(pwd):/src trzeci/emscripten:sdk-incoming-64bit bash;
  77. export CMAKE_ARCH_ARGS='-DPLATFORM=Web -DCMAKE_TOOLCHAIN_FILE=../cmake/emscripten.cmake';
  78. RUNNER='docker exec -it emscripten cmake -E chdir build';
  79. else
  80. sudo apt-get install -y gcc-multilib
  81. libasound2-dev:$ARCH
  82. libxcursor-dev:$ARCH libxinerama-dev:$ARCH mesa-common-dev:$ARCH
  83. libx11-dev:$ARCH libxrandr-dev:$ARCH libxrandr2:$ARCH libxi-dev:$ARCH
  84. libgl1-mesa-dev:$ARCH libglu1-mesa-dev:$ARCH;
  85. if [ "$OPENAL" == "ON" ]; then sudo apt-get install -y libopenal-dev; fi;
  86. 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;
  87. export RAYLIB_PACKAGE_SUFFIX="-Linux-$ARCH";
  88. if [ "$INSTALL_GLFW" == "YES" ]; then
  89. pushd src/external/glfw;
  90. cmake . -DGLFW_BUILD_DOCS=OFF
  91. -DGLFW_BUILD_TESTS=OFF
  92. -DGLFW_BUILD_EXAMPLES=OFF
  93. -DGLFW_INSTALL=ON
  94. -DBUILD_SHARED_LIBS=ON
  95. -DGLFW_USE_WAYLAND=$WAYLAND;
  96. make;
  97. sudo make install;
  98. popd;
  99. fi;
  100. fi;
  101. fi
  102. - if [ "$TRAVIS_OS_NAME" == "osx" ]; then
  103. export RAYLIB_PACKAGE_SUFFIX="-macOS";
  104. if [ "$INSTALL_GLFW" == "YES" ]; then brew update; brew install glfw; fi;
  105. fi
  106. - if [ "$TRAVIS_OS_NAME" == "windows" ]; then
  107. export DONT_TEST=1;
  108. export RAYLIB_PACKAGE_SUFFIX="-windows";
  109. export CMAKE_ARCH_ARGS='-DPLATFORM=Desktop';
  110. fi
  111. - mkdir build
  112. - $RUNNER $CC --version
  113. script:
  114. - cd build
  115. - if test -n "$WAYLAND"; then
  116. wget https://mirrors.edge.kernel.org/ubuntu/pool/universe/e/extra-cmake-modules/extra-cmake-modules_5.44.0-0ubuntu1_amd64.deb;
  117. sudo apt-get clean;
  118. sudo apt-get update;
  119. sudo apt-get install dpkg;
  120. sudo dpkg -i extra-cmake-modules_5.44.0-0ubuntu1_amd64.deb;
  121. git clone git://anongit.freedesktop.org/wayland/wayland-protocols;
  122. pushd wayland-protocols;
  123. git checkout 1.15 && ./autogen.sh --prefix=/usr && make && sudo make install;
  124. popd;
  125. fi
  126. - $RUNNER cmake $CMAKE_ARCH_ARGS
  127. -DMACOS_FATLIB=ON
  128. -DSTATIC=$STATIC -DSHARED=$SHARED
  129. -DBUILD_EXAMPLES=ON -DBUILD_GAMES=ON
  130. -DUSE_EXTERNAL_GLFW=$USE_EXTERNAL_GLFW
  131. -DUSE_WAYLAND=$WAYLAND
  132. -DINCLUDE_EVERYTHING=ON
  133. -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
  134. ..
  135. - $RUNNER cmake --build . --target
  136. - if [ "$RELEASE" != "NO" ]; then $RUNNER cmake --build . --target package; fi
  137. - if [ -n "$RUNNER" ]; then
  138. sudo $RUNNER cmake --build . --target install;
  139. else
  140. $(which sudo) $RUNNER "$(which cmake)" --build . --target install;
  141. fi
  142. - if [ ! "$DONT_TEST" ]; then
  143. pkg-config --static --libs raylib;
  144. nm -g release/libraylib.a | grep glfwGetProcAddress || (echo "libraylib.a doesn't contain GLFW symbols! Aborting..." && false);
  145. ctest --output-on-failure;
  146. fi
  147. deploy:
  148. provider: releases
  149. api_key:
  150. 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=
  151. file_glob: true
  152. file: raylib-*.tar.gz
  153. skip_cleanup: true
  154. on:
  155. repo: raysan5/raylib
  156. branch: master
  157. tags: true