2017-10-05 07:18:25 +03:00
|
|
|
language: c
|
|
|
|
dist: trusty
|
|
|
|
|
|
|
|
git:
|
|
|
|
depth: 3
|
|
|
|
|
2017-11-27 03:24:08 +03:00
|
|
|
# TODO we could use a 32 bit Docker container for running true 32-bit tests
|
2018-04-12 20:31:53 +03:00
|
|
|
services:
|
|
|
|
- docker
|
2017-10-05 07:18:25 +03:00
|
|
|
|
2017-12-14 14:20:05 +03:00
|
|
|
matrix:
|
2017-11-27 03:24:08 +03:00
|
|
|
include:
|
|
|
|
- os: linux
|
2017-12-14 14:20:05 +03:00
|
|
|
env: ARCH=i386
|
2017-11-27 03:24:08 +03:00
|
|
|
sudo: required
|
|
|
|
- os: linux
|
2018-07-23 22:07:29 +03:00
|
|
|
env: ARCH=amd64 INSTALL_GLFW=YES USE_EXTERNAL_GLFW=OFF
|
2017-11-27 03:24:08 +03:00
|
|
|
sudo: required
|
2018-05-11 00:47:38 +03:00
|
|
|
- os: linux
|
2018-07-27 19:28:37 +03:00
|
|
|
env: ARCH=amd64 INSTALL_GLFW=YES OPENAL=ON STATIC=OFF RELEASE=NO
|
2018-05-11 00:47:38 +03:00
|
|
|
sudo: required
|
2018-05-12 16:39:13 +03:00
|
|
|
- os: linux
|
2018-07-27 19:17:18 +03:00
|
|
|
env: WAYLAND=ON ARCH=amd64 RELEASE=NO
|
2018-05-12 16:39:13 +03:00
|
|
|
sudo: required
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- libwayland-dev
|
|
|
|
- libxkbcommon-dev
|
|
|
|
- libegl1-mesa-dev
|
2017-11-27 03:24:08 +03:00
|
|
|
- os: osx
|
2018-01-27 03:04:28 +03:00
|
|
|
env: ARCH=universal
|
2018-07-24 12:02:11 +03:00
|
|
|
- os: osx
|
|
|
|
osx_image: xcode9.4
|
|
|
|
env: ARCH=universal SHARED=OFF RELEASE=NO
|
2018-05-21 00:03:04 +03:00
|
|
|
- os: linux
|
2018-04-12 20:31:53 +03:00
|
|
|
env: ARCH=arm64-android RELEASE=NO
|
|
|
|
sudo: required
|
2018-07-10 16:54:34 +03:00
|
|
|
- os: linux
|
|
|
|
env: ARCH=arm32-android RELEASE=NO
|
|
|
|
sudo: required
|
2018-04-12 20:31:53 +03:00
|
|
|
- os: linux
|
|
|
|
env: ARCH=html5 RELEASE=NO
|
2018-05-21 00:03:04 +03:00
|
|
|
sudo: required
|
2017-11-24 21:57:44 +03:00
|
|
|
|
2017-10-05 07:18:25 +03:00
|
|
|
before_script:
|
|
|
|
|
|
|
|
before_install:
|
2018-07-28 17:08:41 +03:00
|
|
|
- if [ -z "$USE_EXTERNAL_GLFW" ]; then export USE_EXTERNAL_GLFW=IF_POSSIBLE; fi
|
|
|
|
- if [ -z "$SHARED" ]; then export SHARED=ON ; fi
|
|
|
|
- if [ -z "$STATIC" ]; then export STATIC=ON ; fi
|
|
|
|
- if [ -z "$OPENAL" ]; then export OPENAL=OFF; fi
|
|
|
|
- if [[ "$INSTALL_GLFW" == "YES" && "$USE_EXTERNAL_GLFW" != "OFF" ]]; then
|
|
|
|
export DONT_TEST=1;
|
|
|
|
fi
|
2017-10-05 07:18:25 +03:00
|
|
|
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
|
2018-05-21 00:03:04 +03:00
|
|
|
if [[ "$ARCH" == *-android ]]; then
|
2018-07-28 17:08:41 +03:00
|
|
|
export DONT_TEST=1;
|
2018-05-21 00:03:04 +03:00
|
|
|
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;
|
2018-07-10 16:54:34 +03:00
|
|
|
if [[ "$ARCH" == arm64-* ]]; then
|
|
|
|
export RAYLIB_PACKAGE_SUFFIX="-Android-arm64";
|
2018-07-27 19:17:18 +03:00
|
|
|
TOOLCHAIN_ARCH=arm64;
|
|
|
|
PREFIX=aarch64-linux-android-;
|
2018-07-10 16:54:34 +03:00
|
|
|
else
|
|
|
|
export RAYLIB_PACKAGE_SUFFIX="-Android-arm32";
|
2018-07-27 19:17:18 +03:00
|
|
|
TOOLCHAIN_ARCH=arm;
|
|
|
|
PREFIX=arm-linux-androideabi-;
|
2018-07-10 16:54:34 +03:00
|
|
|
fi;
|
|
|
|
android-ndk*/build/tools/make_standalone_toolchain.py --arch $TOOLCHAIN_ARCH --api 21 --install-dir /tmp/android-toolchain;
|
2018-05-21 00:03:04 +03:00
|
|
|
export PATH=/tmp/android-toolchain/bin:$PATH;
|
2018-07-10 16:54:34 +03:00
|
|
|
export CC=${PREFIX}clang;
|
|
|
|
export CXX=${PREFIX}clang++;
|
2018-07-28 17:08:41 +03:00
|
|
|
export CMAKE_ARCH_ARGS='-DPLATFORM=Android';
|
2018-04-12 20:31:53 +03:00
|
|
|
elif [ "$ARCH" == "html5" ]; then
|
2018-07-28 17:08:41 +03:00
|
|
|
export DONT_TEST=1;
|
2018-04-12 20:31:53 +03:00
|
|
|
export RAYLIB_PACKAGE_SUFFIX="-html5";
|
|
|
|
docker run --privileged=true -dit --name emscripten -v $(pwd):/src trzeci/emscripten:sdk-incoming-64bit bash;
|
2018-07-28 17:08:41 +03:00
|
|
|
export CMAKE_ARCH_ARGS='-DPLATFORM=Web -DCMAKE_TOOLCHAIN_FILE=../cmake/emscripten.cmake';
|
2018-07-27 19:17:18 +03:00
|
|
|
RUNNER='docker exec -it emscripten cmake -E chdir build';
|
2018-05-21 00:03:04 +03:00
|
|
|
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;
|
2018-07-27 19:17:18 +03:00
|
|
|
|
|
|
|
if [ "$OPENAL" == "ON" ]; then sudo apt-get install -y libopenal-dev; fi;
|
2018-07-28 17:08:41 +03:00
|
|
|
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;
|
2018-07-27 19:28:37 +03:00
|
|
|
|
2018-05-21 00:03:04 +03:00
|
|
|
export RAYLIB_PACKAGE_SUFFIX="-Linux-$ARCH";
|
2018-07-23 20:36:31 +03:00
|
|
|
if [ "$INSTALL_GLFW" == "YES" ]; then
|
2018-05-21 00:03:04 +03:00
|
|
|
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;
|
2018-02-03 12:17:51 +03:00
|
|
|
fi;
|
|
|
|
fi
|
|
|
|
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
|
|
|
export RAYLIB_PACKAGE_SUFFIX="-macOS";
|
2018-07-23 20:36:31 +03:00
|
|
|
if [ "$INSTALL_GLFW" == "YES" ]; then brew update; brew install glfw; fi;
|
2017-10-05 07:18:25 +03:00
|
|
|
fi
|
2018-04-12 20:31:53 +03:00
|
|
|
- mkdir build
|
|
|
|
- $RUNNER $CC --version
|
2017-10-05 07:18:25 +03:00
|
|
|
|
|
|
|
script:
|
|
|
|
- cd build
|
2018-07-27 19:17:18 +03:00
|
|
|
- if test -n "$WAYLAND";
|
2018-05-09 18:59:09 +03:00
|
|
|
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
|
2018-07-27 19:17:18 +03:00
|
|
|
- $RUNNER cmake $CMAKE_ARCH_ARGS
|
|
|
|
-DMACOS_FATLIB=ON
|
2018-07-27 19:28:37 +03:00
|
|
|
-DSTATIC=$STATIC -DSHARED=$SHARED
|
2018-07-27 19:17:18 +03:00
|
|
|
-DBUILD_EXAMPLES=ON -DBUILD_GAMES=ON
|
|
|
|
-DUSE_EXTERNAL_GLFW=$USE_EXTERNAL_GLFW
|
|
|
|
-DUSE_WAYLAND=$WAYLAND
|
2018-07-27 19:28:37 +03:00
|
|
|
-DINCLUDE_EVERYTHING=ON
|
2018-07-27 19:17:18 +03:00
|
|
|
..
|
2018-04-12 20:31:53 +03:00
|
|
|
- $RUNNER make VERBOSE=1
|
2018-07-27 19:17:18 +03:00
|
|
|
- if [ "$RELEASE" != "NO" ]; then $RUNNER make package; fi
|
2018-04-12 20:31:53 +03:00
|
|
|
- sudo $RUNNER make install
|
2018-07-28 17:08:41 +03:00
|
|
|
- if [ ! "$DONT_TEST" ]; then
|
2018-04-12 20:31:53 +03:00
|
|
|
pkg-config --static --libs raylib;
|
2018-05-21 01:58:49 +03:00
|
|
|
nm -g release/libraylib.a | grep glfwGetProcAddress || (echo "libraylib.a doesn't contain GLFW symbols! Aborting..." && false);
|
2018-07-03 21:34:31 +03:00
|
|
|
ctest --output-on-failure;
|
2018-05-21 01:58:49 +03:00
|
|
|
fi
|
2017-11-24 21:57:44 +03:00
|
|
|
|
|
|
|
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
|
2018-02-19 15:56:55 +03:00
|
|
|
branch: master
|
2017-11-25 01:03:02 +03:00
|
|
|
tags: true
|