forked from KhronosGroup/Vulkan-Samples-Deprecated
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
138 lines (125 loc) · 4.97 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
# Build Configuration for Travis
# https://travis-ci.org
language:
- cpp
jdk: oraclejdk8
matrix:
# Show final status immediately if a test fails.
fast_finish: true
include:
# Android build.
- language: android
os: linux
sudo: required
dist: precise
env: VULKAN_SAMPLES_BUILD_CONFIG=ANDROID ANDROID_TARGET=android-21 ANDROID_ABI=armeabi-v7a
# Linux GCC debug build.
- os: linux
compiler: gcc
sudo: required
dist: trusty
env: VULKAN_SAMPLES_BUILD_CONFIG=NORMAL VULKAN_SAMPLES_BUILD_TYPE=Debug
# Linux GCC release build.
- os: linux
compiler: gcc
sudo: required
dist: trusty
env: VULKAN_SAMPLES_BUILD_CONFIG=NORMAL VULKAN_SAMPLES_BUILD_TYPE=Release
# Linux Clang debug build.
- os: linux
compiler: clang
sudo: required
dist: trusty
env: VULKAN_SAMPLES_BUILD_CONFIG=NORMAL VULKAN_SAMPLES_BUILD_TYPE=Debug
# Linux Clang release build.
- os: linux
compiler: clang
sudo: required
dist: trusty
env: VULKAN_SAMPLES_BUILD_CONFIG=NORMAL VULKAN_SAMPLES_BUILD_TYPE=Release
# Linux GCC build for code coverage.
- os: linux
compiler: gcc
sudo: required
dist: trusty
env: VULKAN_SAMPLES_BUILD_CONFIG=COVERAGE
# Linux Clang build for scan-build.
- os: linux
compiler: clang
sudo: required
dist: trusty
env: VULKAN_SAMPLES_BUILD_CONFIG=SCAN
# Mac OS X Clang debug build.
- os: osx
compiler: clang
sudo: required
env: VULKAN_SAMPLES_BUILD_CONFIG=NORMAL VULKAN_SAMPLES_BUILD_TYPE=Debug
# Mac OS X Clang release build.
- os: osx
compiler: clang
sudo: required
env: VULKAN_SAMPLES_BUILD_CONFIG=NORMAL VULKAN_SAMPLES_BUILD_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 ninja on Mac OS X.
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update && brew install ninja; fi
# Install the appropriate Linux packages.
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update && sudo apt-get -y install python3 libx11-dev libxxf86vm-dev libxrandr-dev libxcb1-dev libxcb-keysyms1-dev libxcb-icccm4-dev clang; fi
# Install the Android NDK.
- if [[ "$VULKAN_SAMPLES_BUILD_CONFIG" == "ANDROID" ]]; then export ARCH=`uname -m`; fi
- if [[ "$VULKAN_SAMPLES_BUILD_CONFIG" == "ANDROID" ]]; then wget http://dl.google.com/android/repository/android-ndk-r12b-linux-${ARCH}.zip; fi
- if [[ "$VULKAN_SAMPLES_BUILD_CONFIG" == "ANDROID" ]]; then unzip -u -q android-ndk-r12b-linux-${ARCH}.zip; fi
- if [[ "$VULKAN_SAMPLES_BUILD_CONFIG" == "ANDROID" ]]; then export ANDROID_NDK_HOME=`pwd`/android-ndk-r12b; fi
- if [[ "$VULKAN_SAMPLES_BUILD_CONFIG" == "ANDROID" ]]; then export JAVA_HOME="/usr/lib/jvm/java-8-oracle"; fi
install:
- pip install --user nose
- pip install --user cpp-coveralls
# Make sure we can find the above Python packages
- export PATH=$HOME/.local/bin:$PATH
before_script:
- git clone https://github.com/KhronosGroup/glslang.git ../glslang
- git clone https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers.git ../Vulkan-LoaderAndValidationLayers
script:
- if [[ "$VULKAN_SAMPLES_BUILD_CONFIG" == "NORMAL" || "$VULKAN_SAMPLES_BUILD_CONFIG" == "COVERAGE" || "$VULKAN_SAMPLES_BUILD_CONFIG" == "SCAN" ]]; then mkdir build && cd build; fi
- if [[ "$VULKAN_SAMPLES_BUILD_CONFIG" == "NORMAL" ]]; then cmake -GNinja -DCMAKE_BUILD_TYPE=${VULKAN_SAMPLES_BUILD_TYPE:-Debug} ..; fi
- if [[ "$VULKAN_SAMPLES_BUILD_CONFIG" == "COVERAGE" ]]; then cmake -GNinja -DCMAKE_BUILD_TYPE=${VULKAN_SAMPLES_BUILD_TYPE:-Debug} -DENABLE_CODE_COVERAGE=ON ..; fi
- if [[ "$VULKAN_SAMPLES_BUILD_CONFIG" == "NORMAL" || "$VULKAN_SAMPLES_BUILD_CONFIG" == "COVERAGE" ]]; then ninja; fi
- if [[ "$VULKAN_SAMPLES_BUILD_CONFIG" == "NORMAL" || "$VULKAN_SAMPLES_BUILD_CONFIG" == "COVERAGE" ]]; then ctest -j`nproc` --output-on-failure; fi
- if [[ "$VULKAN_SAMPLES_BUILD_CONFIG" == "SCAN" ]]; then scan-build cmake -GNinja -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_BUILD_TYPE=Debug ..; fi
- if [[ "$VULKAN_SAMPLES_BUILD_CONFIG" == "SCAN" ]]; then scan-build ninja; fi
- if [[ "$VULKAN_SAMPLES_BUILD_CONFIG" == "ANDROID" ]]; then ./build_android.sh; fi
after_success:
# Collect coverage and push to coveralls.info.
# Ignore third party source code and tests.
- if [[ "$CC" == "gcc" && "$VULKAN_SAMPLES_CODE_COVERAGE" == "ON" ]]; 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