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. |
Eric Engestrom | 329f5cd | 2019-01-20 11:21:45 +0000 | [diff] [blame] | 15 | variables: |
Benjamin Tissoires | 7f8a9a1 | 2019-04-02 09:24:00 +0200 | [diff] [blame] | 16 | UPSTREAM_REPO: mesa/mesa |
Eric Anholt | f60defa | 2019-04-10 15:59:12 -0700 | [diff] [blame] | 17 | DEBIAN_TAG: "2019-07-23" |
Michel Dänzer | d00b1c4 | 2019-04-02 16:56:54 +0200 | [diff] [blame] | 18 | DEBIAN_VERSION: stretch-slim |
| 19 | DEBIAN_IMAGE: "$CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:$DEBIAN_TAG" |
Benjamin Tissoires | 7f8a9a1 | 2019-04-02 09:24:00 +0200 | [diff] [blame] | 20 | |
| 21 | include: |
| 22 | - project: 'wayland/ci-templates' |
| 23 | ref: c73dae8b84697ef18e2dbbf4fed7386d9652b0cd |
Michel Dänzer | d00b1c4 | 2019-04-02 16:56:54 +0200 | [diff] [blame] | 24 | file: '/templates/debian.yml' |
Eric Engestrom | 329f5cd | 2019-01-20 11:21:45 +0000 | [diff] [blame] | 25 | |
Eric Engestrom | 329f5cd | 2019-01-20 11:21:45 +0000 | [diff] [blame] | 26 | stages: |
| 27 | - containers-build |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 28 | - build+test |
Eric Engestrom | 329f5cd | 2019-01-20 11:21:45 +0000 | [diff] [blame] | 29 | |
| 30 | |
Eric Engestrom | 7f5d9c2 | 2019-02-22 15:52:08 +0000 | [diff] [blame] | 31 | # When to automatically run the CI |
Benjamin Tissoires | 7f8a9a1 | 2019-04-02 09:24:00 +0200 | [diff] [blame] | 32 | .ci-run-policy: &ci-run-policy |
Eric Engestrom | 7f5d9c2 | 2019-02-22 15:52:08 +0000 | [diff] [blame] | 33 | only: |
Michel Dänzer | b48e64f | 2019-04-10 10:33:13 +0200 | [diff] [blame] | 34 | - branches@mesa/mesa |
Eric Engestrom | 7f5d9c2 | 2019-02-22 15:52:08 +0000 | [diff] [blame] | 35 | - merge_requests |
| 36 | - /^ci([-/].*)?$/ |
Michel Dänzer | 6140ed3 | 2019-03-26 18:39:41 +0100 | [diff] [blame] | 37 | retry: |
| 38 | max: 2 |
| 39 | when: |
| 40 | - runner_system_failure |
Eric Engestrom | 7f5d9c2 | 2019-02-22 15:52:08 +0000 | [diff] [blame] | 41 | |
| 42 | |
Eric Engestrom | 329f5cd | 2019-01-20 11:21:45 +0000 | [diff] [blame] | 43 | # CONTAINERS |
| 44 | |
Michel Dänzer | d00b1c4 | 2019-04-02 16:56:54 +0200 | [diff] [blame] | 45 | debian: |
| 46 | extends: .debian@container-ifnot-exists |
Eric Engestrom | 329f5cd | 2019-01-20 11:21:45 +0000 | [diff] [blame] | 47 | stage: containers-build |
Benjamin Tissoires | 7f8a9a1 | 2019-04-02 09:24:00 +0200 | [diff] [blame] | 48 | <<: *ci-run-policy |
Eric Engestrom | 329f5cd | 2019-01-20 11:21:45 +0000 | [diff] [blame] | 49 | variables: |
Benjamin Tissoires | 7f8a9a1 | 2019-04-02 09:24:00 +0200 | [diff] [blame] | 50 | 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] | 51 | DEBIAN_EXEC: 'bash .gitlab-ci/debian-install.sh' |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 52 | |
| 53 | |
| 54 | # BUILD |
| 55 | |
| 56 | .build: |
Benjamin Tissoires | 7f8a9a1 | 2019-04-02 09:24:00 +0200 | [diff] [blame] | 57 | <<: *ci-run-policy |
Michel Dänzer | d00b1c4 | 2019-04-02 16:56:54 +0200 | [diff] [blame] | 58 | image: $DEBIAN_IMAGE |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 59 | stage: build+test |
Michel Dänzer | a3f34f9 | 2019-03-26 18:35:59 +0100 | [diff] [blame] | 60 | cache: |
| 61 | paths: |
| 62 | - ccache |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 63 | artifacts: |
Eric Anholt | dd3d0b2 | 2019-07-24 09:27:48 -0700 | [diff] [blame] | 64 | when: always |
| 65 | paths: |
| 66 | - _build/meson-logs/*.txt |
| 67 | # scons: |
Michel Dänzer | 5229f27 | 2019-07-26 12:20:41 +0200 | [diff] [blame^] | 68 | - build/*/config.log |
Eric Anholt | f60defa | 2019-04-10 15:59:12 -0700 | [diff] [blame] | 69 | - shader-db |
Michel Dänzer | e9de19f | 2019-04-04 18:01:27 +0200 | [diff] [blame] | 70 | variables: |
| 71 | CCACHE_COMPILERCHECK: "content" |
Eric Engestrom | 23b485c | 2019-02-12 16:59:27 +0000 | [diff] [blame] | 72 | # Use ccache transparently, and print stats before/after |
| 73 | before_script: |
| 74 | - export PATH="/usr/lib/ccache:$PATH" |
| 75 | - export CCACHE_BASEDIR="$PWD" |
| 76 | - export CCACHE_DIR="$PWD/ccache" |
Eric Engestrom | 23b485c | 2019-02-12 16:59:27 +0000 | [diff] [blame] | 77 | - ccache --zero-stats || true |
| 78 | - ccache --show-stats || true |
| 79 | after_script: |
| 80 | - export CCACHE_DIR="$PWD/ccache" |
| 81 | - ccache --show-stats |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 82 | |
| 83 | .meson-build: |
| 84 | extends: .build |
Eric Engestrom | 23b485c | 2019-02-12 16:59:27 +0000 | [diff] [blame] | 85 | script: |
Michel Dänzer | cc2b3a9 | 2019-05-03 10:49:43 +0200 | [diff] [blame] | 86 | - .gitlab-ci/meson-build.sh |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 87 | |
Eric Engestrom | 06b245b | 2019-01-23 15:46:10 +0000 | [diff] [blame] | 88 | .scons-build: |
| 89 | extends: .build |
| 90 | variables: |
| 91 | SCONSFLAGS: "-j4" |
| 92 | script: |
Eric Engestrom | d4c6d4d | 2019-01-28 16:30:36 +0000 | [diff] [blame] | 93 | - if test -n "$LLVM_VERSION"; then |
| 94 | export LLVM_CONFIG="llvm-config-${LLVM_VERSION}"; |
| 95 | fi |
Eric Engestrom | 06b245b | 2019-01-23 15:46:10 +0000 | [diff] [blame] | 96 | - scons $SCONS_TARGET |
| 97 | - eval $SCONS_CHECK_COMMAND |
| 98 | |
Michel Dänzer | a2cce70 | 2019-03-20 15:58:31 +0100 | [diff] [blame] | 99 | # NOTE: Building SWR is 2x (yes two) times slower than all the other |
| 100 | # gallium drivers combined. |
| 101 | # 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] | 102 | # |
| 103 | # We also put softpipe (and therefore gallium nine, which requires |
| 104 | # it) here, since softpipe/llvmpipe can't be built alongside classic |
| 105 | # swrast. |
Eric Engestrom | 1291c68 | 2019-04-16 18:06:53 +0200 | [diff] [blame] | 106 | # |
| 107 | # Putting glvnd here is arbitrary, but we want it in one of the builds |
| 108 | # for coverage. |
| 109 | meson-swr-glvnd: |
Michel Dänzer | a2cce70 | 2019-03-20 15:58:31 +0100 | [diff] [blame] | 110 | extends: .meson-build |
| 111 | variables: |
| 112 | UNWIND: "true" |
| 113 | DRI_LOADERS: > |
Eric Engestrom | 1291c68 | 2019-04-16 18:06:53 +0200 | [diff] [blame] | 114 | -D glvnd=true |
| 115 | -D egl=true |
Michel Dänzer | a2cce70 | 2019-03-20 15:58:31 +0100 | [diff] [blame] | 116 | GALLIUM_ST: > |
Eric Engestrom | 41407c6 | 2019-03-08 16:33:07 +0000 | [diff] [blame] | 117 | -D dri3=true |
Michel Dänzer | a2cce70 | 2019-03-20 15:58:31 +0100 | [diff] [blame] | 118 | -D gallium-vdpau=false |
| 119 | -D gallium-xvmc=false |
| 120 | -D gallium-omx=disabled |
| 121 | -D gallium-va=false |
| 122 | -D gallium-xa=false |
Eric Engestrom | 41407c6 | 2019-03-08 16:33:07 +0000 | [diff] [blame] | 123 | -D gallium-nine=true |
Michel Dänzer | a2cce70 | 2019-03-20 15:58:31 +0100 | [diff] [blame] | 124 | -D gallium-opencl=disabled |
Eric Engestrom | 41407c6 | 2019-03-08 16:33:07 +0000 | [diff] [blame] | 125 | -D osmesa=gallium |
| 126 | GALLIUM_DRIVERS: "swr,swrast,iris" |
Michel Dänzer | a2cce70 | 2019-03-20 15:58:31 +0100 | [diff] [blame] | 127 | LLVM_VERSION: "6.0" |
| 128 | |
| 129 | meson-clang: |
| 130 | extends: .meson-build |
| 131 | variables: |
| 132 | UNWIND: "true" |
| 133 | DRI_DRIVERS: "auto" |
| 134 | GALLIUM_DRIVERS: "auto" |
Eric Engestrom | 47f419d | 2019-05-01 12:09:26 +0100 | [diff] [blame] | 135 | VULKAN_DRIVERS: intel,amd,freedreno |
Michel Dänzer | 3fca2b7 | 2019-04-05 10:36:29 +0200 | [diff] [blame] | 136 | CC: "ccache clang-8" |
| 137 | CXX: "ccache clang++-8" |
Michel Dänzer | e9de19f | 2019-04-04 18:01:27 +0200 | [diff] [blame] | 138 | before_script: |
| 139 | - export CCACHE_BASEDIR="$PWD" CCACHE_DIR="$PWD/ccache" |
| 140 | - ccache --zero-stats --show-stats || true |
| 141 | # clang++ breaks if it picks up the GCC 8 directory without libstdc++.so |
| 142 | - apt-get remove -y libgcc-8-dev |
Michel Dänzer | a2cce70 | 2019-03-20 15:58:31 +0100 | [diff] [blame] | 143 | |
Michel Dänzer | 82b3009 | 2019-05-03 18:19:25 +0200 | [diff] [blame] | 144 | scons-swr: |
| 145 | extends: .scons-build |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 146 | variables: |
Michel Dänzer | 82b3009 | 2019-05-03 18:19:25 +0200 | [diff] [blame] | 147 | SCONS_TARGET: "swr=1" |
| 148 | SCONS_CHECK_COMMAND: "true" |
| 149 | LLVM_VERSION: "6.0" |
| 150 | |
| 151 | scons-win64: |
| 152 | extends: .scons-build |
| 153 | variables: |
| 154 | SCONS_TARGET: platform=windows machine=x86_64 |
| 155 | SCONS_CHECK_COMMAND: "true" |
Eric Engestrom | 89a7467 | 2019-01-21 09:42:37 +0000 | [diff] [blame] | 156 | |
Eric Engestrom | 41407c6 | 2019-03-08 16:33:07 +0000 | [diff] [blame] | 157 | meson-main: |
Eric Engestrom | d73265e | 2019-01-28 17:38:17 +0000 | [diff] [blame] | 158 | extends: .meson-build |
| 159 | variables: |
Eric Engestrom | 41407c6 | 2019-03-08 16:33:07 +0000 | [diff] [blame] | 160 | UNWIND: "true" |
Eric Engestrom | d73265e | 2019-01-28 17:38:17 +0000 | [diff] [blame] | 161 | DRI_LOADERS: > |
| 162 | -D glx=dri |
| 163 | -D gbm=true |
| 164 | -D egl=true |
| 165 | -D platforms=x11,wayland,drm,surfaceless |
| 166 | -D osmesa=classic |
| 167 | DRI_DRIVERS: "i915,i965,r100,r200,swrast,nouveau" |
| 168 | GALLIUM_ST: > |
| 169 | -D dri3=true |
Eric Anholt | f60defa | 2019-04-10 15:59:12 -0700 | [diff] [blame] | 170 | -D tools=drm-shim |
Eric Engestrom | 41407c6 | 2019-03-08 16:33:07 +0000 | [diff] [blame] | 171 | -D gallium-extra-hud=true |
| 172 | -D gallium-vdpau=true |
| 173 | -D gallium-xvmc=true |
| 174 | -D gallium-omx=bellagio |
| 175 | -D gallium-va=true |
| 176 | -D gallium-xa=true |
Eric Engestrom | d73265e | 2019-01-28 17:38:17 +0000 | [diff] [blame] | 177 | -D gallium-nine=false |
| 178 | -D gallium-opencl=disabled |
Eric Engestrom | 41407c6 | 2019-03-08 16:33:07 +0000 | [diff] [blame] | 179 | GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,svga,v3d,vc4,virgl,etnaviv,panfrost,lima" |
| 180 | LLVM_VERSION: "7" |
Eric Engestrom | 6a1f609 | 2019-03-12 10:25:54 +0000 | [diff] [blame] | 181 | EXTRA_OPTION: > |
| 182 | -D tools=all |
Eric Anholt | f60defa | 2019-04-10 15:59:12 -0700 | [diff] [blame] | 183 | MESON_SHADERDB: "true" |
Eric Engestrom | d73265e | 2019-01-28 17:38:17 +0000 | [diff] [blame] | 184 | |
Michel Dänzer | 6897715 | 2019-05-03 10:58:48 +0200 | [diff] [blame] | 185 | meson-clover: |
Eric Engestrom | b5a70af | 2019-01-28 18:05:22 +0000 | [diff] [blame] | 186 | extends: .meson-build |
| 187 | variables: |
| 188 | UNWIND: "true" |
| 189 | DRI_LOADERS: > |
| 190 | -D glx=disabled |
| 191 | -D egl=false |
| 192 | -D gbm=false |
| 193 | GALLIUM_ST: > |
| 194 | -D dri3=false |
| 195 | -D gallium-vdpau=false |
| 196 | -D gallium-xvmc=false |
| 197 | -D gallium-omx=disabled |
| 198 | -D gallium-va=false |
| 199 | -D gallium-xa=false |
| 200 | -D gallium-nine=false |
| 201 | -D gallium-opencl=icd |
Michel Dänzer | 6897715 | 2019-05-03 10:58:48 +0200 | [diff] [blame] | 202 | script: |
| 203 | - export GALLIUM_DRIVERS="r600,radeonsi" |
| 204 | - .gitlab-ci/meson-build.sh |
| 205 | - LLVM_VERSION=7 .gitlab-ci/meson-build.sh |
| 206 | - export GALLIUM_DRIVERS="i915,r600" |
| 207 | - LLVM_VERSION=3.9 .gitlab-ci/meson-build.sh |
| 208 | - LLVM_VERSION=4.0 .gitlab-ci/meson-build.sh |
| 209 | - LLVM_VERSION=5.0 .gitlab-ci/meson-build.sh |
| 210 | - LLVM_VERSION=6.0 .gitlab-ci/meson-build.sh |
Eric Engestrom | 8dab707 | 2019-01-28 18:09:24 +0000 | [diff] [blame] | 211 | |
Michel Dänzer | 82b3009 | 2019-05-03 18:19:25 +0200 | [diff] [blame] | 212 | meson-vulkan: |
| 213 | extends: .meson-build |
| 214 | variables: |
| 215 | UNWIND: "false" |
| 216 | DRI_LOADERS: > |
| 217 | -D glx=disabled |
| 218 | -D gbm=false |
| 219 | -D egl=false |
| 220 | -D platforms=x11,wayland,drm |
| 221 | -D osmesa=none |
| 222 | GALLIUM_ST: > |
| 223 | -D dri3=true |
| 224 | -D gallium-vdpau=false |
| 225 | -D gallium-xvmc=false |
| 226 | -D gallium-omx=disabled |
| 227 | -D gallium-va=false |
| 228 | -D gallium-xa=false |
| 229 | -D gallium-nine=false |
| 230 | -D gallium-opencl=disabled |
| 231 | VULKAN_DRIVERS: intel,amd,freedreno |
| 232 | LLVM_VERSION: "7" |
Eric Engestrom | 5f8d29a | 2019-05-08 18:17:23 +0200 | [diff] [blame] | 233 | EXTRA_OPTION: > |
| 234 | -D vulkan-overlay-layer=true |
Michel Dänzer | 82b3009 | 2019-05-03 18:19:25 +0200 | [diff] [blame] | 235 | |
Eric Anholt | 11aa32a | 2019-07-11 12:58:28 -0700 | [diff] [blame] | 236 | .meson-cross: |
| 237 | extends: .meson-build |
| 238 | variables: |
| 239 | UNWIND: "false" |
| 240 | DRI_LOADERS: > |
| 241 | -D glx=disabled |
| 242 | -D gbm=false |
| 243 | -D egl=false |
| 244 | -D platforms=surfaceless |
| 245 | -D osmesa=none |
| 246 | GALLIUM_ST: > |
| 247 | -D dri3=false |
| 248 | -D gallium-vdpau=false |
| 249 | -D gallium-xvmc=false |
| 250 | -D gallium-omx=disabled |
| 251 | -D gallium-va=false |
| 252 | -D gallium-xa=false |
| 253 | -D gallium-nine=false |
| 254 | -D llvm=false |
| 255 | CROSS: > |
Eric Anholt | 11aa32a | 2019-07-11 12:58:28 -0700 | [diff] [blame] | 256 | --cross /tmp/cross_file.txt |
| 257 | |
| 258 | script: |
| 259 | - /usr/share/meson/debcrossgen --arch ${ARCH} -o /tmp/cross_file.txt |
| 260 | # Work around a bug in debcrossgen that should be fixed in the next release |
| 261 | - sed -i "s|cpu_family = 'i686'|cpu_family = 'x86'|g" /tmp/cross_file.txt |
| 262 | - .gitlab-ci/meson-build.sh |
| 263 | |
| 264 | meson-armhf: |
| 265 | extends: .meson-cross |
| 266 | variables: |
| 267 | ARCH: armhf |
| 268 | VULKAN_DRIVERS: freedreno |
| 269 | GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,tegra,v3d,vc4" |
| 270 | # Disable the tests since we're cross compiling. |
| 271 | EXTRA_OPTION: > |
| 272 | -D build-tests=false |
| 273 | -D I-love-half-baked-turnips=true |
| 274 | -D vulkan-overlay-layer=true |
| 275 | |
| 276 | meson-arm64: |
| 277 | extends: .meson-cross |
| 278 | variables: |
| 279 | ARCH: arm64 |
| 280 | VULKAN_DRIVERS: freedreno |
| 281 | GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,tegra,v3d,vc4" |
| 282 | # Disable the tests since we're cross compiling. |
| 283 | EXTRA_OPTION: > |
| 284 | -D build-tests=false |
| 285 | -D I-love-half-baked-turnips=true |
| 286 | -D vulkan-overlay-layer=true |
| 287 | |
| 288 | meson-i386: |
| 289 | extends: .meson-cross |
| 290 | variables: |
| 291 | ARCH: i386 |
| 292 | VULKAN_DRIVERS: intel |
| 293 | GALLIUM_DRIVERS: "swrast" |
| 294 | # Disable i386 tests, because u_format_tests gets precision |
| 295 | # failures in dxtn unpacking |
| 296 | EXTRA_OPTION: > |
| 297 | -D build-tests=false |
| 298 | -D vulkan-overlay-layer=true |
| 299 | |
Eric Engestrom | faf9e40 | 2019-02-26 14:40:29 +0000 | [diff] [blame] | 300 | scons-nollvm: |
Eric Engestrom | 06b245b | 2019-01-23 15:46:10 +0000 | [diff] [blame] | 301 | extends: .scons-build |
| 302 | variables: |
| 303 | SCONS_TARGET: "llvm=0" |
| 304 | SCONS_CHECK_COMMAND: "scons llvm=0 check" |
Eric Engestrom | d4c6d4d | 2019-01-28 16:30:36 +0000 | [diff] [blame] | 305 | |
Eric Engestrom | faf9e40 | 2019-02-26 14:40:29 +0000 | [diff] [blame] | 306 | scons-llvm: |
Eric Engestrom | d4c6d4d | 2019-01-28 16:30:36 +0000 | [diff] [blame] | 307 | extends: .scons-build |
| 308 | variables: |
| 309 | SCONS_TARGET: "llvm=1" |
| 310 | SCONS_CHECK_COMMAND: "scons llvm=1 check" |
Michel Dänzer | 9b2473c | 2019-04-11 18:38:30 +0200 | [diff] [blame] | 311 | LLVM_VERSION: "3.4" |
| 312 | # LLVM 3.4 packages were built with an old libstdc++ ABI |
| 313 | CXX: "g++ -D_GLIBCXX_USE_CXX11_ABI=0" |