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 |
Eric Engestrom | 7c15a87 | 2019-03-08 12:47:23 +0000 | [diff] [blame] | 20 | DEBIAN_TAG: "2019-05-01" |
Michel Dänzer | d00b1c4 | 2019-04-02 16:56:54 +0200 | [diff] [blame] | 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 |
Michel Dänzer | 5078d66 | 2019-04-17 12:53:23 +0200 | [diff] [blame] | 97 | -D buildtype=debug |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 98 | -D build-tests=true |
| 99 | -D libunwind=${UNWIND} |
| 100 | ${DRI_LOADERS} |
| 101 | -D dri-drivers=${DRI_DRIVERS:-[]} |
| 102 | ${GALLIUM_ST} |
| 103 | -D gallium-drivers=${GALLIUM_DRIVERS:-[]} |
| 104 | -D vulkan-drivers=${VULKAN_DRIVERS:-[]} |
Bas Nieuwenhuizen | 158d45d | 2019-03-13 00:15:09 +0100 | [diff] [blame] | 105 | -D I-love-half-baked-turnips=true |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 106 | - cd _build |
| 107 | - meson configure |
Eric Engestrom | 68a9383 | 2019-02-13 14:25:45 +0000 | [diff] [blame] | 108 | - ninja -j4 |
Michel Dänzer | ecb3eed | 2019-04-03 12:23:51 +0200 | [diff] [blame] | 109 | - LC_ALL=C.UTF-8 ninja test |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 110 | |
Eric Engestrom | 06b245b | 2019-01-23 15:46:10 +0000 | [diff] [blame] | 111 | .scons-build: |
| 112 | extends: .build |
| 113 | variables: |
| 114 | SCONSFLAGS: "-j4" |
| 115 | script: |
Eric Engestrom | d4c6d4d | 2019-01-28 16:30:36 +0000 | [diff] [blame] | 116 | - if test -n "$LLVM_VERSION"; then |
| 117 | export LLVM_CONFIG="llvm-config-${LLVM_VERSION}"; |
| 118 | fi |
Eric Engestrom | 06b245b | 2019-01-23 15:46:10 +0000 | [diff] [blame] | 119 | - scons $SCONS_TARGET |
| 120 | - eval $SCONS_CHECK_COMMAND |
| 121 | |
Michel Dänzer | a2cce70 | 2019-03-20 15:58:31 +0100 | [diff] [blame] | 122 | # NOTE: Building SWR is 2x (yes two) times slower than all the other |
| 123 | # gallium drivers combined. |
| 124 | # Start this early so that it doesn't limit the total run time. |
Eric Engestrom | 41407c6 | 2019-03-08 16:33:07 +0000 | [diff] [blame^] | 125 | # |
| 126 | # We also put softpipe (and therefore gallium nine, which requires |
| 127 | # it) here, since softpipe/llvmpipe can't be built alongside classic |
| 128 | # swrast. |
Michel Dänzer | a2cce70 | 2019-03-20 15:58:31 +0100 | [diff] [blame] | 129 | meson-gallium-swr: |
| 130 | extends: .meson-build |
| 131 | variables: |
| 132 | UNWIND: "true" |
| 133 | DRI_LOADERS: > |
| 134 | -D glx=disabled |
| 135 | -D egl=false |
| 136 | -D gbm=false |
| 137 | GALLIUM_ST: > |
Eric Engestrom | 41407c6 | 2019-03-08 16:33:07 +0000 | [diff] [blame^] | 138 | -D dri3=true |
Michel Dänzer | a2cce70 | 2019-03-20 15:58:31 +0100 | [diff] [blame] | 139 | -D gallium-vdpau=false |
| 140 | -D gallium-xvmc=false |
| 141 | -D gallium-omx=disabled |
| 142 | -D gallium-va=false |
| 143 | -D gallium-xa=false |
Eric Engestrom | 41407c6 | 2019-03-08 16:33:07 +0000 | [diff] [blame^] | 144 | -D gallium-nine=true |
Michel Dänzer | a2cce70 | 2019-03-20 15:58:31 +0100 | [diff] [blame] | 145 | -D gallium-opencl=disabled |
Eric Engestrom | 41407c6 | 2019-03-08 16:33:07 +0000 | [diff] [blame^] | 146 | -D osmesa=gallium |
| 147 | GALLIUM_DRIVERS: "swr,swrast,iris" |
Michel Dänzer | a2cce70 | 2019-03-20 15:58:31 +0100 | [diff] [blame] | 148 | LLVM_VERSION: "6.0" |
| 149 | |
| 150 | meson-clang: |
| 151 | extends: .meson-build |
| 152 | variables: |
| 153 | UNWIND: "true" |
| 154 | DRI_DRIVERS: "auto" |
| 155 | GALLIUM_DRIVERS: "auto" |
Eric Engestrom | 47f419d | 2019-05-01 12:09:26 +0100 | [diff] [blame] | 156 | VULKAN_DRIVERS: intel,amd,freedreno |
Michel Dänzer | 3fca2b7 | 2019-04-05 10:36:29 +0200 | [diff] [blame] | 157 | CC: "ccache clang-8" |
| 158 | CXX: "ccache clang++-8" |
Michel Dänzer | e9de19f | 2019-04-04 18:01:27 +0200 | [diff] [blame] | 159 | before_script: |
| 160 | - export CCACHE_BASEDIR="$PWD" CCACHE_DIR="$PWD/ccache" |
| 161 | - ccache --zero-stats --show-stats || true |
| 162 | # clang++ breaks if it picks up the GCC 8 directory without libstdc++.so |
| 163 | - apt-get remove -y libgcc-8-dev |
Michel Dänzer | a2cce70 | 2019-03-20 15:58:31 +0100 | [diff] [blame] | 164 | |
Eric Engestrom | faf9e40 | 2019-02-26 14:40:29 +0000 | [diff] [blame] | 165 | meson-vulkan: |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 166 | extends: .meson-build |
| 167 | variables: |
| 168 | UNWIND: "false" |
| 169 | DRI_LOADERS: > |
| 170 | -D glx=disabled |
| 171 | -D gbm=false |
| 172 | -D egl=false |
| 173 | -D platforms=x11,wayland,drm |
| 174 | -D osmesa=none |
| 175 | GALLIUM_ST: > |
| 176 | -D dri3=true |
| 177 | -D gallium-vdpau=false |
| 178 | -D gallium-xvmc=false |
| 179 | -D gallium-omx=disabled |
| 180 | -D gallium-va=false |
| 181 | -D gallium-xa=false |
| 182 | -D gallium-nine=false |
| 183 | -D gallium-opencl=disabled |
Bas Nieuwenhuizen | 158d45d | 2019-03-13 00:15:09 +0100 | [diff] [blame] | 184 | VULKAN_DRIVERS: intel,amd,freedreno |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 185 | LLVM_VERSION: "7" |
Eric Engestrom | 89a7467 | 2019-01-21 09:42:37 +0000 | [diff] [blame] | 186 | |
Eric Engestrom | 41407c6 | 2019-03-08 16:33:07 +0000 | [diff] [blame^] | 187 | meson-main: |
Eric Engestrom | d73265e | 2019-01-28 17:38:17 +0000 | [diff] [blame] | 188 | extends: .meson-build |
| 189 | variables: |
Eric Engestrom | 41407c6 | 2019-03-08 16:33:07 +0000 | [diff] [blame^] | 190 | UNWIND: "true" |
Eric Engestrom | d73265e | 2019-01-28 17:38:17 +0000 | [diff] [blame] | 191 | DRI_LOADERS: > |
| 192 | -D glx=dri |
| 193 | -D gbm=true |
| 194 | -D egl=true |
| 195 | -D platforms=x11,wayland,drm,surfaceless |
| 196 | -D osmesa=classic |
| 197 | DRI_DRIVERS: "i915,i965,r100,r200,swrast,nouveau" |
| 198 | GALLIUM_ST: > |
| 199 | -D dri3=true |
Eric Engestrom | 41407c6 | 2019-03-08 16:33:07 +0000 | [diff] [blame^] | 200 | -D gallium-extra-hud=true |
| 201 | -D gallium-vdpau=true |
| 202 | -D gallium-xvmc=true |
| 203 | -D gallium-omx=bellagio |
| 204 | -D gallium-va=true |
| 205 | -D gallium-xa=true |
Eric Engestrom | d73265e | 2019-01-28 17:38:17 +0000 | [diff] [blame] | 206 | -D gallium-nine=false |
| 207 | -D gallium-opencl=disabled |
Eric Engestrom | 41407c6 | 2019-03-08 16:33:07 +0000 | [diff] [blame^] | 208 | GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,svga,v3d,vc4,virgl,etnaviv,panfrost,lima" |
| 209 | LLVM_VERSION: "7" |
Eric Engestrom | d73265e | 2019-01-28 17:38:17 +0000 | [diff] [blame] | 210 | |
Eric Engestrom | faf9e40 | 2019-02-26 14:40:29 +0000 | [diff] [blame] | 211 | meson-glvnd: |
Eric Engestrom | ba26bc4 | 2019-01-29 08:57:17 +0000 | [diff] [blame] | 212 | extends: .meson-build |
| 213 | variables: |
| 214 | UNWIND: "true" |
| 215 | DRI_LOADERS: > |
| 216 | -D glvnd=true |
| 217 | -D egl=true |
| 218 | -D gbm=true |
| 219 | -D glx=dri |
| 220 | DRI_DRIVERS: "i965" |
| 221 | GALLIUM_ST: > |
| 222 | -D gallium-vdpau=false |
| 223 | -D gallium-xvmc=false |
| 224 | -D gallium-omx=disabled |
| 225 | -D gallium-va=false |
| 226 | -D gallium-xa=false |
| 227 | -D gallium-nine=false |
| 228 | -D gallium-opencl=disabled |
| 229 | |
Eric Engestrom | faf9e40 | 2019-02-26 14:40:29 +0000 | [diff] [blame] | 230 | meson-gallium-radeonsi: |
Eric Engestrom | 06e8f19 | 2019-01-28 17:45:26 +0000 | [diff] [blame] | 231 | extends: .meson-build |
| 232 | variables: |
| 233 | UNWIND: "true" |
| 234 | DRI_LOADERS: > |
| 235 | -D glx=disabled |
| 236 | -D egl=false |
| 237 | -D gbm=false |
| 238 | GALLIUM_ST: > |
| 239 | -D dri3=false |
| 240 | -D gallium-vdpau=false |
| 241 | -D gallium-xvmc=false |
| 242 | -D gallium-omx=disabled |
| 243 | -D gallium-va=false |
| 244 | -D gallium-xa=false |
| 245 | -D gallium-nine=false |
| 246 | -D gallium-opencl=disabled |
| 247 | GALLIUM_DRIVERS: "radeonsi" |
| 248 | LLVM_VERSION: "7" |
| 249 | |
Eric Engestrom | 3006f9d | 2019-03-06 17:59:03 +0000 | [diff] [blame] | 250 | meson-gallium-clover-llvm: |
Eric Engestrom | b5a70af | 2019-01-28 18:05:22 +0000 | [diff] [blame] | 251 | extends: .meson-build |
| 252 | variables: |
| 253 | UNWIND: "true" |
| 254 | DRI_LOADERS: > |
| 255 | -D glx=disabled |
| 256 | -D egl=false |
| 257 | -D gbm=false |
| 258 | GALLIUM_ST: > |
| 259 | -D dri3=false |
| 260 | -D gallium-vdpau=false |
| 261 | -D gallium-xvmc=false |
| 262 | -D gallium-omx=disabled |
| 263 | -D gallium-va=false |
| 264 | -D gallium-xa=false |
| 265 | -D gallium-nine=false |
| 266 | -D gallium-opencl=icd |
Eric Engestrom | 8dab707 | 2019-01-28 18:09:24 +0000 | [diff] [blame] | 267 | GALLIUM_DRIVERS: "r600,radeonsi" |
Eric Engestrom | 3006f9d | 2019-03-06 17:59:03 +0000 | [diff] [blame] | 268 | |
| 269 | meson-gallium-clover-llvm39: |
| 270 | extends: meson-gallium-clover-llvm |
| 271 | variables: |
Eric Engestrom | 41407c6 | 2019-03-08 16:33:07 +0000 | [diff] [blame^] | 272 | GALLIUM_DRIVERS: "i915,r600" |
Eric Engestrom | 3006f9d | 2019-03-06 17:59:03 +0000 | [diff] [blame] | 273 | LLVM_VERSION: "3.9" |
Eric Engestrom | 8dab707 | 2019-01-28 18:09:24 +0000 | [diff] [blame] | 274 | |
Eric Engestrom | faf9e40 | 2019-02-26 14:40:29 +0000 | [diff] [blame] | 275 | scons-nollvm: |
Eric Engestrom | 06b245b | 2019-01-23 15:46:10 +0000 | [diff] [blame] | 276 | extends: .scons-build |
| 277 | variables: |
| 278 | SCONS_TARGET: "llvm=0" |
| 279 | SCONS_CHECK_COMMAND: "scons llvm=0 check" |
Eric Engestrom | d4c6d4d | 2019-01-28 16:30:36 +0000 | [diff] [blame] | 280 | |
Eric Engestrom | faf9e40 | 2019-02-26 14:40:29 +0000 | [diff] [blame] | 281 | scons-llvm: |
Eric Engestrom | d4c6d4d | 2019-01-28 16:30:36 +0000 | [diff] [blame] | 282 | extends: .scons-build |
| 283 | variables: |
| 284 | SCONS_TARGET: "llvm=1" |
| 285 | SCONS_CHECK_COMMAND: "scons llvm=1 check" |
Michel Dänzer | 9b2473c | 2019-04-11 18:38:30 +0200 | [diff] [blame] | 286 | LLVM_VERSION: "3.4" |
| 287 | # LLVM 3.4 packages were built with an old libstdc++ ABI |
| 288 | CXX: "g++ -D_GLIBCXX_USE_CXX11_ABI=0" |
Eric Engestrom | 6a19ec9 | 2019-01-28 16:33:22 +0000 | [diff] [blame] | 289 | |
Eric Engestrom | faf9e40 | 2019-02-26 14:40:29 +0000 | [diff] [blame] | 290 | scons-swr: |
Eric Engestrom | 6a19ec9 | 2019-01-28 16:33:22 +0000 | [diff] [blame] | 291 | extends: .scons-build |
| 292 | variables: |
| 293 | SCONS_TARGET: "swr=1" |
| 294 | SCONS_CHECK_COMMAND: "true" |
| 295 | LLVM_VERSION: "6.0" |
Eric Engestrom | 7c15a87 | 2019-03-08 12:47:23 +0000 | [diff] [blame] | 296 | |
| 297 | scons-win64: |
| 298 | extends: .scons-build |
| 299 | variables: |
| 300 | SCONS_TARGET: platform=windows machine=x86_64 |
| 301 | SCONS_CHECK_COMMAND: "true" |