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.

111 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
  15. sudo: required
  16. - os: linux
  17. env: ARCH=amd64 GLFW=SYSTEM RELEASE=NO
  18. sudo: required
  19. - os: linux
  20. env: USE_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: linux
  31. env: ARCH=arm64-android RELEASE=NO
  32. sudo: required
  33. - os: linux
  34. env: ARCH=html5 RELEASE=NO
  35. sudo: required
  36. before_script:
  37. before_install:
  38. - if [ "$TRAVIS_OS_NAME" == "linux" ]; then
  39. if [[ "$ARCH" == *-android ]]; then
  40. export RAYLIB_PACKAGE_SUFFIX="-Android-arm64";
  41. wget https://dl.google.com/android/repository/android-ndk-r17-linux-x86_64.zip;
  42. unzip -qq android-ndk*.zip;
  43. android-ndk*/build/tools/make_standalone_toolchain.py --arch arm64 --api 21 --install-dir /tmp/android-toolchain;
  44. export PATH=/tmp/android-toolchain/bin:$PATH;
  45. export CMAKE_ARCH_ARGS='-DPLATFORM=Android';
  46. export CC=aarch64-linux-android-clang;
  47. export CXX=aarch64-linux-android-clang++;
  48. elif [ "$ARCH" == "html5" ]; then
  49. export RAYLIB_PACKAGE_SUFFIX="-html5";
  50. docker run --privileged=true -dit --name emscripten -v $(pwd):/src trzeci/emscripten:sdk-incoming-64bit bash;
  51. export CMAKE_ARCH_ARGS='-DPLATFORM=Web -DCMAKE_TOOLCHAIN_FILE=../cmake/emscripten.cmake';
  52. export RUNNER='docker exec -it emscripten cmake -E chdir build';
  53. else
  54. sudo apt-get install -y gcc-multilib
  55. libasound2-dev:$ARCH
  56. libxcursor-dev:$ARCH libxinerama-dev:$ARCH mesa-common-dev:$ARCH
  57. libx11-dev:$ARCH libxrandr-dev:$ARCH libxrandr2:$ARCH libxi-dev:$ARCH
  58. libgl1-mesa-dev:$ARCH libglu1-mesa-dev:$ARCH;
  59. if [ "$ARCH" == "i386" ]; then
  60. export CMAKE_ARCH_ARGS='-DCMAKE_C_FLAGS=-m32 -DCMAKE_SYSTEM_LIBRARY_PATH=/usr/lib/i386-linux-gnu';
  61. fi;
  62. export RAYLIB_PACKAGE_SUFFIX="-Linux-$ARCH";
  63. if [ "$GLFW" == "SYSTEM" ]; then
  64. wget 'http://ftp.de.debian.org/debian/pool/main/g/glfw3/libglfw3_3.2.1-1_amd64.deb';
  65. wget 'http://ftp.de.debian.org/debian/pool/main/g/glfw3/libglfw3-dev_3.2.1-1_amd64.deb';
  66. sudo dpkg -i libglfw3_3.2.1-1_amd64.deb libglfw3-dev_3.2.1-1_amd64.deb;
  67. fi;
  68. fi;
  69. fi
  70. - if [ "$TRAVIS_OS_NAME" == "osx" ]; then
  71. export RAYLIB_PACKAGE_SUFFIX="-macOS";
  72. if [ "$GLFW" == "SYSTEM" ]; then brew update; brew install glfw; fi;
  73. fi
  74. - mkdir build
  75. - $RUNNER $CC --version
  76. script:
  77. - cd build
  78. - if test -n "${USE_WAYLAND}";
  79. then wget https://mirrors.kernel.org/ubuntu/pool/universe/e/extra-cmake-modules/extra-cmake-modules_5.38.0a-0ubuntu1_amd64.deb;
  80. sudo dpkg -i extra-cmake-modules_5.38.0a-0ubuntu1_amd64.deb;
  81. git clone git://anongit.freedesktop.org/wayland/wayland-protocols;
  82. pushd wayland-protocols;
  83. git checkout 1.12 && ./autogen.sh --prefix=/usr && make && sudo make install;
  84. popd;
  85. fi
  86. - $RUNNER cmake $CMAKE_ARCH_ARGS -DMACOS_FATLIB=ON -DSTATIC=ON -DSHARED=ON -DBUILD_EXAMPLES=ON -DBUILD_GAMES=ON -DUSE_EXTERNAL_GLFW=IF_POSSIBLE -DUSE_WAYLAND=${USE_WAYLAND} ..
  87. - $RUNNER make VERBOSE=1
  88. - if [ "$RELEASE" != "NO" ]; then $RUNNER make package; fi;
  89. - sudo $RUNNER make install
  90. - if [[ "$ARCH" != *-android && "$ARCH" != html5 ]]; then
  91. pkg-config --static --libs raylib;
  92. nm -g release/libraylib.a | grep glfwGetProcAddress || (echo "libraylib.a doesn't contain GLFW symbols! Aborting..." && false);
  93. fi
  94. deploy:
  95. provider: releases
  96. api_key:
  97. 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=
  98. file_glob: true
  99. file: raylib-*.tar.gz
  100. skip_cleanup: true
  101. on:
  102. repo: raysan5/raylib
  103. branch: master
  104. tags: true