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 Engestrom | 7c15a87 | 2019-03-08 12:47:23 +0000 | [diff] [blame] | 17 | DEBIAN_TAG: "2019-05-01" |
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: |
| 64 | when: on_failure |
| 65 | untracked: true |
Michel Dänzer | e9de19f | 2019-04-04 18:01:27 +0200 | [diff] [blame] | 66 | variables: |
| 67 | CCACHE_COMPILERCHECK: "content" |
Eric Engestrom | 23b485c | 2019-02-12 16:59:27 +0000 | [diff] [blame] | 68 | # Use ccache transparently, and print stats before/after |
| 69 | before_script: |
| 70 | - export PATH="/usr/lib/ccache:$PATH" |
| 71 | - export CCACHE_BASEDIR="$PWD" |
| 72 | - export CCACHE_DIR="$PWD/ccache" |
Eric Engestrom | 23b485c | 2019-02-12 16:59:27 +0000 | [diff] [blame] | 73 | - ccache --zero-stats || true |
| 74 | - ccache --show-stats || true |
| 75 | after_script: |
| 76 | - export CCACHE_DIR="$PWD/ccache" |
| 77 | - ccache --show-stats |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 78 | |
| 79 | .meson-build: |
| 80 | extends: .build |
Eric Engestrom | 23b485c | 2019-02-12 16:59:27 +0000 | [diff] [blame] | 81 | script: |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 82 | # We need to control the version of llvm-config we're using, so we'll |
| 83 | # generate a native file to do so. This requires meson >=0.49 |
| 84 | - if test -n "$LLVM_VERSION"; then |
| 85 | LLVM_CONFIG="llvm-config-${LLVM_VERSION}"; |
| 86 | echo -e "[binaries]\nllvm-config = '`which $LLVM_CONFIG`'" > native.file; |
| 87 | $LLVM_CONFIG --version; |
| 88 | else |
| 89 | touch native.file; |
| 90 | fi |
| 91 | - meson --version |
| 92 | - meson _build |
| 93 | --native-file=native.file |
Michel Dänzer | 5078d66 | 2019-04-17 12:53:23 +0200 | [diff] [blame] | 94 | -D buildtype=debug |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 95 | -D build-tests=true |
| 96 | -D libunwind=${UNWIND} |
| 97 | ${DRI_LOADERS} |
| 98 | -D dri-drivers=${DRI_DRIVERS:-[]} |
| 99 | ${GALLIUM_ST} |
| 100 | -D gallium-drivers=${GALLIUM_DRIVERS:-[]} |
| 101 | -D vulkan-drivers=${VULKAN_DRIVERS:-[]} |
Bas Nieuwenhuizen | 158d45d | 2019-03-13 00:15:09 +0100 | [diff] [blame] | 102 | -D I-love-half-baked-turnips=true |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 103 | - cd _build |
| 104 | - meson configure |
Eric Engestrom | 68a9383 | 2019-02-13 14:25:45 +0000 | [diff] [blame] | 105 | - ninja -j4 |
Michel Dänzer | ecb3eed | 2019-04-03 12:23:51 +0200 | [diff] [blame] | 106 | - LC_ALL=C.UTF-8 ninja test |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 107 | |
Eric Engestrom | 06b245b | 2019-01-23 15:46:10 +0000 | [diff] [blame] | 108 | .scons-build: |
| 109 | extends: .build |
| 110 | variables: |
| 111 | SCONSFLAGS: "-j4" |
| 112 | script: |
Eric Engestrom | d4c6d4d | 2019-01-28 16:30:36 +0000 | [diff] [blame] | 113 | - if test -n "$LLVM_VERSION"; then |
| 114 | export LLVM_CONFIG="llvm-config-${LLVM_VERSION}"; |
| 115 | fi |
Eric Engestrom | 06b245b | 2019-01-23 15:46:10 +0000 | [diff] [blame] | 116 | - scons $SCONS_TARGET |
| 117 | - eval $SCONS_CHECK_COMMAND |
| 118 | |
Michel Dänzer | a2cce70 | 2019-03-20 15:58:31 +0100 | [diff] [blame] | 119 | # NOTE: Building SWR is 2x (yes two) times slower than all the other |
| 120 | # gallium drivers combined. |
| 121 | # 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] | 122 | # |
| 123 | # We also put softpipe (and therefore gallium nine, which requires |
| 124 | # it) here, since softpipe/llvmpipe can't be built alongside classic |
| 125 | # swrast. |
Eric Engestrom | 1291c68 | 2019-04-16 18:06:53 +0200 | [diff] [blame] | 126 | # |
| 127 | # Putting glvnd here is arbitrary, but we want it in one of the builds |
| 128 | # for coverage. |
| 129 | meson-swr-glvnd: |
Michel Dänzer | a2cce70 | 2019-03-20 15:58:31 +0100 | [diff] [blame] | 130 | extends: .meson-build |
| 131 | variables: |
| 132 | UNWIND: "true" |
| 133 | DRI_LOADERS: > |
Eric Engestrom | 1291c68 | 2019-04-16 18:06:53 +0200 | [diff] [blame] | 134 | -D glvnd=true |
| 135 | -D egl=true |
Michel Dänzer | a2cce70 | 2019-03-20 15:58:31 +0100 | [diff] [blame] | 136 | GALLIUM_ST: > |
Eric Engestrom | 41407c6 | 2019-03-08 16:33:07 +0000 | [diff] [blame] | 137 | -D dri3=true |
Michel Dänzer | a2cce70 | 2019-03-20 15:58:31 +0100 | [diff] [blame] | 138 | -D gallium-vdpau=false |
| 139 | -D gallium-xvmc=false |
| 140 | -D gallium-omx=disabled |
| 141 | -D gallium-va=false |
| 142 | -D gallium-xa=false |
Eric Engestrom | 41407c6 | 2019-03-08 16:33:07 +0000 | [diff] [blame] | 143 | -D gallium-nine=true |
Michel Dänzer | a2cce70 | 2019-03-20 15:58:31 +0100 | [diff] [blame] | 144 | -D gallium-opencl=disabled |
Eric Engestrom | 41407c6 | 2019-03-08 16:33:07 +0000 | [diff] [blame] | 145 | -D osmesa=gallium |
| 146 | GALLIUM_DRIVERS: "swr,swrast,iris" |
Michel Dänzer | a2cce70 | 2019-03-20 15:58:31 +0100 | [diff] [blame] | 147 | LLVM_VERSION: "6.0" |
| 148 | |
| 149 | meson-clang: |
| 150 | extends: .meson-build |
| 151 | variables: |
| 152 | UNWIND: "true" |
| 153 | DRI_DRIVERS: "auto" |
| 154 | GALLIUM_DRIVERS: "auto" |
Eric Engestrom | 47f419d | 2019-05-01 12:09:26 +0100 | [diff] [blame] | 155 | VULKAN_DRIVERS: intel,amd,freedreno |
Michel Dänzer | 3fca2b7 | 2019-04-05 10:36:29 +0200 | [diff] [blame] | 156 | CC: "ccache clang-8" |
| 157 | CXX: "ccache clang++-8" |
Michel Dänzer | e9de19f | 2019-04-04 18:01:27 +0200 | [diff] [blame] | 158 | before_script: |
| 159 | - export CCACHE_BASEDIR="$PWD" CCACHE_DIR="$PWD/ccache" |
| 160 | - ccache --zero-stats --show-stats || true |
| 161 | # clang++ breaks if it picks up the GCC 8 directory without libstdc++.so |
| 162 | - apt-get remove -y libgcc-8-dev |
Michel Dänzer | a2cce70 | 2019-03-20 15:58:31 +0100 | [diff] [blame] | 163 | |
Eric Engestrom | faf9e40 | 2019-02-26 14:40:29 +0000 | [diff] [blame] | 164 | meson-vulkan: |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 165 | extends: .meson-build |
| 166 | variables: |
| 167 | UNWIND: "false" |
| 168 | DRI_LOADERS: > |
| 169 | -D glx=disabled |
| 170 | -D gbm=false |
| 171 | -D egl=false |
| 172 | -D platforms=x11,wayland,drm |
| 173 | -D osmesa=none |
| 174 | GALLIUM_ST: > |
| 175 | -D dri3=true |
| 176 | -D gallium-vdpau=false |
| 177 | -D gallium-xvmc=false |
| 178 | -D gallium-omx=disabled |
| 179 | -D gallium-va=false |
| 180 | -D gallium-xa=false |
| 181 | -D gallium-nine=false |
| 182 | -D gallium-opencl=disabled |
Bas Nieuwenhuizen | 158d45d | 2019-03-13 00:15:09 +0100 | [diff] [blame] | 183 | VULKAN_DRIVERS: intel,amd,freedreno |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 184 | LLVM_VERSION: "7" |
Eric Engestrom | 89a7467 | 2019-01-21 09:42:37 +0000 | [diff] [blame] | 185 | |
Eric Engestrom | 41407c6 | 2019-03-08 16:33:07 +0000 | [diff] [blame] | 186 | meson-main: |
Eric Engestrom | d73265e | 2019-01-28 17:38:17 +0000 | [diff] [blame] | 187 | extends: .meson-build |
| 188 | variables: |
Eric Engestrom | 41407c6 | 2019-03-08 16:33:07 +0000 | [diff] [blame] | 189 | UNWIND: "true" |
Eric Engestrom | d73265e | 2019-01-28 17:38:17 +0000 | [diff] [blame] | 190 | DRI_LOADERS: > |
| 191 | -D glx=dri |
| 192 | -D gbm=true |
| 193 | -D egl=true |
| 194 | -D platforms=x11,wayland,drm,surfaceless |
| 195 | -D osmesa=classic |
| 196 | DRI_DRIVERS: "i915,i965,r100,r200,swrast,nouveau" |
| 197 | GALLIUM_ST: > |
| 198 | -D dri3=true |
Eric Engestrom | 41407c6 | 2019-03-08 16:33:07 +0000 | [diff] [blame] | 199 | -D gallium-extra-hud=true |
| 200 | -D gallium-vdpau=true |
| 201 | -D gallium-xvmc=true |
| 202 | -D gallium-omx=bellagio |
| 203 | -D gallium-va=true |
| 204 | -D gallium-xa=true |
Eric Engestrom | d73265e | 2019-01-28 17:38:17 +0000 | [diff] [blame] | 205 | -D gallium-nine=false |
| 206 | -D gallium-opencl=disabled |
Eric Engestrom | 41407c6 | 2019-03-08 16:33:07 +0000 | [diff] [blame] | 207 | GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,svga,v3d,vc4,virgl,etnaviv,panfrost,lima" |
| 208 | LLVM_VERSION: "7" |
Eric Engestrom | d73265e | 2019-01-28 17:38:17 +0000 | [diff] [blame] | 209 | |
Eric Engestrom | 043b54a | 2019-04-16 18:06:30 +0200 | [diff] [blame] | 210 | meson-clover-llvm: |
Eric Engestrom | b5a70af | 2019-01-28 18:05:22 +0000 | [diff] [blame] | 211 | extends: .meson-build |
| 212 | variables: |
| 213 | UNWIND: "true" |
| 214 | DRI_LOADERS: > |
| 215 | -D glx=disabled |
| 216 | -D egl=false |
| 217 | -D gbm=false |
| 218 | GALLIUM_ST: > |
| 219 | -D dri3=false |
| 220 | -D gallium-vdpau=false |
| 221 | -D gallium-xvmc=false |
| 222 | -D gallium-omx=disabled |
| 223 | -D gallium-va=false |
| 224 | -D gallium-xa=false |
| 225 | -D gallium-nine=false |
| 226 | -D gallium-opencl=icd |
Eric Engestrom | 8dab707 | 2019-01-28 18:09:24 +0000 | [diff] [blame] | 227 | GALLIUM_DRIVERS: "r600,radeonsi" |
Eric Engestrom | 3006f9d | 2019-03-06 17:59:03 +0000 | [diff] [blame] | 228 | |
Eric Engestrom | 043b54a | 2019-04-16 18:06:30 +0200 | [diff] [blame] | 229 | meson-clover-llvm39: |
| 230 | extends: meson-clover-llvm |
Eric Engestrom | 3006f9d | 2019-03-06 17:59:03 +0000 | [diff] [blame] | 231 | variables: |
Eric Engestrom | 41407c6 | 2019-03-08 16:33:07 +0000 | [diff] [blame] | 232 | GALLIUM_DRIVERS: "i915,r600" |
Eric Engestrom | 3006f9d | 2019-03-06 17:59:03 +0000 | [diff] [blame] | 233 | LLVM_VERSION: "3.9" |
Eric Engestrom | 8dab707 | 2019-01-28 18:09:24 +0000 | [diff] [blame] | 234 | |
Eric Engestrom | faf9e40 | 2019-02-26 14:40:29 +0000 | [diff] [blame] | 235 | scons-nollvm: |
Eric Engestrom | 06b245b | 2019-01-23 15:46:10 +0000 | [diff] [blame] | 236 | extends: .scons-build |
| 237 | variables: |
| 238 | SCONS_TARGET: "llvm=0" |
| 239 | SCONS_CHECK_COMMAND: "scons llvm=0 check" |
Eric Engestrom | d4c6d4d | 2019-01-28 16:30:36 +0000 | [diff] [blame] | 240 | |
Eric Engestrom | faf9e40 | 2019-02-26 14:40:29 +0000 | [diff] [blame] | 241 | scons-llvm: |
Eric Engestrom | d4c6d4d | 2019-01-28 16:30:36 +0000 | [diff] [blame] | 242 | extends: .scons-build |
| 243 | variables: |
| 244 | SCONS_TARGET: "llvm=1" |
| 245 | SCONS_CHECK_COMMAND: "scons llvm=1 check" |
Michel Dänzer | 9b2473c | 2019-04-11 18:38:30 +0200 | [diff] [blame] | 246 | LLVM_VERSION: "3.4" |
| 247 | # LLVM 3.4 packages were built with an old libstdc++ ABI |
| 248 | CXX: "g++ -D_GLIBCXX_USE_CXX11_ABI=0" |
Eric Engestrom | 6a19ec9 | 2019-01-28 16:33:22 +0000 | [diff] [blame] | 249 | |
Eric Engestrom | faf9e40 | 2019-02-26 14:40:29 +0000 | [diff] [blame] | 250 | scons-swr: |
Eric Engestrom | 6a19ec9 | 2019-01-28 16:33:22 +0000 | [diff] [blame] | 251 | extends: .scons-build |
| 252 | variables: |
| 253 | SCONS_TARGET: "swr=1" |
| 254 | SCONS_CHECK_COMMAND: "true" |
| 255 | LLVM_VERSION: "6.0" |
Eric Engestrom | 7c15a87 | 2019-03-08 12:47:23 +0000 | [diff] [blame] | 256 | |
| 257 | scons-win64: |
| 258 | extends: .scons-build |
| 259 | variables: |
| 260 | SCONS_TARGET: platform=windows machine=x86_64 |
| 261 | SCONS_CHECK_COMMAND: "true" |