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.

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