-
Notifications
You must be signed in to change notification settings - Fork 442
/
Copy pathtravis.yml
338 lines (327 loc) · 14.3 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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
addons:
apt:
packages:
- libgl1-mesa-dev
- g++-4.8
- ninja-build
- lcov
- libsdl2-dev
- libglfw3-dev
- libopenal-dev
- libvulkan-dev
matrix:
# The commented-out jobs are currently handled on Circle CI
include:
#- language: cpp
#os: linux
#dist: xenial
#compiler: gcc
#env:
#- JOBID=linux-gl
#- TARGET=desktop
#- CMAKE_CXX_FLAGS="--coverage"
#- LCOV_EXTRA_OPTS="--gcov-tool /usr/bin/gcov-4.8"
#- CONFIGURATION=Debug
#- language: cpp
#os: linux
#dist: xenial
#compiler: gcc
#env:
#- JOBID=linux-nondeprecated
#- TARGET=desktop
#- BUILD_DEPRECATED=OFF
#- CMAKE_CXX_FLAGS="-DCORRADE_NO_ASSERT"
#- CONFIGURATION=Release
#- language: cpp
#os: linux
#dist: xenial
#compiler: clang
#env:
#- JOBID=linux-sanitizers
#- TARGET=desktop-sanitizers
#- CMAKE_CXX_FLAGS=-fsanitize=address
#- CONFIGURATION=Debug
#addons:
#apt:
#sources:
#- llvm-toolchain-xenial
#packages:
#- libgl1-mesa-dev
#- ninja-build
#- clang-3.8
#- libsdl2-dev
#- libglfw3-dev
#- libopenal-dev
#- libvulkan-dev
#- language: cpp
#os: linux
#dist: xenial
#compiler: clang
#env:
#- JOBID=linux-threadsanitizer
#- TARGET=desktop-sanitizers
#- CMAKE_CXX_FLAGS=-fsanitize=thread
#- CONFIGURATION=Debug
#addons:
#apt:
#sources:
#- llvm-toolchain-xenial
#packages:
#- libgl1-mesa-dev
#- ninja-build
#- clang-3.8
#- libsdl2-dev
#- libglfw3-dev
#- libopenal-dev
#- libvulkan-dev
#- language: cpp
#os: linux
#dist: bionic
#compiler: gcc
#env:
#- JOBID=linux-vulkan
#- TARGET=desktop-vulkan
#- CMAKE_CXX_FLAGS="--coverage"
#addons:
#apt:
#packages:
#- ninja-build
#- lcov
#- libsdl2-dev
#- libglfw3-dev
#- libvulkan-dev
#- language: cpp
#os: linux
#dist: xenial
#compiler: gcc
#env:
#- JOBID=linux-static
#- TARGET=desktop
#- CMAKE_CXX_FLAGS="--coverage"
#- LCOV_EXTRA_OPTS="--gcov-tool /usr/bin/gcov-4.8"
#- BUILD_STATIC=ON
#- CONFIGURATION=Debug
#- language: cpp
#os: linux
#dist: xenial
#compiler: gcc
#env:
#- JOBID=linux-gles2
#- TARGET=desktop-gles
#- TARGET_GLES2=ON
#- CMAKE_CXX_FLAGS="--coverage"
#- LCOV_EXTRA_OPTS="--gcov-tool /usr/bin/gcov-4.8"
#addons:
#apt:
#packages:
#- libgl1-mesa-dev
#- g++-4.8
#- ninja-build
#- lcov
#- libsdl2-dev
#- libglfw3-dev
#- libopenal-dev
## We don't need Vulkan here
#- language: cpp
#os: linux
#dist: xenial
#compiler: gcc
#env:
#- JOBID=linux-gles3
#- TARGET=desktop-gles
#- TARGET_GLES2=OFF
#- CMAKE_CXX_FLAGS="--coverage"
#- LCOV_EXTRA_OPTS="--gcov-tool /usr/bin/gcov-4.8"
#- language: cpp
#os: osx
## This is currently (Sep 2020) the Travis default, 9.3 didn't have
## molten-vk in (non-updated) Homebrew.
#osx_image: xcode9.4
#compiler: clang
#env:
#- JOBID=macos-gl
#- TARGET=desktop
#- CMAKE_CXX_FLAGS="--coverage"
#- CONFIGURATION=Debug
#- language: cpp
#os: osx
## See above
#osx_image: xcode9.4
#compiler: clang
#env:
#- JOBID=macos-static
#- TARGET=desktop
#- CMAKE_CXX_FLAGS="--coverage"
#- BUILD_STATIC=ON
#- CONFIGURATION=Debug
#- language: cpp
#os: osx
## SwiftShader is built on 10.15 and can't be used on older versions due to
## dyld: lazy symbol binding failed: Symbol not found: ____chkstk_darwin
#osx_image: xcode11.6
#compiler: clang
#env:
#- JOBID=macos-vulkan
#- TARGET=desktop-vulkan
#- CMAKE_CXX_FLAGS="--coverage"
#- CONFIGURATION=Debug
- language: cpp
os: osx
osx_image: xcode7.3
env:
- JOBID=ios-gles2
- TARGET=ios-simulator
- TARGET_GLES2=ON
- language: cpp
os: osx
osx_image: xcode7.3
env:
- JOBID=ios-gles3
- TARGET=ios-simulator
- TARGET_GLES2=OFF
# TODO: these should be redone on Linux + Docker, like with Corrade
#- language: cpp
#os: osx
## Since August 1st, 2019, tests that iterate over 65536 elements
## (MathHalfTest, MathPackingTest and MathColorTest) are segfaulting on the
## xcode9.3 image. Using whatever image is the default instead.
##osx_image: xcode9.3
#env:
#- JOBID=emscripten-webgl1
#- TARGET=emscripten
#- TARGET_GLES2=ON
#- language: cpp
#os: osx
## Since August 1st, 2019, tests that iterate over 65536 elements
## (MathHalfTest, MathPackingTest and MathColorTest) are segfaulting on the
## xcode9.3 image. Using whatever image is the default instead.
##osx_image: xcode9.3
#env:
#- JOBID=emscripten-webgl2
#- TARGET=emscripten
#- TARGET_GLES2=OFF
- language: android
os: linux
# Setting xenial here will cause it to use 12.04, with GCC 4.6 and other
# prehistoric nightmares. So staying with 14.04 for the time being.
dist: trusty
env:
- JOBID=android-gles2
- TARGET=android-gles
- TARGET_GLES2=ON
addons:
apt:
packages:
- ninja-build
android:
components:
- build-tools-22.0.1
- android-22
- sys-img-armeabi-v7a-android-22
- language: android
os: linux
# Setting xenial here will cause it to use 12.04, with GCC 4.6 and other
# prehistoric nightmares. So staying with 14.04 for the time being.
dist: trusty
env:
- JOBID=android-gles3
- TARGET=android-gles
- TARGET_GLES2=OFF
addons:
apt:
packages:
- ninja-build
android:
components:
- build-tools-22.0.1
- android-22
- sys-img-armeabi-v7a-android-22
- language: android
os: linux
# Setting xenial here will cause it to use 12.04, with GCC 4.6 and other
# prehistoric nightmares. So staying with 14.04 for the time being.
dist: trusty
env:
- JOBID=android-vulkan
- TARGET=android-vulkan
addons:
apt:
packages:
- ninja-build
android:
components:
# Android API level 24 is the first with Vulkan support, but the crap
# emulator doesn't even start, so it's useless. See
# travis-android-vulkan.sh for how it's done instead.
- build-tools-22.0.1
- android-22
- sys-img-armeabi-v7a-android-22
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/00ec7a9066bb0fec98f3
on_success: change
on_failure: always
on_start: never
cache:
directories:
- $HOME/sdl2
install:
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ ! "$TARGET" == "desktop-sanitizers" ] && [ ! "$TARGET" == "android-gles" ] && [ ! "$TARGET" == "android-vulkan" ] && [ ! "$TARGET" == "desktop-vulkan" ]; then export CXX=g++-4.8; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "desktop-sanitizers" ]; then export CXX=clang++-3.8; fi
- if [ "$BUILD_DEPRECATED" != "OFF" ]; then export BUILD_DEPRECATED=ON; fi
- if [ "$BUILD_STATIC" != "ON" ]; then export BUILD_STATIC=OFF; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && ( [ "$TARGET" == "desktop" ] || [ "$TARGET" == "desktop-sanitizers" ] ); then export PLATFORM_GL_API=GLX; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "desktop-gles" ]; then export PLATFORM_GL_API=EGL; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && ( [ "$TARGET" == "android-gles" ] || [ "$TARGET" == "android-vulkan" ] ); then wget -nc https://dl.google.com/android/repository/android-ndk-r16b-linux-x86_64.zip && unzip -q android-*.zip; fi
# Download CMake 3.4.3 to ensure we're still compatible with it (Travis has
# 3.9 since December 2017). Also, the PATH setting can't be cached, so it's
# separate (bit me two times already). Android needs CMake 3.7, but
# https://gitlab.kitware.com/cmake/cmake/issues/17253 is fixed in 3.9.2, so
# grab that. FindVulkan is since 3.7, in that case just use the system package.
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ ! "$TARGET" == "desktop-vulkan" ] && [ ! "$TARGET" == "android-gles" ] && [ ! "$TARGET" == "android-vulkan" ] && [ ! -e "$HOME/cmake/bin" ]; then cd $HOME ; wget -nc --no-check-certificate https://cmake.org/files/v3.4/cmake-3.4.3-Linux-x86_64.tar.gz && mkdir -p cmake && cd cmake && tar --strip-components=1 -xzf ../cmake-3.4.3-Linux-x86_64.tar.gz && cd $TRAVIS_BUILD_DIR ; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && ( [ "$TARGET" == "android-gles" ] || [ "$TARGET" == "android-vulkan" ] ) && [ ! -e "$HOME/cmake/bin" ]; then cd $HOME ; wget -nc --no-check-certificate https://cmake.org/files/v3.9/cmake-3.9.2-Linux-x86_64.tar.gz && mkdir -p cmake && cd cmake && tar --strip-components=1 -xzf ../cmake-3.9.2-Linux-x86_64.tar.gz && cd $TRAVIS_BUILD_DIR ; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ ! "$TARGET" == "desktop-vulkan" ]; then export PATH=$HOME/cmake/bin:$PATH && cmake --version; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then HOMEBREW_NO_AUTO_UPDATE=1 brew install ninja; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [[ "$CMAKE_CXX_FLAGS" == *"--coverage"* ]]; then HOMEBREW_NO_AUTO_UPDATE=1 brew install lcov; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "desktop" ]; then export PLATFORM_GL_API=CGL; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "ios-simulator" ]; then gem install xcpretty; fi
- if [ "$TARGET" == "desktop" ] || [ "$TARGET" == "desktop-sanitizers" ] || [ "$TARGET" == "desktop-gles" ]; then printf "[General]\ndrivers=null" > ~/.alsoftrc; fi
# SDL on macOS and iOS (cached)
- if [ "$TRAVIS_OS_NAME" == "osx" ] && ( [ "$TARGET" == "desktop" ] || [ "$TARGET" == "desktop-vulkan" ] ); then HOMEBREW_NO_AUTO_UPDATE=1 brew install sdl2; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "ios-simulator" ]; then curl -O https://www.libsdl.org/release/SDL2-2.0.4.tar.gz && tar -xzvf SDL2-2.0.4.tar.gz && cd SDL2-2.0.4/Xcode-iOS/SDL && xcodebuild -sdk iphonesimulator9.3 | xcpretty && mkdir -p ../../../sdl2/lib && cp build/Release-iphonesimulator/libSDL2.a ../../../sdl2/lib && mkdir -p ../../../sdl2/include/SDL2 && cp -R ../../include/* ../../../sdl2/include/SDL2 && cd ../../..; fi
# GLFW (cached)
- if [ "$TRAVIS_OS_NAME" == "osx" ] && ( [ "$TARGET" == "desktop" ] || [ "$TARGET" == "desktop-vulkan" ] ); then HOMEBREW_NO_AUTO_UPDATE=1 brew install glfw; fi
# SwiftShader on Linux GLES (16.04) and Vulkan (18.04) (cached). Zip from
# https://github.com/mosra/magnum-ci/tree/swiftshader and self-hosted because
# GH Actions would make it too simple for people if you could just download the
# artifacts directly, right? RIGHT?
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "desktop-gles" ] && [ ! -e "$HOME/swiftshader/lib/libGLESv2.so" ]; then cd $HOME ; wget https://ci.magnum.graphics/swiftshader-gles-r5464.a6940c8e6e-ubuntu-16.04.zip && mkdir -p swiftshader && cd swiftshader && unzip ../swiftshader-gles-r5464.a6940c8e6e-ubuntu-16.04.zip && cd $TRAVIS_BUILD_DIR ; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "desktop-vulkan" ] && [ ! -e "$HOME/swiftshader/lib/libvk_swiftshader.so" ]; then cd $HOME ; wget https://ci.magnum.graphics/swiftshader-vulkan-r5464.a6940c8e6e-ubuntu-18.04.zip && mkdir -p swiftshader && cd swiftshader && unzip ../swiftshader-vulkan-r5464.a6940c8e6e-ubuntu-18.04.zip && cd $TRAVIS_BUILD_DIR ; fi
# MoltenVk on macOS for the general desktop build (we just need to link against
# something as the tests aren't run anyway, desktop-vulkan uses Vulkan-Loader
# so this is an opportunity to test both)
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "desktop" ]; then HOMEBREW_NO_AUTO_UPDATE=1 brew install molten-vk; fi
# SwiftShader on Mac, also self-hosted from GH Actions. We also need Vulkan
# loader there.
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "desktop-vulkan" ] && [ ! -e "$HOME/swiftshader/lib/libvk_swiftshader.dylib" ]; then cd $HOME ; wget https://ci.magnum.graphics/swiftshader-r5464.a6940c8e6e-macos-10.15.zip && mkdir -p swiftshader && cd swiftshader && unzip ../swiftshader-r5464.a6940c8e6e-macos-10.15.zip && cd $TRAVIS_BUILD_DIR ; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "desktop-vulkan" ] && [ ! -e "$HOME/vulkan-loader/lib/libvulkan.dylib" ]; then cd $HOME ; wget https://ci.magnum.graphics/vulkan-loader-1.2.153-macos-10.15.zip && mkdir -p vulkan-loader && cd vulkan-loader && unzip ../vulkan-loader-1.2.153-macos-10.15.zip && cd $TRAVIS_BUILD_DIR ; fi
script:
- if [ "$TRAVIS_OS_NAME" == "linux" ] && ( [ "$TARGET" == "desktop" ] || [ "$TARGET" == "desktop-sanitizers" ] ); then ./package/ci/travis-desktop.sh; fi
- if [ "$TARGET" == "desktop-vulkan" ]; then ./package/ci/travis-desktop-vulkan.sh; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "desktop-gles" ]; then ./package/ci/travis-desktop-gles.sh; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "android-gles" ]; then ./package/ci/travis-android-gles.sh; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "android-vulkan" ]; then ./package/ci/travis-android-vulkan.sh; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "desktop" ]; then ./package/ci/travis-desktop.sh; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "ios-simulator" ]; then ./package/ci/travis-ios-simulator.sh; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "emscripten" ]; then ./package/ci/travis-emscripten.sh; fi
# Travis somehow is not able to gather all output, try to force it using this
- sync
after_success:
# Keep in sync with PKBUILD-coverage, appveyor-lcov.sh and circleci.yml, please
- if [[ "$CMAKE_CXX_FLAGS" == *"--coverage"* ]]; then lcov $LCOV_EXTRA_OPTS --directory . --capture --output-file coverage.info > /dev/null; fi
- if [[ "$CMAKE_CXX_FLAGS" == *"--coverage"* ]]; then lcov $LCOV_EXTRA_OPTS --extract coverage.info "*/src/Magnum*/*" --output-file coverage.info > /dev/null; fi
- if [[ "$CMAKE_CXX_FLAGS" == *"--coverage"* ]]; then lcov $LCOV_EXTRA_OPTS --remove coverage.info "*/MagnumExternal/*" --output-file coverage.info > /dev/null; fi
- if [[ "$CMAKE_CXX_FLAGS" == *"--coverage"* ]]; then lcov $LCOV_EXTRA_OPTS --remove coverage.info "*/Test/*" --output-file coverage.info > /dev/null; fi
- if [[ "$CMAKE_CXX_FLAGS" == *"--coverage"* ]]; then lcov $LCOV_EXTRA_OPTS --remove coverage.info "*/build/src/*" --output-file coverage.info > /dev/null; fi
- if [[ "$CMAKE_CXX_FLAGS" == *"--coverage"* ]]; then bash <(curl -s https://codecov.io/bash) -f coverage.info; fi