Eric Engestrom | 329f5cd | 2019-01-20 11:21:45 +0000 | [diff] [blame] | 1 | # 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 :) |
| 18 | variables: |
Benjamin Tissoires | 7f8a9a1 | 2019-04-02 09:24:00 +0200 | [diff] [blame] | 19 | UPSTREAM_REPO: mesa/mesa |
Michel Dänzer | d00b1c4 | 2019-04-02 16:56:54 +0200 | [diff] [blame] | 20 | DEBIAN_TAG: "2019-04-16" |
| 21 | DEBIAN_VERSION: stretch-slim |
| 22 | DEBIAN_IMAGE: "$CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:$DEBIAN_TAG" |
Benjamin Tissoires | 7f8a9a1 | 2019-04-02 09:24:00 +0200 | [diff] [blame] | 23 | |
| 24 | include: |
| 25 | - project: 'wayland/ci-templates' |
| 26 | ref: c73dae8b84697ef18e2dbbf4fed7386d9652b0cd |
Michel Dänzer | d00b1c4 | 2019-04-02 16:56:54 +0200 | [diff] [blame] | 27 | file: '/templates/debian.yml' |
Eric Engestrom | 329f5cd | 2019-01-20 11:21:45 +0000 | [diff] [blame] | 28 | |
Eric Engestrom | 329f5cd | 2019-01-20 11:21:45 +0000 | [diff] [blame] | 29 | stages: |
| 30 | - containers-build |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 31 | - build+test |
Eric Engestrom | 329f5cd | 2019-01-20 11:21:45 +0000 | [diff] [blame] | 32 | |
| 33 | |
Eric Engestrom | 7f5d9c2 | 2019-02-22 15:52:08 +0000 | [diff] [blame] | 34 | # When to automatically run the CI |
Benjamin Tissoires | 7f8a9a1 | 2019-04-02 09:24:00 +0200 | [diff] [blame] | 35 | .ci-run-policy: &ci-run-policy |
Eric Engestrom | 7f5d9c2 | 2019-02-22 15:52:08 +0000 | [diff] [blame] | 36 | only: |
Michel Dänzer | b48e64f | 2019-04-10 10:33:13 +0200 | [diff] [blame] | 37 | - branches@mesa/mesa |
Eric Engestrom | 7f5d9c2 | 2019-02-22 15:52:08 +0000 | [diff] [blame] | 38 | - merge_requests |
| 39 | - /^ci([-/].*)?$/ |
Michel Dänzer | 6140ed3 | 2019-03-26 18:39:41 +0100 | [diff] [blame] | 40 | retry: |
| 41 | max: 2 |
| 42 | when: |
| 43 | - runner_system_failure |
Eric Engestrom | 7f5d9c2 | 2019-02-22 15:52:08 +0000 | [diff] [blame] | 44 | |
| 45 | |
Eric Engestrom | 329f5cd | 2019-01-20 11:21:45 +0000 | [diff] [blame] | 46 | # CONTAINERS |
| 47 | |
Michel Dänzer | d00b1c4 | 2019-04-02 16:56:54 +0200 | [diff] [blame] | 48 | debian: |
| 49 | extends: .debian@container-ifnot-exists |
Eric Engestrom | 329f5cd | 2019-01-20 11:21:45 +0000 | [diff] [blame] | 50 | stage: containers-build |
Benjamin Tissoires | 7f8a9a1 | 2019-04-02 09:24:00 +0200 | [diff] [blame] | 51 | <<: *ci-run-policy |
Eric Engestrom | 329f5cd | 2019-01-20 11:21:45 +0000 | [diff] [blame] | 52 | variables: |
Benjamin Tissoires | 7f8a9a1 | 2019-04-02 09:24:00 +0200 | [diff] [blame] | 53 | GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image |
Michel Dänzer | d00b1c4 | 2019-04-02 16:56:54 +0200 | [diff] [blame] | 54 | DEBIAN_EXEC: 'bash .gitlab-ci/debian-install.sh' |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 55 | |
| 56 | |
| 57 | # BUILD |
| 58 | |
| 59 | .build: |
Benjamin Tissoires | 7f8a9a1 | 2019-04-02 09:24:00 +0200 | [diff] [blame] | 60 | <<: *ci-run-policy |
Michel Dänzer | d00b1c4 | 2019-04-02 16:56:54 +0200 | [diff] [blame] | 61 | image: $DEBIAN_IMAGE |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 62 | stage: build+test |
Michel Dänzer | a3f34f9 | 2019-03-26 18:35:59 +0100 | [diff] [blame] | 63 | cache: |
| 64 | paths: |
| 65 | - ccache |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 66 | artifacts: |
| 67 | when: on_failure |
| 68 | untracked: true |
Michel Dänzer | e9de19f | 2019-04-04 18:01:27 +0200 | [diff] [blame^] | 69 | variables: |
| 70 | CCACHE_COMPILERCHECK: "content" |
Eric Engestrom | 23b485c | 2019-02-12 16:59:27 +0000 | [diff] [blame] | 71 | # Use ccache transparently, and print stats before/after |
| 72 | before_script: |
| 73 | - export PATH="/usr/lib/ccache:$PATH" |
| 74 | - export CCACHE_BASEDIR="$PWD" |
| 75 | - export CCACHE_DIR="$PWD/ccache" |
Eric Engestrom | 23b485c | 2019-02-12 16:59:27 +0000 | [diff] [blame] | 76 | - ccache --zero-stats || true |
| 77 | - ccache --show-stats || true |
| 78 | after_script: |
| 79 | - export CCACHE_DIR="$PWD/ccache" |
| 80 | - ccache --show-stats |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 81 | |
| 82 | .meson-build: |
| 83 | extends: .build |
Eric Engestrom | 23b485c | 2019-02-12 16:59:27 +0000 | [diff] [blame] | 84 | script: |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 85 | # We need to control the version of llvm-config we're using, so we'll |
| 86 | # generate a native file to do so. This requires meson >=0.49 |
| 87 | - if test -n "$LLVM_VERSION"; then |
| 88 | LLVM_CONFIG="llvm-config-${LLVM_VERSION}"; |
| 89 | echo -e "[binaries]\nllvm-config = '`which $LLVM_CONFIG`'" > native.file; |
| 90 | $LLVM_CONFIG --version; |
| 91 | else |
| 92 | touch native.file; |
| 93 | fi |
| 94 | - meson --version |
| 95 | - meson _build |
| 96 | --native-file=native.file |
| 97 | -D build-tests=true |
| 98 | -D libunwind=${UNWIND} |
| 99 | ${DRI_LOADERS} |
| 100 | -D dri-drivers=${DRI_DRIVERS:-[]} |
| 101 | ${GALLIUM_ST} |
| 102 | -D gallium-drivers=${GALLIUM_DRIVERS:-[]} |
| 103 | -D vulkan-drivers=${VULKAN_DRIVERS:-[]} |
Bas Nieuwenhuizen | 158d45d | 2019-03-13 00:15:09 +0100 | [diff] [blame] | 104 | -D I-love-half-baked-turnips=true |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 105 | - cd _build |
| 106 | - meson configure |
Eric Engestrom | 68a9383 | 2019-02-13 14:25:45 +0000 | [diff] [blame] | 107 | - ninja -j4 |
Michel Dänzer | ecb3eed | 2019-04-03 12:23:51 +0200 | [diff] [blame] | 108 | - LC_ALL=C.UTF-8 ninja test |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 109 | |
Eric Engestrom | 06b245b | 2019-01-23 15:46:10 +0000 | [diff] [blame] | 110 | .scons-build: |
| 111 | extends: .build |
| 112 | variables: |
| 113 | SCONSFLAGS: "-j4" |
| 114 | script: |
Eric Engestrom | d4c6d4d | 2019-01-28 16:30:36 +0000 | [diff] [blame] | 115 | - if test -n "$LLVM_VERSION"; then |
| 116 | export LLVM_CONFIG="llvm-config-${LLVM_VERSION}"; |
| 117 | fi |
Eric Engestrom | 06b245b | 2019-01-23 15:46:10 +0000 | [diff] [blame] | 118 | - scons $SCONS_TARGET |
| 119 | - eval $SCONS_CHECK_COMMAND |
| 120 | |
Michel Dänzer | a2cce70 | 2019-03-20 15:58:31 +0100 | [diff] [blame] | 121 | # NOTE: Building SWR is 2x (yes two) times slower than all the other |
| 122 | # gallium drivers combined. |
| 123 | # Start this early so that it doesn't limit the total run time. |
| 124 | meson-gallium-swr: |
| 125 | extends: .meson-build |
| 126 | variables: |
| 127 | UNWIND: "true" |
| 128 | DRI_LOADERS: > |
| 129 | -D glx=disabled |
| 130 | -D egl=false |
| 131 | -D gbm=false |
| 132 | GALLIUM_ST: > |
| 133 | -D dri3=false |
| 134 | -D gallium-vdpau=false |
| 135 | -D gallium-xvmc=false |
| 136 | -D gallium-omx=disabled |
| 137 | -D gallium-va=false |
| 138 | -D gallium-xa=false |
| 139 | -D gallium-nine=false |
| 140 | -D gallium-opencl=disabled |
| 141 | GALLIUM_DRIVERS: "swr" |
| 142 | LLVM_VERSION: "6.0" |
| 143 | |
| 144 | meson-clang: |
| 145 | extends: .meson-build |
| 146 | variables: |
| 147 | UNWIND: "true" |
| 148 | DRI_DRIVERS: "auto" |
| 149 | GALLIUM_DRIVERS: "auto" |
Michel Dänzer | 1aca01d | 2019-03-26 10:04:27 +0100 | [diff] [blame] | 150 | CC: "ccache clang-7" |
| 151 | CXX: "ccache clang++-7" |
Michel Dänzer | e9de19f | 2019-04-04 18:01:27 +0200 | [diff] [blame^] | 152 | before_script: |
| 153 | - export CCACHE_BASEDIR="$PWD" CCACHE_DIR="$PWD/ccache" |
| 154 | - ccache --zero-stats --show-stats || true |
| 155 | # clang++ breaks if it picks up the GCC 8 directory without libstdc++.so |
| 156 | - apt-get remove -y libgcc-8-dev |
Michel Dänzer | a2cce70 | 2019-03-20 15:58:31 +0100 | [diff] [blame] | 157 | |
Eric Engestrom | faf9e40 | 2019-02-26 14:40:29 +0000 | [diff] [blame] | 158 | meson-vulkan: |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 159 | extends: .meson-build |
| 160 | variables: |
| 161 | UNWIND: "false" |
| 162 | DRI_LOADERS: > |
| 163 | -D glx=disabled |
| 164 | -D gbm=false |
| 165 | -D egl=false |
| 166 | -D platforms=x11,wayland,drm |
| 167 | -D osmesa=none |
| 168 | GALLIUM_ST: > |
| 169 | -D dri3=true |
| 170 | -D gallium-vdpau=false |
| 171 | -D gallium-xvmc=false |
| 172 | -D gallium-omx=disabled |
| 173 | -D gallium-va=false |
| 174 | -D gallium-xa=false |
| 175 | -D gallium-nine=false |
| 176 | -D gallium-opencl=disabled |
Bas Nieuwenhuizen | 158d45d | 2019-03-13 00:15:09 +0100 | [diff] [blame] | 177 | VULKAN_DRIVERS: intel,amd,freedreno |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 178 | LLVM_VERSION: "7" |
Eric Engestrom | 89a7467 | 2019-01-21 09:42:37 +0000 | [diff] [blame] | 179 | |
Eric Engestrom | faf9e40 | 2019-02-26 14:40:29 +0000 | [diff] [blame] | 180 | meson-loader-classic-dri: |
Eric Engestrom | d73265e | 2019-01-28 17:38:17 +0000 | [diff] [blame] | 181 | extends: .meson-build |
| 182 | variables: |
| 183 | UNWIND: "false" |
| 184 | DRI_LOADERS: > |
| 185 | -D glx=dri |
| 186 | -D gbm=true |
| 187 | -D egl=true |
| 188 | -D platforms=x11,wayland,drm,surfaceless |
| 189 | -D osmesa=classic |
| 190 | DRI_DRIVERS: "i915,i965,r100,r200,swrast,nouveau" |
| 191 | GALLIUM_ST: > |
| 192 | -D dri3=true |
| 193 | -D gallium-vdpau=false |
| 194 | -D gallium-xvmc=false |
| 195 | -D gallium-omx=disabled |
| 196 | -D gallium-va=false |
| 197 | -D gallium-xa=false |
| 198 | -D gallium-nine=false |
| 199 | -D gallium-opencl=disabled |
| 200 | |
Eric Engestrom | faf9e40 | 2019-02-26 14:40:29 +0000 | [diff] [blame] | 201 | meson-glvnd: |
Eric Engestrom | ba26bc4 | 2019-01-29 08:57:17 +0000 | [diff] [blame] | 202 | extends: .meson-build |
| 203 | variables: |
| 204 | UNWIND: "true" |
| 205 | DRI_LOADERS: > |
| 206 | -D glvnd=true |
| 207 | -D egl=true |
| 208 | -D gbm=true |
| 209 | -D glx=dri |
| 210 | DRI_DRIVERS: "i965" |
| 211 | GALLIUM_ST: > |
| 212 | -D gallium-vdpau=false |
| 213 | -D gallium-xvmc=false |
| 214 | -D gallium-omx=disabled |
| 215 | -D gallium-va=false |
| 216 | -D gallium-xa=false |
| 217 | -D gallium-nine=false |
| 218 | -D gallium-opencl=disabled |
| 219 | |
Eric Engestrom | faf9e40 | 2019-02-26 14:40:29 +0000 | [diff] [blame] | 220 | meson-gallium-radeonsi: |
Eric Engestrom | 06e8f19 | 2019-01-28 17:45:26 +0000 | [diff] [blame] | 221 | extends: .meson-build |
| 222 | variables: |
| 223 | UNWIND: "true" |
| 224 | DRI_LOADERS: > |
| 225 | -D glx=disabled |
| 226 | -D egl=false |
| 227 | -D gbm=false |
| 228 | GALLIUM_ST: > |
| 229 | -D dri3=false |
| 230 | -D gallium-vdpau=false |
| 231 | -D gallium-xvmc=false |
| 232 | -D gallium-omx=disabled |
| 233 | -D gallium-va=false |
| 234 | -D gallium-xa=false |
| 235 | -D gallium-nine=false |
| 236 | -D gallium-opencl=disabled |
| 237 | GALLIUM_DRIVERS: "radeonsi" |
| 238 | LLVM_VERSION: "7" |
| 239 | |
Eric Engestrom | faf9e40 | 2019-02-26 14:40:29 +0000 | [diff] [blame] | 240 | meson-gallium-drivers-other: |
Eric Engestrom | d407ead | 2019-01-28 17:47:09 +0000 | [diff] [blame] | 241 | extends: .meson-build |
| 242 | variables: |
| 243 | UNWIND: "true" |
| 244 | DRI_LOADERS: > |
| 245 | -D glx=disabled |
| 246 | -D egl=false |
| 247 | -D gbm=false |
| 248 | GALLIUM_ST: > |
| 249 | -D dri3=false |
| 250 | -D gallium-vdpau=false |
| 251 | -D gallium-xvmc=false |
| 252 | -D gallium-omx=disabled |
| 253 | -D gallium-va=false |
| 254 | -D gallium-xa=false |
| 255 | -D gallium-nine=false |
| 256 | -D gallium-opencl=disabled |
Eric Engestrom | da1a5a1 | 2019-04-12 15:52:00 +0100 | [diff] [blame] | 257 | GALLIUM_DRIVERS: "i915,iris,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv,panfrost,lima" |
Eric Engestrom | d407ead | 2019-01-28 17:47:09 +0000 | [diff] [blame] | 258 | LLVM_VERSION: "5.0" |
| 259 | |
Eric Engestrom | 3006f9d | 2019-03-06 17:59:03 +0000 | [diff] [blame] | 260 | meson-gallium-clover-llvm: |
Eric Engestrom | b5a70af | 2019-01-28 18:05:22 +0000 | [diff] [blame] | 261 | extends: .meson-build |
| 262 | variables: |
| 263 | UNWIND: "true" |
| 264 | DRI_LOADERS: > |
| 265 | -D glx=disabled |
| 266 | -D egl=false |
| 267 | -D gbm=false |
| 268 | GALLIUM_ST: > |
| 269 | -D dri3=false |
| 270 | -D gallium-vdpau=false |
| 271 | -D gallium-xvmc=false |
| 272 | -D gallium-omx=disabled |
| 273 | -D gallium-va=false |
| 274 | -D gallium-xa=false |
| 275 | -D gallium-nine=false |
| 276 | -D gallium-opencl=icd |
Eric Engestrom | 8dab707 | 2019-01-28 18:09:24 +0000 | [diff] [blame] | 277 | GALLIUM_DRIVERS: "r600,radeonsi" |
Eric Engestrom | 3006f9d | 2019-03-06 17:59:03 +0000 | [diff] [blame] | 278 | |
| 279 | meson-gallium-clover-llvm39: |
| 280 | extends: meson-gallium-clover-llvm |
| 281 | variables: |
| 282 | GALLIUM_DRIVERS: "r600" |
| 283 | LLVM_VERSION: "3.9" |
Eric Engestrom | 8dab707 | 2019-01-28 18:09:24 +0000 | [diff] [blame] | 284 | |
Eric Engestrom | faf9e40 | 2019-02-26 14:40:29 +0000 | [diff] [blame] | 285 | meson-gallium-st-other: |
Eric Engestrom | f33517b | 2019-01-28 18:13:55 +0000 | [diff] [blame] | 286 | extends: .meson-build |
| 287 | variables: |
| 288 | UNWIND: "true" |
| 289 | DRI_LOADERS: > |
| 290 | -D glx=disabled |
| 291 | -D egl=false |
| 292 | -D gbm=false |
| 293 | GALLIUM_ST: > |
| 294 | -D dri3=true |
Eric Engestrom | 8c780e5 | 2019-03-19 14:23:59 +0000 | [diff] [blame] | 295 | -D gallium-extra-hud=true |
Eric Engestrom | f33517b | 2019-01-28 18:13:55 +0000 | [diff] [blame] | 296 | -D gallium-vdpau=true |
| 297 | -D gallium-xvmc=true |
| 298 | -D gallium-omx=bellagio |
| 299 | -D gallium-va=true |
| 300 | -D gallium-xa=true |
| 301 | -D gallium-nine=true |
| 302 | -D gallium-opencl=disabled |
| 303 | -D osmesa=gallium |
| 304 | GALLIUM_DRIVERS: "nouveau,swrast" |
| 305 | LLVM_VERSION: "5.0" |
| 306 | |
Eric Engestrom | faf9e40 | 2019-02-26 14:40:29 +0000 | [diff] [blame] | 307 | scons-nollvm: |
Eric Engestrom | 06b245b | 2019-01-23 15:46:10 +0000 | [diff] [blame] | 308 | extends: .scons-build |
| 309 | variables: |
| 310 | SCONS_TARGET: "llvm=0" |
| 311 | SCONS_CHECK_COMMAND: "scons llvm=0 check" |
Eric Engestrom | d4c6d4d | 2019-01-28 16:30:36 +0000 | [diff] [blame] | 312 | |
Eric Engestrom | faf9e40 | 2019-02-26 14:40:29 +0000 | [diff] [blame] | 313 | scons-llvm: |
Eric Engestrom | d4c6d4d | 2019-01-28 16:30:36 +0000 | [diff] [blame] | 314 | extends: .scons-build |
| 315 | variables: |
| 316 | SCONS_TARGET: "llvm=1" |
| 317 | SCONS_CHECK_COMMAND: "scons llvm=1 check" |
| 318 | LLVM_VERSION: "3.9" |
Eric Engestrom | 6a19ec9 | 2019-01-28 16:33:22 +0000 | [diff] [blame] | 319 | |
Eric Engestrom | faf9e40 | 2019-02-26 14:40:29 +0000 | [diff] [blame] | 320 | scons-swr: |
Eric Engestrom | 6a19ec9 | 2019-01-28 16:33:22 +0000 | [diff] [blame] | 321 | extends: .scons-build |
| 322 | variables: |
| 323 | SCONS_TARGET: "swr=1" |
| 324 | SCONS_CHECK_COMMAND: "true" |
| 325 | LLVM_VERSION: "6.0" |