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: |
Andres Gomez | cf79d62 | 2019-03-05 13:55:17 +0200 | [diff] [blame] | 19 | UBUNTU_TAG: 2019-03-05-01 |
Eric Engestrom | 3dc5faf | 2019-02-08 17:43:55 +0000 | [diff] [blame] | 20 | UBUNTU_IMAGE: "$CI_REGISTRY_IMAGE/ubuntu:$UBUNTU_TAG" |
Michel Dänzer | d6c55f6 | 2019-02-08 10:14:58 +0100 | [diff] [blame] | 21 | UBUNTU_IMAGE_MAIN: "registry.freedesktop.org/mesa/mesa/ubuntu:$UBUNTU_TAG" |
Eric Engestrom | 329f5cd | 2019-01-20 11:21:45 +0000 | [diff] [blame] | 22 | |
Eric Engestrom | 329f5cd | 2019-01-20 11:21:45 +0000 | [diff] [blame] | 23 | stages: |
| 24 | - containers-build |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 25 | - build+test |
Eric Engestrom | 329f5cd | 2019-01-20 11:21:45 +0000 | [diff] [blame] | 26 | |
| 27 | |
Eric Engestrom | 7f5d9c2 | 2019-02-22 15:52:08 +0000 | [diff] [blame] | 28 | # When to automatically run the CI |
| 29 | .ci-run-policy: |
| 30 | only: |
| 31 | - master |
| 32 | - merge_requests |
| 33 | - /^ci([-/].*)?$/ |
Michel Dänzer | 6140ed3 | 2019-03-26 18:39:41 +0100 | [diff] [blame^] | 34 | retry: |
| 35 | max: 2 |
| 36 | when: |
| 37 | - runner_system_failure |
Eric Engestrom | 7f5d9c2 | 2019-02-22 15:52:08 +0000 | [diff] [blame] | 38 | |
| 39 | |
Eric Engestrom | 329f5cd | 2019-01-20 11:21:45 +0000 | [diff] [blame] | 40 | # CONTAINERS |
| 41 | |
Eric Engestrom | faf9e40 | 2019-02-26 14:40:29 +0000 | [diff] [blame] | 42 | ubuntu: |
Eric Engestrom | 7f5d9c2 | 2019-02-22 15:52:08 +0000 | [diff] [blame] | 43 | extends: .ci-run-policy |
Eric Engestrom | 329f5cd | 2019-01-20 11:21:45 +0000 | [diff] [blame] | 44 | stage: containers-build |
| 45 | image: docker:stable |
| 46 | services: |
| 47 | - docker:dind |
| 48 | variables: |
| 49 | DOCKER_HOST: tcp://docker:2375 |
| 50 | DOCKER_DRIVER: overlay2 |
| 51 | script: |
| 52 | # Enable experimental features such as `docker manifest inspect` |
| 53 | - mkdir -p ~/.docker |
| 54 | - "echo '{\"experimental\": \"enabled\"}' > ~/.docker/config.json" |
| 55 | - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY |
| 56 | # Check if the image (with the specific tag) already exists |
| 57 | - docker manifest inspect $UBUNTU_IMAGE && exit || true |
Michel Dänzer | d6c55f6 | 2019-02-08 10:14:58 +0100 | [diff] [blame] | 58 | # Try to re-use the image from the main repository's registry |
| 59 | - docker image pull $UBUNTU_IMAGE_MAIN && |
| 60 | docker image tag $UBUNTU_IMAGE_MAIN $UBUNTU_IMAGE && |
| 61 | docker image push $UBUNTU_IMAGE && exit || true |
Eric Engestrom | 329f5cd | 2019-01-20 11:21:45 +0000 | [diff] [blame] | 62 | - docker build -t $UBUNTU_IMAGE -f .gitlab-ci/Dockerfile.ubuntu . |
| 63 | - docker push $UBUNTU_IMAGE |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 64 | |
| 65 | |
| 66 | # BUILD |
| 67 | |
| 68 | .build: |
Eric Engestrom | 7f5d9c2 | 2019-02-22 15:52:08 +0000 | [diff] [blame] | 69 | extends: .ci-run-policy |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 70 | image: $UBUNTU_IMAGE |
| 71 | stage: build+test |
Michel Dänzer | a3f34f9 | 2019-03-26 18:35:59 +0100 | [diff] [blame] | 72 | cache: |
| 73 | paths: |
| 74 | - ccache |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 75 | artifacts: |
| 76 | when: on_failure |
| 77 | untracked: true |
Eric Engestrom | 23b485c | 2019-02-12 16:59:27 +0000 | [diff] [blame] | 78 | # Use ccache transparently, and print stats before/after |
| 79 | before_script: |
| 80 | - export PATH="/usr/lib/ccache:$PATH" |
| 81 | - export CCACHE_BASEDIR="$PWD" |
| 82 | - export CCACHE_DIR="$PWD/ccache" |
| 83 | - export CCACHE_COMPILERCHECK=content |
| 84 | - ccache --zero-stats || true |
| 85 | - ccache --show-stats || true |
| 86 | after_script: |
| 87 | - export CCACHE_DIR="$PWD/ccache" |
| 88 | - ccache --show-stats |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 89 | |
| 90 | .meson-build: |
| 91 | extends: .build |
Eric Engestrom | 23b485c | 2019-02-12 16:59:27 +0000 | [diff] [blame] | 92 | script: |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 93 | # We need to control the version of llvm-config we're using, so we'll |
| 94 | # generate a native file to do so. This requires meson >=0.49 |
| 95 | - if test -n "$LLVM_VERSION"; then |
| 96 | LLVM_CONFIG="llvm-config-${LLVM_VERSION}"; |
| 97 | echo -e "[binaries]\nllvm-config = '`which $LLVM_CONFIG`'" > native.file; |
| 98 | $LLVM_CONFIG --version; |
| 99 | else |
| 100 | touch native.file; |
| 101 | fi |
| 102 | - meson --version |
| 103 | - meson _build |
| 104 | --native-file=native.file |
| 105 | -D build-tests=true |
| 106 | -D libunwind=${UNWIND} |
| 107 | ${DRI_LOADERS} |
| 108 | -D dri-drivers=${DRI_DRIVERS:-[]} |
| 109 | ${GALLIUM_ST} |
| 110 | -D gallium-drivers=${GALLIUM_DRIVERS:-[]} |
| 111 | -D vulkan-drivers=${VULKAN_DRIVERS:-[]} |
Bas Nieuwenhuizen | 158d45d | 2019-03-13 00:15:09 +0100 | [diff] [blame] | 112 | -D I-love-half-baked-turnips=true |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 113 | - cd _build |
| 114 | - meson configure |
Eric Engestrom | 68a9383 | 2019-02-13 14:25:45 +0000 | [diff] [blame] | 115 | - ninja -j4 |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 116 | - ninja test |
| 117 | |
Eric Engestrom | 06b245b | 2019-01-23 15:46:10 +0000 | [diff] [blame] | 118 | .scons-build: |
| 119 | extends: .build |
| 120 | variables: |
| 121 | SCONSFLAGS: "-j4" |
| 122 | script: |
Eric Engestrom | d4c6d4d | 2019-01-28 16:30:36 +0000 | [diff] [blame] | 123 | - if test -n "$LLVM_VERSION"; then |
| 124 | export LLVM_CONFIG="llvm-config-${LLVM_VERSION}"; |
| 125 | fi |
Eric Engestrom | 06b245b | 2019-01-23 15:46:10 +0000 | [diff] [blame] | 126 | - scons $SCONS_TARGET |
| 127 | - eval $SCONS_CHECK_COMMAND |
| 128 | |
Michel Dänzer | a2cce70 | 2019-03-20 15:58:31 +0100 | [diff] [blame] | 129 | autotools: |
| 130 | extends: .build |
| 131 | variables: |
Michel Dänzer | 6d0a7f7 | 2019-03-20 11:00:06 +0100 | [diff] [blame] | 132 | MAKEFLAGS: "-j8" |
Michel Dänzer | a2cce70 | 2019-03-20 15:58:31 +0100 | [diff] [blame] | 133 | LLVM_CONFIG: llvm-config-7 |
| 134 | script: |
| 135 | - mkdir build |
| 136 | - cd build |
| 137 | - ../autogen.sh |
| 138 | --enable-autotools |
| 139 | --enable-debug |
| 140 | --disable-llvm-shared-libs |
| 141 | - make |
| 142 | - make check |
| 143 | |
| 144 | # NOTE: Building SWR is 2x (yes two) times slower than all the other |
| 145 | # gallium drivers combined. |
| 146 | # Start this early so that it doesn't limit the total run time. |
| 147 | meson-gallium-swr: |
| 148 | extends: .meson-build |
| 149 | variables: |
| 150 | UNWIND: "true" |
| 151 | DRI_LOADERS: > |
| 152 | -D glx=disabled |
| 153 | -D egl=false |
| 154 | -D gbm=false |
| 155 | GALLIUM_ST: > |
| 156 | -D dri3=false |
| 157 | -D gallium-vdpau=false |
| 158 | -D gallium-xvmc=false |
| 159 | -D gallium-omx=disabled |
| 160 | -D gallium-va=false |
| 161 | -D gallium-xa=false |
| 162 | -D gallium-nine=false |
| 163 | -D gallium-opencl=disabled |
| 164 | GALLIUM_DRIVERS: "swr" |
| 165 | LLVM_VERSION: "6.0" |
| 166 | |
| 167 | meson-clang: |
| 168 | extends: .meson-build |
| 169 | variables: |
| 170 | UNWIND: "true" |
| 171 | DRI_DRIVERS: "auto" |
| 172 | GALLIUM_DRIVERS: "auto" |
Michel Dänzer | 1aca01d | 2019-03-26 10:04:27 +0100 | [diff] [blame] | 173 | CC: "ccache clang-7" |
| 174 | CXX: "ccache clang++-7" |
Michel Dänzer | a2cce70 | 2019-03-20 15:58:31 +0100 | [diff] [blame] | 175 | |
Eric Engestrom | faf9e40 | 2019-02-26 14:40:29 +0000 | [diff] [blame] | 176 | meson-vulkan: |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 177 | extends: .meson-build |
| 178 | variables: |
| 179 | UNWIND: "false" |
| 180 | DRI_LOADERS: > |
| 181 | -D glx=disabled |
| 182 | -D gbm=false |
| 183 | -D egl=false |
| 184 | -D platforms=x11,wayland,drm |
| 185 | -D osmesa=none |
| 186 | GALLIUM_ST: > |
| 187 | -D dri3=true |
| 188 | -D gallium-vdpau=false |
| 189 | -D gallium-xvmc=false |
| 190 | -D gallium-omx=disabled |
| 191 | -D gallium-va=false |
| 192 | -D gallium-xa=false |
| 193 | -D gallium-nine=false |
| 194 | -D gallium-opencl=disabled |
Bas Nieuwenhuizen | 158d45d | 2019-03-13 00:15:09 +0100 | [diff] [blame] | 195 | VULKAN_DRIVERS: intel,amd,freedreno |
Eric Engestrom | 46d23c0 | 2019-01-20 11:26:53 +0000 | [diff] [blame] | 196 | LLVM_VERSION: "7" |
Eric Engestrom | 89a7467 | 2019-01-21 09:42:37 +0000 | [diff] [blame] | 197 | |
Eric Engestrom | faf9e40 | 2019-02-26 14:40:29 +0000 | [diff] [blame] | 198 | meson-loader-classic-dri: |
Eric Engestrom | d73265e | 2019-01-28 17:38:17 +0000 | [diff] [blame] | 199 | extends: .meson-build |
| 200 | variables: |
| 201 | UNWIND: "false" |
| 202 | DRI_LOADERS: > |
| 203 | -D glx=dri |
| 204 | -D gbm=true |
| 205 | -D egl=true |
| 206 | -D platforms=x11,wayland,drm,surfaceless |
| 207 | -D osmesa=classic |
| 208 | DRI_DRIVERS: "i915,i965,r100,r200,swrast,nouveau" |
| 209 | GALLIUM_ST: > |
| 210 | -D dri3=true |
| 211 | -D gallium-vdpau=false |
| 212 | -D gallium-xvmc=false |
| 213 | -D gallium-omx=disabled |
| 214 | -D gallium-va=false |
| 215 | -D gallium-xa=false |
| 216 | -D gallium-nine=false |
| 217 | -D gallium-opencl=disabled |
| 218 | |
Eric Engestrom | faf9e40 | 2019-02-26 14:40:29 +0000 | [diff] [blame] | 219 | meson-glvnd: |
Eric Engestrom | ba26bc4 | 2019-01-29 08:57:17 +0000 | [diff] [blame] | 220 | extends: .meson-build |
| 221 | variables: |
| 222 | UNWIND: "true" |
| 223 | DRI_LOADERS: > |
| 224 | -D glvnd=true |
| 225 | -D egl=true |
| 226 | -D gbm=true |
| 227 | -D glx=dri |
| 228 | DRI_DRIVERS: "i965" |
| 229 | GALLIUM_ST: > |
| 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 | |
Eric Engestrom | faf9e40 | 2019-02-26 14:40:29 +0000 | [diff] [blame] | 238 | meson-gallium-radeonsi: |
Eric Engestrom | 06e8f19 | 2019-01-28 17:45:26 +0000 | [diff] [blame] | 239 | extends: .meson-build |
| 240 | variables: |
| 241 | UNWIND: "true" |
| 242 | DRI_LOADERS: > |
| 243 | -D glx=disabled |
| 244 | -D egl=false |
| 245 | -D gbm=false |
| 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 gallium-opencl=disabled |
| 255 | GALLIUM_DRIVERS: "radeonsi" |
| 256 | LLVM_VERSION: "7" |
| 257 | |
Eric Engestrom | faf9e40 | 2019-02-26 14:40:29 +0000 | [diff] [blame] | 258 | meson-gallium-drivers-other: |
Eric Engestrom | d407ead | 2019-01-28 17:47:09 +0000 | [diff] [blame] | 259 | extends: .meson-build |
| 260 | variables: |
| 261 | UNWIND: "true" |
| 262 | DRI_LOADERS: > |
| 263 | -D glx=disabled |
| 264 | -D egl=false |
| 265 | -D gbm=false |
| 266 | GALLIUM_ST: > |
| 267 | -D dri3=false |
| 268 | -D gallium-vdpau=false |
| 269 | -D gallium-xvmc=false |
| 270 | -D gallium-omx=disabled |
| 271 | -D gallium-va=false |
| 272 | -D gallium-xa=false |
| 273 | -D gallium-nine=false |
| 274 | -D gallium-opencl=disabled |
Eric Engestrom | db94499 | 2019-03-09 22:53:27 +0000 | [diff] [blame] | 275 | GALLIUM_DRIVERS: "i915,iris,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv,panfrost" |
Eric Engestrom | d407ead | 2019-01-28 17:47:09 +0000 | [diff] [blame] | 276 | LLVM_VERSION: "5.0" |
| 277 | |
Eric Engestrom | 3006f9d | 2019-03-06 17:59:03 +0000 | [diff] [blame] | 278 | meson-gallium-clover-llvm: |
Eric Engestrom | b5a70af | 2019-01-28 18:05:22 +0000 | [diff] [blame] | 279 | extends: .meson-build |
| 280 | variables: |
| 281 | UNWIND: "true" |
| 282 | DRI_LOADERS: > |
| 283 | -D glx=disabled |
| 284 | -D egl=false |
| 285 | -D gbm=false |
| 286 | GALLIUM_ST: > |
| 287 | -D dri3=false |
| 288 | -D gallium-vdpau=false |
| 289 | -D gallium-xvmc=false |
| 290 | -D gallium-omx=disabled |
| 291 | -D gallium-va=false |
| 292 | -D gallium-xa=false |
| 293 | -D gallium-nine=false |
| 294 | -D gallium-opencl=icd |
Eric Engestrom | 8dab707 | 2019-01-28 18:09:24 +0000 | [diff] [blame] | 295 | GALLIUM_DRIVERS: "r600,radeonsi" |
Eric Engestrom | 3006f9d | 2019-03-06 17:59:03 +0000 | [diff] [blame] | 296 | |
| 297 | meson-gallium-clover-llvm39: |
| 298 | extends: meson-gallium-clover-llvm |
| 299 | variables: |
| 300 | GALLIUM_DRIVERS: "r600" |
| 301 | LLVM_VERSION: "3.9" |
Eric Engestrom | 8dab707 | 2019-01-28 18:09:24 +0000 | [diff] [blame] | 302 | |
Eric Engestrom | faf9e40 | 2019-02-26 14:40:29 +0000 | [diff] [blame] | 303 | meson-gallium-st-other: |
Eric Engestrom | f33517b | 2019-01-28 18:13:55 +0000 | [diff] [blame] | 304 | extends: .meson-build |
| 305 | variables: |
| 306 | UNWIND: "true" |
| 307 | DRI_LOADERS: > |
| 308 | -D glx=disabled |
| 309 | -D egl=false |
| 310 | -D gbm=false |
| 311 | GALLIUM_ST: > |
| 312 | -D dri3=true |
| 313 | -D gallium-vdpau=true |
| 314 | -D gallium-xvmc=true |
| 315 | -D gallium-omx=bellagio |
| 316 | -D gallium-va=true |
| 317 | -D gallium-xa=true |
| 318 | -D gallium-nine=true |
| 319 | -D gallium-opencl=disabled |
| 320 | -D osmesa=gallium |
| 321 | GALLIUM_DRIVERS: "nouveau,swrast" |
| 322 | LLVM_VERSION: "5.0" |
| 323 | |
Eric Engestrom | faf9e40 | 2019-02-26 14:40:29 +0000 | [diff] [blame] | 324 | scons-nollvm: |
Eric Engestrom | 06b245b | 2019-01-23 15:46:10 +0000 | [diff] [blame] | 325 | extends: .scons-build |
| 326 | variables: |
| 327 | SCONS_TARGET: "llvm=0" |
| 328 | SCONS_CHECK_COMMAND: "scons llvm=0 check" |
Eric Engestrom | d4c6d4d | 2019-01-28 16:30:36 +0000 | [diff] [blame] | 329 | |
Eric Engestrom | faf9e40 | 2019-02-26 14:40:29 +0000 | [diff] [blame] | 330 | scons-llvm: |
Eric Engestrom | d4c6d4d | 2019-01-28 16:30:36 +0000 | [diff] [blame] | 331 | extends: .scons-build |
| 332 | variables: |
| 333 | SCONS_TARGET: "llvm=1" |
| 334 | SCONS_CHECK_COMMAND: "scons llvm=1 check" |
| 335 | LLVM_VERSION: "3.9" |
Eric Engestrom | 6a19ec9 | 2019-01-28 16:33:22 +0000 | [diff] [blame] | 336 | |
Eric Engestrom | faf9e40 | 2019-02-26 14:40:29 +0000 | [diff] [blame] | 337 | scons-swr: |
Eric Engestrom | 6a19ec9 | 2019-01-28 16:33:22 +0000 | [diff] [blame] | 338 | extends: .scons-build |
| 339 | variables: |
| 340 | SCONS_TARGET: "swr=1" |
| 341 | SCONS_CHECK_COMMAND: "true" |
| 342 | LLVM_VERSION: "6.0" |