forked from raysan5/raylib
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
166 lines (157 loc) · 6.37 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
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 INSTALL_GLFW=YES USE_EXTERNAL_GLFW=OFF
sudo: required
- os: linux
env: ARCH=amd64 INSTALL_GLFW=YES STATIC=OFF RELEASE=NO
sudo: required
- os: linux
env: WAYLAND=ON ARCH=amd64 RELEASE=NO
sudo: required
addons:
apt:
packages:
- libwayland-dev
- libxkbcommon-dev
- libegl1-mesa-dev
- os: osx
env: ARCH=universal
- os: osx
osx_image: xcode9.4
env: ARCH=universal SHARED=OFF RELEASE=NO
- os: linux
env: ARCH=arm64-android RELEASE=NO
sudo: required
- os: linux
env: ARCH=arm32-android RELEASE=NO
sudo: required
- os: linux
env: ARCH=html5 RELEASE=NO
sudo: required
- os: windows
compiler: gcc
env: ARCH=i386 SHARED=OFF RELEASE=NO
before_script:
before_install:
- 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 [[ "$INSTALL_GLFW" == "YES" && "$USE_EXTERNAL_GLFW" != "OFF" ]]; then
export DONT_TEST=1;
fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
if [[ "$ARCH" == *-android ]]; then
export DONT_TEST=1;
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;
if [[ "$ARCH" == arm64-* ]]; then
export RAYLIB_PACKAGE_SUFFIX="-Android-arm64";
TOOLCHAIN_ARCH=arm64;
PREFIX=aarch64-linux-android-;
else
export RAYLIB_PACKAGE_SUFFIX="-Android-arm32";
TOOLCHAIN_ARCH=arm;
PREFIX=arm-linux-androideabi-;
fi;
android-ndk*/build/tools/make_standalone_toolchain.py --arch $TOOLCHAIN_ARCH --api 21 --install-dir /tmp/android-toolchain;
export PATH=/tmp/android-toolchain/bin:$PATH;
export CC=${PREFIX}clang;
export CXX=${PREFIX}clang++;
export CMAKE_ARCH_ARGS='-DPLATFORM=Android';
elif [ "$ARCH" == "html5" ]; then
export DONT_TEST=1;
export RAYLIB_PACKAGE_SUFFIX="-html5";
docker run --privileged=true -dit --name emscripten -v $(pwd):/src trzeci/emscripten:sdk-incoming-64bit bash;
export CMAKE_ARCH_ARGS='-DPLATFORM=Web -DCMAKE_TOOLCHAIN_FILE=../cmake/emscripten.cmake';
RUNNER='docker exec -it emscripten cmake -E chdir build';
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 [ "$OPENAL" == "ON" ]; then sudo apt-get install -y libopenal-dev; fi;
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;
export RAYLIB_PACKAGE_SUFFIX="-Linux-$ARCH";
if [ "$INSTALL_GLFW" == "YES" ]; then
pushd src/external/glfw;
cmake . -DGLFW_BUILD_DOCS=OFF
-DGLFW_BUILD_TESTS=OFF
-DGLFW_BUILD_EXAMPLES=OFF
-DGLFW_INSTALL=ON
-DBUILD_SHARED_LIBS=ON
-DGLFW_USE_WAYLAND=$WAYLAND;
make;
sudo make install;
popd;
fi;
fi;
fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
export RAYLIB_PACKAGE_SUFFIX="-macOS";
if [ "$INSTALL_GLFW" == "YES" ]; then brew update; brew install glfw; fi;
fi
- if [ "$TRAVIS_OS_NAME" == "windows" ]; then
export DONT_TEST=1;
export RAYLIB_PACKAGE_SUFFIX="-windows";
export CMAKE_ARCH_ARGS='-DPLATFORM=Desktop';
fi
- mkdir build
- $RUNNER $CC --version
script:
- cd build
- if test -n "$WAYLAND"; then
wget https://mirrors.edge.kernel.org/ubuntu/pool/universe/e/extra-cmake-modules/extra-cmake-modules_5.44.0-0ubuntu1_amd64.deb;
sudo apt-get clean;
sudo apt-get update;
sudo apt-get install dpkg;
sudo dpkg -i extra-cmake-modules_5.44.0-0ubuntu1_amd64.deb;
git clone git://anongit.freedesktop.org/wayland/wayland-protocols;
pushd wayland-protocols;
git checkout 1.15 && ./autogen.sh --prefix=/usr && make && sudo make install;
popd;
fi
- $RUNNER cmake $CMAKE_ARCH_ARGS
-DMACOS_FATLIB=ON
-DSTATIC=$STATIC -DSHARED=$SHARED
-DBUILD_EXAMPLES=ON -DBUILD_GAMES=ON
-DUSE_EXTERNAL_GLFW=$USE_EXTERNAL_GLFW
-DUSE_WAYLAND=$WAYLAND
-DINCLUDE_EVERYTHING=ON
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
..
- $RUNNER cmake --build . --target
- if [ "$RELEASE" != "NO" ]; then $RUNNER cmake --build . --target package; fi
- if [ -n "$RUNNER" ]; then
sudo $RUNNER cmake --build . --target install;
else
$(which sudo) $RUNNER "$(which cmake)" --build . --target install;
fi
- if [ ! "$DONT_TEST" ]; then
pkg-config --static --libs raylib;
nm -g release/libraylib.a | grep glfwGetProcAddress || (echo "libraylib.a doesn't contain GLFW symbols! Aborting..." && false);
ctest --output-on-failure;
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