forked from KhronosGroup/SPIRV-LLVM-Translator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
78 lines (69 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
language: cpp
os:
- linux
# Use Ubuntu 14.04 LTS (Trusty) as the Linux testing environment.
dist: trusty
sudo: false
git:
depth: 1
addons:
apt:
sources:
# adds deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty main
- llvm-toolchain-trusty
- ubuntu-toolchain-r-test
packages:
- llvm-7-tools
- llvm-7-dev
compiler:
- gcc
- clang
env:
global:
- MAKEFLAGS="-j2"
matrix:
- BUILD_TYPE=Release BUILD_EXTERNAL=1 MAKE_TARGETS="" MAKE_TEST_TARGET="test"
- BUILD_TYPE=Debug BUILD_EXTERNAL=1 MAKE_TARGETS="" MAKE_TEST_TARGET="test"
- BUILD_TYPE=Release BUILD_EXTERNAL=0 MAKE_TARGETS="llvm-spirv" MAKE_TEST_TARGET="check-llvm-spirv"
- BUILD_TYPE=Debug BUILD_EXTERNAL=0 MAKE_TARGETS="llvm-spirv" MAKE_TEST_TARGET="check-llvm-spirv"
# some bug inside clang-5.0.0, works with 5.0.1
matrix:
include:
- os: osx
env: BUILD_TYPE=Release BUILD_EXTERNAL=0 MAKE_TARGETS="llvm-spirv" MAKE_TEST_TARGET="check-llvm-spirv"
osx_image: xcode9.3
- os: osx
env: BUILD_TYPE=Debug BUILD_EXTERNAL=0 MAKE_TARGETS="llvm-spirv" MAKE_TEST_TARGET="check-llvm-spirv"
osx_image: xcode9.3
allow_failures:
- compiler: clang
- os: osx
fast_finish: true
script:
- |
if [ $BUILD_EXTERNAL == "0" ]; then
mkdir llvm-spirv
mv * llvm-spirv
git clone https://git.llvm.org/git/llvm.git/ --depth 1
mv llvm-spirv llvm/tools/llvm-spirv
fi
- mkdir build && cd build
- |
if [ $BUILD_EXTERNAL == "1" ]; then
cmake .. \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DLLVM_BUILD_TOOLS=ON \
-DLLVM_EXTERNAL_LIT="/usr/lib/llvm-7/build/utils/lit/lit.py" \
-DLLVM_INCLUDE_TESTS=ON \
-DCMAKE_INSTALL_PREFIX=../install/ \
-G "Unix Makefiles"
else
cmake ../llvm/ \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DLLVM_BUILD_TOOLS=ON \
-DLLVM_BUILD_TESTS=ON \
-DLLVM_INCLUDE_TESTS=ON \
-DLLVM_LIT_ARGS="-sv --no-progress-bar" \
-G "Unix Makefiles"
fi
- make $MAKE_TARGETS && make $MAKE_TEST_TARGET && if [ $BUILD_EXTERNAL == "1" ]; then make install; fi