blob: 979cbadc7176950a2f98fa5997feff7ba0507d61 [file] [log] [blame]
Eric Engestrom329f5cd2019-01-20 11:21:45 +00001# This is the tag of the docker image used for the build jobs. If the
2# image doesn't exist yet, the containers-build stage generates it.
3#
4# In order to generate a new image, one should generally change the tag.
5# While removing the image from the registry would also work, that's not
6# recommended except for ephemeral images during development: Replacing
7# an image after a significant amount of time might pull in newer
8# versions of gcc/clang or other packages, which might break the build
9# with older commits using the same tag.
10#
11# After merging a change resulting in generating a new image to the
12# main repository, it's recommended to remove the image from the source
13# repository's container registry, so that the image from the main
14# repository's registry will be used there as well.
15#
16# The format of the tag is "%Y-%m-%d-${counter}" where ${counter} stays
17# at "01" unless you have multiple updates on the same day :)
18variables:
19 UBUNTU_TAG: 2019-01-31-01
20 UBUNTU_IMAGE: "$CI_REGISTRY/$CI_PROJECT_PATH/ubuntu:$UBUNTU_TAG"
21
22
23stages:
24 - containers-build
Eric Engestrom46d23c02019-01-20 11:26:53 +000025 - build+test
Eric Engestrom329f5cd2019-01-20 11:21:45 +000026
27
28# CONTAINERS
29
30containers:ubuntu:
31 stage: containers-build
32 image: docker:stable
33 services:
34 - docker:dind
35 variables:
36 DOCKER_HOST: tcp://docker:2375
37 DOCKER_DRIVER: overlay2
38 script:
39 # Enable experimental features such as `docker manifest inspect`
40 - mkdir -p ~/.docker
41 - "echo '{\"experimental\": \"enabled\"}' > ~/.docker/config.json"
42 - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
43 # Check if the image (with the specific tag) already exists
44 - docker manifest inspect $UBUNTU_IMAGE && exit || true
45 - docker build -t $UBUNTU_IMAGE -f .gitlab-ci/Dockerfile.ubuntu .
46 - docker push $UBUNTU_IMAGE
47 only:
48 changes:
49 - .gitlab-ci.yml
50 - .gitlab-ci/Dockerfile.ubuntu
Eric Engestrom46d23c02019-01-20 11:26:53 +000051
52
53# BUILD
54
55.build:
56 image: $UBUNTU_IMAGE
57 stage: build+test
58 artifacts:
59 when: on_failure
60 untracked: true
61
62.meson-build:
63 extends: .build
64 before_script:
65 # We need to control the version of llvm-config we're using, so we'll
66 # generate a native file to do so. This requires meson >=0.49
67 - if test -n "$LLVM_VERSION"; then
68 LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
69 echo -e "[binaries]\nllvm-config = '`which $LLVM_CONFIG`'" > native.file;
70 $LLVM_CONFIG --version;
71 else
72 touch native.file;
73 fi
74 - meson --version
75 - meson _build
76 --native-file=native.file
77 -D build-tests=true
78 -D libunwind=${UNWIND}
79 ${DRI_LOADERS}
80 -D dri-drivers=${DRI_DRIVERS:-[]}
81 ${GALLIUM_ST}
82 -D gallium-drivers=${GALLIUM_DRIVERS:-[]}
83 -D vulkan-drivers=${VULKAN_DRIVERS:-[]}
84 - cd _build
85 - meson configure
86 script:
87 - ninja
88 - ninja test
89
Eric Engestrom89a74672019-01-21 09:42:37 +000090.make-build:
91 extends: .build
92 variables:
93 MAKEFLAGS: "-j4"
94 before_script:
95 - if test -n "$LLVM_VERSION"; then
96 export LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
97 fi
98 - mkdir build
99 - cd build
100 - ../autogen.sh
101 --enable-autotools
102 --enable-debug
103 $LIBUNWIND_FLAGS
104 $DRI_LOADERS
105 --with-dri-drivers=$DRI_DRIVERS
106 $GALLIUM_ST
107 --with-gallium-drivers=$GALLIUM_DRIVERS
108 --with-vulkan-drivers=$VULKAN_DRIVERS
109 --disable-llvm-shared-libs
110 script:
111 - make
112 - eval $MAKE_CHECK_COMMAND
113
Eric Engestrom06b245b2019-01-23 15:46:10 +0000114.scons-build:
115 extends: .build
116 variables:
117 SCONSFLAGS: "-j4"
118 script:
Eric Engestromd4c6d4d2019-01-28 16:30:36 +0000119 - if test -n "$LLVM_VERSION"; then
120 export LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
121 fi
Eric Engestrom06b245b2019-01-23 15:46:10 +0000122 - scons $SCONS_TARGET
123 - eval $SCONS_CHECK_COMMAND
124
Eric Engestrom46d23c02019-01-20 11:26:53 +0000125build:meson-vulkan:
126 extends: .meson-build
127 variables:
128 UNWIND: "false"
129 DRI_LOADERS: >
130 -D glx=disabled
131 -D gbm=false
132 -D egl=false
133 -D platforms=x11,wayland,drm
134 -D osmesa=none
135 GALLIUM_ST: >
136 -D dri3=true
137 -D gallium-vdpau=false
138 -D gallium-xvmc=false
139 -D gallium-omx=disabled
140 -D gallium-va=false
141 -D gallium-xa=false
142 -D gallium-nine=false
143 -D gallium-opencl=disabled
144 VULKAN_DRIVERS: intel,amd
145 LLVM_VERSION: "7"
Eric Engestrom89a74672019-01-21 09:42:37 +0000146
Eric Engestromd73265e2019-01-28 17:38:17 +0000147build:meson-loader-classic-dri:
148 extends: .meson-build
149 variables:
150 UNWIND: "false"
151 DRI_LOADERS: >
152 -D glx=dri
153 -D gbm=true
154 -D egl=true
155 -D platforms=x11,wayland,drm,surfaceless
156 -D osmesa=classic
157 DRI_DRIVERS: "i915,i965,r100,r200,swrast,nouveau"
158 GALLIUM_ST: >
159 -D dri3=true
160 -D gallium-vdpau=false
161 -D gallium-xvmc=false
162 -D gallium-omx=disabled
163 -D gallium-va=false
164 -D gallium-xa=false
165 -D gallium-nine=false
166 -D gallium-opencl=disabled
167
Eric Engestrom360c8142019-01-28 17:42:59 +0000168# NOTE: Building SWR is 2x (yes two) times slower than all the other
169# gallium drivers combined.
170# Start this early so that it doesn't hunder the run time.
171build:meson-gallium-swr:
172 extends: .meson-build
173 variables:
174 UNWIND: "true"
175 DRI_LOADERS: >
176 -D glx=disabled
177 -D egl=false
178 -D gbm=false
179 GALLIUM_ST: >
180 -D dri3=false
181 -D gallium-vdpau=false
182 -D gallium-xvmc=false
183 -D gallium-omx=disabled
184 -D gallium-va=false
185 -D gallium-xa=false
186 -D gallium-nine=false
187 -D gallium-opencl=disabled
188 GALLIUM_DRIVERS: "swr"
189 LLVM_VERSION: "6.0"
190
Eric Engestrom06e8f192019-01-28 17:45:26 +0000191build:meson-gallium-radeonsi:
192 extends: .meson-build
193 variables:
194 UNWIND: "true"
195 DRI_LOADERS: >
196 -D glx=disabled
197 -D egl=false
198 -D gbm=false
199 GALLIUM_ST: >
200 -D dri3=false
201 -D gallium-vdpau=false
202 -D gallium-xvmc=false
203 -D gallium-omx=disabled
204 -D gallium-va=false
205 -D gallium-xa=false
206 -D gallium-nine=false
207 -D gallium-opencl=disabled
208 GALLIUM_DRIVERS: "radeonsi"
209 LLVM_VERSION: "7"
210
Eric Engestromd407ead2019-01-28 17:47:09 +0000211build:meson-gallium-drivers-other:
212 extends: .meson-build
213 variables:
214 UNWIND: "true"
215 DRI_LOADERS: >
216 -D glx=disabled
217 -D egl=false
218 -D gbm=false
219 GALLIUM_ST: >
220 -D dri3=false
221 -D gallium-vdpau=false
222 -D gallium-xvmc=false
223 -D gallium-omx=disabled
224 -D gallium-va=false
225 -D gallium-xa=false
226 -D gallium-nine=false
227 -D gallium-opencl=disabled
228 GALLIUM_DRIVERS: "i915,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv"
229 LLVM_VERSION: "5.0"
230
Eric Engestromb5a70af2019-01-28 18:05:22 +0000231build:meson-gallium-clover-llvm5:
232 extends: .meson-build
233 variables:
234 UNWIND: "true"
235 DRI_LOADERS: >
236 -D glx=disabled
237 -D egl=false
238 -D gbm=false
239 GALLIUM_ST: >
240 -D dri3=false
241 -D gallium-vdpau=false
242 -D gallium-xvmc=false
243 -D gallium-omx=disabled
244 -D gallium-va=false
245 -D gallium-xa=false
246 -D gallium-nine=false
247 -D gallium-opencl=icd
248 GALLIUM_DRIVERS: "r600"
249 LLVM_VERSION: "5.0"
250
Eric Engestrom89a74672019-01-21 09:42:37 +0000251build:make-vulkan:
252 extends: .make-build
253 variables:
254 MAKE_CHECK_COMMAND: "make -C src/gtest check && make -C src/intel check"
255 LLVM_VERSION: "7"
256 DRI_LOADERS: >
257 --disable-glx
258 --disable-gbm
259 --disable-egl
260 --with-platforms=x11,wayland,drm
261 DRI_DRIVERS: ""
262 GALLIUM_ST: >
263 --enable-dri
264 --enable-dri3
265 --disable-opencl
266 --disable-xa
267 --disable-nine
268 --disable-xvmc
269 --disable-vdpau
270 --disable-va
271 --disable-omx-bellagio
272 --disable-gallium-osmesa
273 VULKAN_DRIVERS: intel,radeon
274 LIBUNWIND_FLAGS: --disable-libunwind
Eric Engestrom06b245b2019-01-23 15:46:10 +0000275
276build:scons-nollvm:
277 extends: .scons-build
278 variables:
279 SCONS_TARGET: "llvm=0"
280 SCONS_CHECK_COMMAND: "scons llvm=0 check"
Eric Engestromd4c6d4d2019-01-28 16:30:36 +0000281
282build:scons-llvm:
283 extends: .scons-build
284 variables:
285 SCONS_TARGET: "llvm=1"
286 SCONS_CHECK_COMMAND: "scons llvm=1 check"
287 LLVM_VERSION: "3.9"
Eric Engestrom6a19ec92019-01-28 16:33:22 +0000288
289build:scons-swr:
290 extends: .scons-build
291 variables:
292 SCONS_TARGET: "swr=1"
293 SCONS_CHECK_COMMAND: "true"
294 LLVM_VERSION: "6.0"