forked from KhronosGroup/SPIRV-Tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
88 lines (73 loc) · 2.12 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
# Linux Build Configuration for Travis
language: cpp
os:
- linux
- osx
# Use Ubuntu 14.04 LTS (Trusty) as the Linux testing environment.
sudo: required
dist: trusty
# Use OS X 10.11 with XCode 7.2
# https://docs.travis-ci.com/user/osx-ci-environment/#OS-X-Version
osx_image: xcode7.2
env:
# Each line is a set of environment variables set before a build.
# Thus each line represents a different build configuration.
- BUILD_TYPE=Release
- BUILD_TYPE=Debug
compiler:
- clang
- gcc
matrix:
fast_finish: true
include:
# Additional build using Android NDK
- env: BUILD_NDK=ON
exclude:
# Skip GCC builds on Mac OS X.
- os: osx
compiler: gcc
cache:
apt: true
branches:
only:
- master
addons:
apt:
packages:
- ninja-build
before_install:
# Install cmake & ninja on Mac OS X.
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update && brew install cmake ninja; fi
- if [[ "$BUILD_NDK" == "ON" ]]; then
git clone --depth=1 https://github.com/urho3d/android-ndk.git $HOME/android-ndk;
export ANDROID_NDK=$HOME/android-ndk;
git clone --depth=1 https://github.com/taka-no-me/android-cmake.git $HOME/android-cmake;
export TOOLCHAIN_PATH=$HOME/android-cmake/android.toolchain.cmake;
fi
before_script:
- git clone https://github.com/KhronosGroup/SPIRV-Headers.git external/spirv-headers
- git clone https://github.com/google/googletest.git external/googletest
script:
- mkdir build && cd build
- if [[ "$BUILD_NDK" == "ON" ]]; then
cmake -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_PATH}
-DANDROID_NATIVE_API_LEVEL=android-9
-DCMAKE_BUILD_TYPE=Release
-DANDROID_ABI="armeabi-v7a with NEON"
-DSPIRV_SKIP_TESTS=ON
-GNinja ..;
else
cmake -GNinja -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ..;
fi
- ninja
- if [[ "$BUILD_NDK" != "ON" ]]; then ctest -j`nproc` --output_on_failure; fi
notifications:
email:
recipients:
on_success: change
on_failure: always