gitlab-ci: add a meson vulkan build
authorEric Engestrom <eric.engestrom@intel.com>
Sun, 20 Jan 2019 11:26:53 +0000 (11:26 +0000)
committerEric Engestrom <eric.engestrom@intel.com>
Wed, 6 Feb 2019 17:56:30 +0000 (17:56 +0000)
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
.gitlab-ci.yml
.travis.yml

index 90b4f01cf00ba4f347adaf6f0076a8a3a4bddee7..2bec220666d4bfe340fb78de2581d4d2bda95d27 100644 (file)
@@ -22,6 +22,7 @@ variables:
 
 stages:
   - containers-build
+  - build+test
 
 
 # CONTAINERS
@@ -47,3 +48,63 @@ containers:ubuntu:
     changes:
       - .gitlab-ci.yml
       - .gitlab-ci/Dockerfile.ubuntu
+
+
+# BUILD
+
+.build:
+  image: $UBUNTU_IMAGE
+  stage: build+test
+  artifacts:
+    when: on_failure
+    untracked: true
+
+.meson-build:
+  extends: .build
+  before_script:
+    # We need to control the version of llvm-config we're using, so we'll
+    # generate a native file to do so. This requires meson >=0.49
+    - if test -n "$LLVM_VERSION"; then
+        LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
+        echo -e "[binaries]\nllvm-config = '`which $LLVM_CONFIG`'" > native.file;
+        $LLVM_CONFIG --version;
+      else
+        touch native.file;
+      fi
+    - meson --version
+    - meson _build
+            --native-file=native.file
+            -D build-tests=true
+            -D libunwind=${UNWIND}
+            ${DRI_LOADERS}
+            -D dri-drivers=${DRI_DRIVERS:-[]}
+            ${GALLIUM_ST}
+            -D gallium-drivers=${GALLIUM_DRIVERS:-[]}
+            -D vulkan-drivers=${VULKAN_DRIVERS:-[]}
+    - cd _build
+    - meson configure
+  script:
+    - ninja
+    - ninja test
+
+build:meson-vulkan:
+  extends: .meson-build
+  variables:
+    UNWIND: "false"
+    DRI_LOADERS: >
+      -D glx=disabled
+      -D gbm=false
+      -D egl=false
+      -D platforms=x11,wayland,drm
+      -D osmesa=none
+    GALLIUM_ST: >
+      -D dri3=true
+      -D gallium-vdpau=false
+      -D gallium-xvmc=false
+      -D gallium-omx=disabled
+      -D gallium-va=false
+      -D gallium-xa=false
+      -D gallium-nine=false
+      -D gallium-opencl=disabled
+    VULKAN_DRIVERS: intel,amd
+    LLVM_VERSION: "7"
index 68cb3f0d8f8e32e599b1dffe96355fb11bf23698..141337db26df15ef435c8dbfa233ead14bfd0182 100644 (file)
@@ -31,30 +31,6 @@ env:
 
 matrix:
   include:
-    - env:
-        - LABEL="meson Vulkan"
-        - BUILD=meson
-        - UNWIND="false"
-        - DRI_LOADERS="-Dglx=disabled -Dgbm=false -Degl=false -Dplatforms=x11,wayland,drm -Dosmesa=none"
-        - GALLIUM_ST="-Ddri3=true -Dgallium-vdpau=false -Dgallium-xvmc=false -Dgallium-omx=disabled -Dgallium-va=false -Dgallium-xa=false -Dgallium-nine=false -Dgallium-opencl=disabled"
-        - VULKAN_DRIVERS="intel,amd"
-        - LLVM_VERSION=7
-        - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
-      addons:
-        apt:
-          sources:
-            - sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main'
-              key_url: https://apt.llvm.org/llvm-snapshot.gpg.key
-          packages:
-            - llvm-7-dev
-            # Common
-            - xz-utils
-            - libexpat1-dev
-            - libx11-xcb-dev
-            - libelf-dev
-            - python3.5
-            - python3-pip
-            - python3-setuptools
     - env:
         - LABEL="meson loaders/classic DRI"
         - BUILD=meson