gitlab-ci: add Wine, win64's apitrace and DXVK to the Vulkan testing container
authorAndres Gomez <tanty@igalia.com>
Sun, 8 Mar 2020 21:37:23 +0000 (23:37 +0200)
committerMarge Bot <eric+marge@anholt.net>
Fri, 27 Mar 2020 13:48:17 +0000 (13:48 +0000)
In preparation for having automated testing with DXGI traces.

v2:
  - Updated DXVK version.
  - Merged the new Wine container into the existing Vulkan
    one (Michel).

v3:
  - Updated commit log.
  - Use a particular known-good apitrace version (Alexandros).

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4238>

.gitlab-ci.yml
.gitlab-ci/container/x86_test-vk.sh

index 6a4cad8b40ab687f3b1a0da03621f56e2a6788d7..f370a37b9ae0631905ff3da5dc4b7fc32073ee9f 100644 (file)
@@ -140,7 +140,7 @@ x86_test-gl:
 x86_test-vk:
   extends: x86_build
   variables:
-    FDO_DISTRIBUTION_TAG: &x86_test-vk "2020-03-25"
+    FDO_DISTRIBUTION_TAG: &x86_test-vk "2020-03-27"
 
 # Debian 9 based x86 build image (old LLVM)
 x86_build_old:
index 250affa004466085196a807113f0ceed766ee4b7..57966a6af4bc58aaba2884a1efb45f25468341ba 100644 (file)
@@ -52,15 +52,85 @@ apt-get install -y --no-remove \
       libxrender-dev \
       libxrender1 \
       meson \
+      p7zip \
       pkg-config \
       python \
       python3-distutils \
       python3-pil \
       python3-requests \
       python3-yaml \
+      wget \
       xauth \
       xvfb
 
+# We need multiarch for Wine
+dpkg --add-architecture i386
+
+apt-get update
+
+apt-get install -y --no-remove \
+      wine \
+      wine32 \
+      wine64
+
+############### Set up Wine env variables
+
+export WINEDEBUG="-all"
+export WINEPREFIX="/dxvk-wine64"
+
+############### Install DXVK
+
+DXVK_VERSION="1.6"
+
+# We don't want crash dialogs
+cat >crashdialog.reg <<EOF
+Windows Registry Editor Version 5.00
+
+[HKEY_CURRENT_USER\Software\Wine\WineDbg]
+"ShowCrashDialog"=dword:00000000
+
+EOF
+
+# Set the wine prefix and disable the crash dialog
+wine regedit crashdialog.reg
+rm crashdialog.reg
+
+# DXVK's setup often fails with:
+# "${WINEPREFIX}: Not a valid wine prefix."
+# and that is just spit because of checking the existance of the
+# system.reg file, which fails.
+# Just giving it a bit more of time for it to be created solves the
+# problem ...
+test -f  "${WINEPREFIX}/system.reg" || sleep 2
+
+wget "https://github.com/doitsujin/dxvk/releases/download/v${DXVK_VERSION}/dxvk-${DXVK_VERSION}.tar.gz"
+tar xzpf dxvk-"${DXVK_VERSION}".tar.gz
+dxvk-"${DXVK_VERSION}"/setup_dxvk.sh install
+rm -rf dxvk-"${DXVK_VERSION}"
+rm dxvk-"${DXVK_VERSION}".tar.gz
+
+############### Install Windows' apitrace binaries
+
+APITRACE_VERSION="9.0"
+APITRACE_VERSION_DATE="20191126"
+
+wget "https://github.com/apitrace/apitrace/releases/download/${APITRACE_VERSION}/apitrace-${APITRACE_VERSION}.${APITRACE_VERSION_DATE}-win64.7z"
+7zr x "apitrace-${APITRACE_VERSION}.${APITRACE_VERSION_DATE}-win64.7z" \
+      "apitrace-${APITRACE_VERSION}.${APITRACE_VERSION_DATE}-win64/bin/apitrace.exe" \
+      "apitrace-${APITRACE_VERSION}.${APITRACE_VERSION_DATE}-win64/bin/d3dretrace.exe"
+mv "apitrace-${APITRACE_VERSION}.${APITRACE_VERSION_DATE}-win64" /apitrace-msvc-win64
+rm "apitrace-${APITRACE_VERSION}.${APITRACE_VERSION_DATE}-win64.7z"
+
+# Add the apitrace path to the registry
+wine \
+    reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment" \
+    /v Path \
+    /t REG_EXPAND_SZ \
+    /d "C:\windows\system32;C:\windows;C:\windows\system32\wbem;Z:\apitrace-msvc-win64\bin" \
+    /f
+
+############### Building ...
+
 . .gitlab-ci/container/container_pre_build.sh
 
 ############### Build dEQP runner
@@ -104,6 +174,8 @@ apt-get purge -y \
       libxrandr-dev \
       libxrender-dev \
       meson \
-      pkg-config
+      p7zip \
+      pkg-config \
+      wget
 
 apt-get autoremove -y --purge