This repository has been archived by the owner on Aug 19, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 75
/
.travis.yml
172 lines (158 loc) · 6.13 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
# Build Configuration for Travis
# https://travis-ci.org
language:
- cpp
python:
- "3.5"
jdk: oraclejdk8
matrix:
# Show final status immediately if a test fails.
fast_finish: true
include:
# Android ndk build.
- os: linux
compiler: gcc
sudo: required
dist: trusty
env: KSB_TARGET=ANDROID KSB_TYPE=NDK
# Android gradle build.
- os: linux
compiler: gcc
sudo: required
dist: trusty
env: KSB_TARGET=ANDROID KSB_TYPE=GRADLE
# Linux GCC debug build.
- os: linux
compiler: gcc
sudo: required
dist: trusty
env: KSB_TARGET=LINUX KSB_TYPE=Debug
# Linux GCC release build.
- os: linux
compiler: gcc
sudo: required
dist: trusty
env: KSB_TARGET=LINUX KSB_TYPE=Release
# Linux Clang debug build.
- os: linux
compiler: clang
sudo: required
dist: trusty
env: KSB_TARGET=LINUX KSB_TYPE=Debug
# Linux Clang release build.
- os: linux
compiler: clang
sudo: required
dist: trusty
env: KSB_TARGET=LINUX KSB_TYPE=Release
# Linux GCC debug build for code coverage.
- os: linux
compiler: gcc
sudo: required
dist: trusty
env: KSB_TARGET=COVERAGE KSB_TYPE=Debug
# Linux GCC release build for code coverage.
- os: linux
compiler: gcc
sudo: required
dist: trusty
env: KSB_TARGET=COVERAGE KSB_TYPE=Release
# Linux Clang debug build for scan-build.
- os: linux
compiler: clang
sudo: required
dist: trusty
env: KSB_TARGET=SCAN KSB_TYPE=Debug
# Linux Clang release build for scan-build.
- os: linux
compiler: clang
sudo: required
dist: trusty
env: KSB_TARGET=SCAN KSB_TYPE=Release
# Mac OS X Clang debug build.
- os: osx
compiler: clang
sudo: required
env: KSB_TARGET=OSX KSB_TYPE=Debug
# Mac OS X Clang release build.
- os: osx
compiler: clang
sudo: required
env: KSB_TARGET=OSX KSB_TYPE=Release
cache:
apt: true
branches:
only:
- master
addons:
apt:
packages:
- ninja-build
- lcov
android:
components:
- tools
- platform-tools
- build-tools-23.0.2
- android-23
before_install:
# Install the appropriate Linux packages.
- if [[ "$KSB_TARGET" == "LINUX" || "$KSB_TARGET" == "COVERAGE" || "$KSB_TARGET" == "SCAN" ]]; then sudo apt-get update; fi
- if [[ "$KSB_TARGET" == "LINUX" || "$KSB_TARGET" == "COVERAGE" || "$KSB_TARGET" == "SCAN" ]]; then sudo apt-get -y install python3 libx11-dev libxxf86vm-dev libxrandr-dev libxcb1-dev libxcb-keysyms1-dev libxcb-icccm4-dev clang; fi
# Install ninja and python 3 on Mac OS X.
- if [[ "$KSB_TARGET" == "OSX" ]]; then brew update; fi
- if [[ "$KSB_TARGET" == "OSX" ]]; then brew install ninja; fi
- if [[ "$KSB_TARGET" == "OSX" ]]; then brew install python3; fi
- if [[ "$KSB_TARGET" == "OSX" ]]; then virtualenv venv -p python3; fi
- if [[ "$KSB_TARGET" == "OSX" ]]; then source venv/bin/activate; fi
# Install the Android NDK.
- if [[ "$KSB_TARGET" == "ANDROID" ]]; then sudo apt-get -y install python3; fi
- if [[ "$KSB_TARGET" == "ANDROID" ]]; then export ARCH=`uname -m`; fi
- if [[ "$KSB_TARGET" == "ANDROID" ]]; then wget http://dl.google.com/android/repository/android-ndk-r13b-linux-${ARCH}.zip; fi
- if [[ "$KSB_TARGET" == "ANDROID" ]]; then unzip -u -q android-ndk-r13b-linux-${ARCH}.zip; fi
- if [[ "$KSB_TARGET" == "ANDROID" ]]; then export ANDROID_NDK_HOME=`pwd`/android-ndk-r13b; fi
- if [[ "$KSB_TARGET" == "ANDROID" ]]; then export JAVA_HOME="/usr/lib/jvm/java-8-oracle"; fi
- if [[ "$KSB_TARGET" == "ANDROID" ]]; then export PATH="$ANDROID_NDK_HOME:$PATH"; fi
install:
- if [[ "$KSB_TARGET" == "LINUX" || "$KSB_TARGET" == "COVERAGE" || "$KSB_TARGET" == "SCAN" ]]; then pip install --user nose; fi
- if [[ "$KSB_TARGET" == "LINUX" || "$KSB_TARGET" == "COVERAGE" || "$KSB_TARGET" == "SCAN" ]]; then pip install --user cpp-coveralls; fi
# Make sure we can find the above Python packages
- if [[ "$KSB_TARGET" == "LINUX" || "$KSB_TARGET" == "COVERAGE" || "$KSB_TARGET" == "SCAN" ]]; then export PATH=$HOME/.local/bin:$PATH; fi
before_script:
- git clone https://github.com/KhronosGroup/glslang.git ../glslang
- git clone https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers.git ../Vulkan-LoaderAndValidationLayers
script:
- if [[ "$KSB_TARGET" == "LINUX" ]]; then mkdir build && cd build; fi
- if [[ "$KSB_TARGET" == "LINUX" ]]; then cmake -GNinja -DCMAKE_BUILD_TYPE=${KSB_TYPE:-Debug} ..; fi
- if [[ "$KSB_TARGET" == "LINUX" ]]; then ninja; fi
- if [[ "$KSB_TARGET" == "COVERAGE" ]]; then mkdir build && cd build; fi
- if [[ "$KSB_TARGET" == "COVERAGE" ]]; then cmake -GNinja -DCMAKE_BUILD_TYPE=${KSB_TYPE:-Debug} -DENABLE_CODE_COVERAGE=ON ..; fi
- if [[ "$KSB_TARGET" == "COVERAGE" ]]; then ninja; fi
- if [[ "$KSB_TARGET" == "SCAN" ]]; then mkdir build && cd build; fi
- if [[ "$KSB_TARGET" == "SCAN" ]]; then scan-build cmake -GNinja -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_BUILD_TYPE=${KSB_TYPE:-Debug} ..; fi
- if [[ "$KSB_TARGET" == "SCAN" ]]; then scan-build ninja; fi
- if [[ "$KSB_TARGET" == "OSX" ]]; then mkdir build && cd build; fi
- if [[ "$KSB_TARGET" == "OSX" ]]; then cmake -GNinja -DCMAKE_BUILD_TYPE=${KSB_TYPE:-Debug} ..; fi
- if [[ "$KSB_TARGET" == "OSX" ]]; then ninja; fi
- if [[ "$KSB_TARGET" == "ANDROID" && "$KSB_TYPE" == "NDK" ]]; then ./build_android_ndk.sh; fi
- if [[ "$KSB_TARGET" == "ANDROID" && "$KSB_TYPE" == "GRADLE" ]]; then ./build_android_gradle.sh; fi
after_success:
# Collect coverage and push to coveralls.info.
# Ignore third party source code and tests.
- if [[ "$KSB_TARGET" == "COVERAGE" ]]; then
coveralls
--root ../
--build-root ./
--exclude-pattern '.+/external/'
--exclude-pattern '.+/.+_test/.cc'
--exclude-pattern '.+/CMakeFiles/'
--gcov /usr/bin/gcov
--gcov-options '/--long-file-names --preserve-paths'
--verbose;
fi
notifications:
email:
recipients:
on_success: change
on_failure: always