mirror of https://github.com/raysan5/raylib
104 lines
4.2 KiB
YAML
104 lines
4.2 KiB
YAML
language: c
|
|
dist: trusty
|
|
|
|
git:
|
|
depth: 3
|
|
|
|
# TODO we could use a 32 bit Docker container for running true 32-bit tests
|
|
# services: - docker
|
|
|
|
matrix:
|
|
include:
|
|
- os: linux
|
|
env: ARCH=i386
|
|
sudo: required
|
|
- os: linux
|
|
env: ARCH=amd64
|
|
sudo: required
|
|
- os: linux
|
|
env: ARCH=amd64 GLFW=SYSTEM
|
|
sudo: required
|
|
- os: linux
|
|
env: USE_WAYLAND=ON ARCH=amd64
|
|
sudo: required
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- libwayland-dev
|
|
- libxkbcommon-dev
|
|
- libegl1-mesa-dev
|
|
- os: osx
|
|
env: ARCH=universal
|
|
- os: linux
|
|
env: ARCH=arm64-android
|
|
sudo: required
|
|
|
|
before_script:
|
|
|
|
before_install:
|
|
- export PLATFORM=Desktop
|
|
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
|
|
if [[ "$ARCH" == *-android ]]; then
|
|
export RAYLIB_PACKAGE_SUFFIX="-Android-arm64";
|
|
wget https://dl.google.com/android/repository/android-ndk-r17-linux-x86_64.zip;
|
|
unzip -qq android-ndk*.zip;
|
|
android-ndk*/build/tools/make_standalone_toolchain.py --arch arm64 --api 21 --install-dir /tmp/android-toolchain;
|
|
export PATH=/tmp/android-toolchain/bin:$PATH;
|
|
export PLATFORM=Android;
|
|
export CC=aarch64-linux-android-clang;
|
|
export CXX=aarch64-linux-android-clang++;
|
|
else
|
|
sudo apt-get install -y gcc-multilib
|
|
libasound2-dev:$ARCH
|
|
libxcursor-dev:$ARCH libxinerama-dev:$ARCH mesa-common-dev:$ARCH
|
|
libx11-dev:$ARCH libxrandr-dev:$ARCH libxrandr2:$ARCH libxi-dev:$ARCH
|
|
libgl1-mesa-dev:$ARCH libglu1-mesa-dev:$ARCH;
|
|
if [ "$ARCH" == "i386" ]; then
|
|
export CMAKE_ARCH_ARGS='-DCMAKE_C_FLAGS=-m32 -DCMAKE_SYSTEM_LIBRARY_PATH=/usr/lib/i386-linux-gnu';
|
|
fi;
|
|
export RAYLIB_PACKAGE_SUFFIX="-Linux-$ARCH";
|
|
if [ "$GLFW" == "SYSTEM" ]; then
|
|
wget 'http://ftp.de.debian.org/debian/pool/main/g/glfw3/libglfw3_3.2.1-1_amd64.deb';
|
|
wget 'http://ftp.de.debian.org/debian/pool/main/g/glfw3/libglfw3-dev_3.2.1-1_amd64.deb';
|
|
sudo dpkg -i libglfw3_3.2.1-1_amd64.deb libglfw3-dev_3.2.1-1_amd64.deb;
|
|
fi;
|
|
fi;
|
|
fi
|
|
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
|
export RAYLIB_PACKAGE_SUFFIX="-macOS";
|
|
if [ "$GLFW" == "SYSTEM" ]; then brew update; brew install glfw; fi;
|
|
fi
|
|
- "$CC --version"
|
|
|
|
script:
|
|
- mkdir build
|
|
- cd build
|
|
- if test -n "${USE_WAYLAND}";
|
|
then wget https://mirrors.kernel.org/ubuntu/pool/universe/e/extra-cmake-modules/extra-cmake-modules_5.38.0a-0ubuntu1_amd64.deb;
|
|
sudo dpkg -i extra-cmake-modules_5.38.0a-0ubuntu1_amd64.deb;
|
|
git clone git://anongit.freedesktop.org/wayland/wayland-protocols;
|
|
pushd wayland-protocols;
|
|
git checkout 1.12 && ./autogen.sh --prefix=/usr && make && sudo make install;
|
|
popd;
|
|
fi
|
|
- 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} -DPLATFORM=${PLATFORM} ..
|
|
- make VERBOSE=1
|
|
- if [ "$GLFW" != "SYSTEM" ]; then make package; fi;
|
|
- sudo make install
|
|
- pkg-config --static --libs raylib
|
|
- if [[ "$ARCH" != *-android ]]; then
|
|
nm -g release/libraylib.a | grep glfwGetProcAddress || (echo "libraylib.a doesn't contain GLFW symbols! Aborting..." && false);
|
|
fi
|
|
|
|
deploy:
|
|
provider: releases
|
|
api_key:
|
|
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=
|
|
file_glob: true
|
|
file: raylib-*.tar.gz
|
|
skip_cleanup: true
|
|
on:
|
|
repo: raysan5/raylib
|
|
branch: master
|
|
tags: true
|