gitlab-ci: build VulkanTools into the Vulkan testing container
authorAndres Gomez <agomez@igalia.com>
Thu, 20 Feb 2020 15:09:03 +0000 (17:09 +0200)
committerAndres Gomez <tanty@igalia.com>
Wed, 4 Mar 2020 13:21:58 +0000 (15:21 +0200)
In preparation for having automated testing with Vulkan traces.

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
.gitlab-ci.yml
.gitlab-ci/build-vulkantools.sh [new file with mode: 0644]
.gitlab-ci/container/x86_test-vk.sh

index 41dbf0bdc921b9d47a8aadcb34bfd253af90e6c6..6a69e6e853b1c17f2f7f85b26d2c13b7143c720e 100644 (file)
@@ -131,7 +131,7 @@ x86_test-gl:
 x86_test-vk:
   extends: x86_build
   variables:
-    DEBIAN_TAG: &x86_test-vk "2020-02-02"
+    DEBIAN_TAG: &x86_test-vk "2020-02-03"
   # Can only be triggered manually on personal branches because RADV is the only
   # driver that does Vulkan testing at the moment.
   rules:
diff --git a/.gitlab-ci/build-vulkantools.sh b/.gitlab-ci/build-vulkantools.sh
new file mode 100644 (file)
index 0000000..f1fc64a
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+set -ex
+
+VULKANTOOLS_VERSION=1862c6a47b64cd09156205d7f7e6b3bfcea76390
+
+git clone https://github.com/LunarG/VulkanTools.git --single-branch --no-checkout /VulkanTools
+pushd /VulkanTools
+git checkout "$VULKANTOOLS_VERSION"
+./update_external_sources.sh
+mkdir _build
+./scripts/update_deps.py --dir=_build --config=release --generator=Ninja
+cmake -G Ninja -B_build -H. \
+      -DCMAKE_BUILD_TYPE=Release \
+      -DCMAKE_INSTALL_PREFIX=/VulkanTools/build \
+      -DBUILD_TESTS=OFF \
+      -DBUILD_VLF=OFF \
+      -DBUILD_VKTRACE=OFF \
+      -DBUILD_VIA=OFF \
+      -DBUILD_VKTRACE_REPLAY=OFF \
+      -C_build/helper.cmake
+ninja -C _build -j4 VkLayer_screenshot VkLayer_screenshot-staging-json
+mkdir -p build/etc/vulkan/explicit_layer.d
+mkdir build/lib
+install _build/layersvt/staging-json/VkLayer_screenshot.json build/etc/vulkan/explicit_layer.d
+install _build/layersvt/libVkLayer_screenshot.so build/lib
+strip build/lib/*
+find . -not -path './build' -not -path './build/*' -delete
+popd
index 13660481214c6509cad197aba73b64216f8d36c5..aeb86ab1331a65141c746864f3a2369b9c432164 100644 (file)
@@ -43,10 +43,16 @@ apt-get install -y --no-remove \
       libvulkan-dev \
       libwayland-client0 \
       libwayland-server0 \
+      libxcb-ewmh2 \
+      libxcb-ewmh-dev \
+      libxcb-keysyms1 \
+      libxcb-keysyms1-dev \
       libxcb-randr0 \
       libxcb-xfixes0 \
       libxkbcommon0 \
       libxkbcommon-dev \
+      libxrandr2 \
+      libxrandr-dev \
       libxrender1 \
       libxrender-dev \
       libllvm9 \
@@ -71,6 +77,10 @@ apt-get install -y --no-remove \
 
 . .gitlab-ci/build-gfxreconstruct.sh
 
+############### Build VulkanTools
+
+. .gitlab-ci/build-vulkantools.sh
+
 ############### Uninstall the build software
 
 apt-get purge -y \
@@ -84,7 +94,10 @@ apt-get purge -y \
       liblz4-dev \
       libpng-dev \
       libvulkan-dev \
+      libxcb-ewmh-dev \
+      libxcb-keysyms1-dev \
       libxkbcommon-dev \
+      libxrandr-dev \
       libxrender-dev \
       meson \
       patch \