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