forked from intel/intel-graphics-compiler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
146 lines (137 loc) · 5.09 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
language: cpp
#llvm 8
v8: &v8
- llvm-8-tools
- llvm-8-dev
- libclang-8-dev
- clang-8
- clang-tools-8
#SPIRV for llvm8
v8install: &v8install
- export TARBALL1=SPIRV-LLVM-Translator-v8.0.1-2-linux-${BUILD_TYPE}.zip
- wget https://github.com/KhronosGroup/SPIRV-LLVM-Translator/releases/download/v8.0.1-2/${TARBALL1} -O /tmp/${TARBALL1}
- unzip /tmp/${TARBALL1} -d spirv-llvm-translator
#llvm 9
v9: &v9
- llvm-9-tools
- llvm-9-dev
- libclang-9-dev
- clang-9
- clang-tools-9
#SPIRV for llvm9
v9install: &v9install
- export TARBALL2=SPIRV-LLVM-Translator-v9.0.0-1-linux-${BUILD_TYPE}.zip
- wget https://github.com/KhronosGroup/SPIRV-LLVM-Translator/releases/download/v9.0.0-1/${TARBALL2} -O /tmp/${TARBALL2}
- unzip /tmp/${TARBALL2} -d spirv-llvm-translator
matrix:
include:
- os: linux
dist: xenial # Ubuntu 16.04 w/ llvm8
env: LLVM_VER=8 BUILD_TYPE=Release COMPILER=gcc
before_install:
- git clone -b ocl-open-80 https://github.com/intel/opencl-clang opencl-clang
addons:
apt:
sources:
- sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
packages: *v8
install: *v8install
- os: linux
dist: bionic # Ubuntu 18.04 w/ llvm8
env: LLVM_VER=8 BUILD_TYPE=Release COMPILER=gcc
before_install:
- git clone -b ocl-open-80 https://github.com/intel/opencl-clang opencl-clang
addons:
apt:
sources:
- sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-8 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
packages: *v8
install: *v8install
- os: linux
dist: xenial # Ubuntu 16.04 w/ llvm9
env: LLVM_VER=9 BUILD_TYPE=Release COMPILER=gcc
before_install:
- git clone -b ocl-open-90 https://github.com/intel/opencl-clang opencl-clang
addons:
apt:
sources:
- sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
packages: *v9
install: *v9install
- os: linux
dist: bionic # Ubuntu 18.04 w/ llvm9
env: LLVM_VER=9 BUILD_TYPE=Release COMPILER=gcc
before_install:
- git clone -b ocl-open-90 https://github.com/intel/opencl-clang opencl-clang
addons:
apt:
sources:
- sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
packages: *v9
install: *v9install
- os: linux
dist: xenial # Ubuntu 16.04 w/ llvm8
env: LLVM_VER=8 BUILD_TYPE=Release COMPILER=clang
before_install:
- git clone -b ocl-open-80 https://github.com/intel/opencl-clang opencl-clang
addons:
apt:
sources:
- sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
packages: *v8
install: *v8install
- os: linux
dist: bionic # Ubuntu 18.04 w/ llvm8
env: LLVM_VER=8 BUILD_TYPE=Release COMPILER=clang
before_install:
- git clone -b ocl-open-80 https://github.com/intel/opencl-clang opencl-clang
addons:
apt:
sources:
- sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-8 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
packages: *v8
install: *v8install
- os: linux
dist: xenial # Ubuntu 16.04 w/ llvm9
env: LLVM_VER=9 BUILD_TYPE=Release COMPILER=clang
before_install:
- git clone -b ocl-open-90 https://github.com/intel/opencl-clang opencl-clang
addons:
apt:
sources:
- sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
packages: *v9
install: *v9install
- os: linux
dist: bionic # Ubuntu 18.04 w/ llvm9
env: LLVM_VER=9 BUILD_TYPE=Release COMPILER=clang
before_install:
- git clone -b ocl-open-90 https://github.com/intel/opencl-clang opencl-clang
addons:
apt:
sources:
- sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
packages: *v9
install: *v9install
git:
depth: 1
branches:
only:
- master
script:
- if [ "${LLVM_VER}" == "9" ]; then sudo touch /usr/lib/llvm-9/bin/lit-cpuid; fi #Cmake fix
- mkdir opencl-clang/build && cd opencl-clang/build
- cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DLLVM_NO_DEAD_STRIP=ON -DLLVMSPIRV_INCLUDED_IN_LLVM=OFF -DSPIRV_TRANSLATOR_DIR=../spirv-llvm-translator ..
- sudo make install
- cd ../..
- mkdir build && cd build
- cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_FIND_DEBUG_MODE=ON -DIGC_PREFERRED_LLVM_VERSION=${LLVM_VER} -DCCLANG_FROM_SYSTEM=TRUE ../IGC
- make -j`nproc`