From: Giovanni Mascellani <gmascellani(a)codeweavers.com>
---
gitlab/README | 17 ++++++++++++++++-
gitlab/image.docker | 18 ++++++++++++++++++
2 files changed, 34 insertions(+), 1 deletion(-)
diff --git a/gitlab/README b/gitlab/README
index 3b5203233..94cbde4ed 100644
--- a/gitlab/README
+++ b/gitlab/README
@@ -8,7 +8,22 @@ the vkd3d tests on each merge request.
The CI target image-linux, in the file image.yml, builds a Docker
image based on Debian bookworm with all the packages required for
testing, and uploads it to the GitLab container registry. The Docker
-script is in the file image.docker.
+script is in the file image.docker. Most of the dependencies are
+installed directly from the Debian repositories, with a few
+exceptions:
+
+ * widl is compiled from Wine sources, because installing it from the
+ Debian repositories would carry all the rest of Wine and make the
+ Docker image quite larger;
+
+ * SPIRV-Tools are recompiled from sources, because the packages in
+ Debian do not ship shared objects and are not multiarch-compatible;
+ in order to make the packages multiarch-compatible, the utilities
+ are dropped (they're not used by the CI anyway);
+
+ * llvmpipe from Mesa 24.0.1 is compiled (in addition to version
+ 22.3.6 available in Debian bookworm), because some Vulkan features
+ required by vkd3d are not available in Mesa 22.3.6.
The file build.yml contains the actual testing targets. Currently
vkd3d is tested on Linux, on x86-64 and i386, each architecture with
diff --git a/gitlab/image.docker b/gitlab/image.docker
index 270c509ba..8713a6742 100644
--- a/gitlab/image.docker
+++ b/gitlab/image.docker
@@ -23,6 +23,8 @@ RUN export DEBIAN_FRONTEND=noninteractive; \
apt-get install -y build-essential pkg-config gcc-mingw-w64 crossbuild-essential-i386
\
autoconf automake libtool flex bison curl \
git ca-certificates rsync \
+ llvm-15-dev meson ninja-build \
+ python3-mako zlib1g-dev libexpat-dev libdrm-dev \
doxygen doxygen-latex graphviz \
mesa-vulkan-drivers mesa-vulkan-drivers:i386 \
vulkan-tools spirv-headers \
@@ -36,6 +38,7 @@ RUN export DEBIAN_FRONTEND=noninteractive; \
libxcb-keysyms1-dev libxcb-keysyms1-dev:i386 && \
apt-get build-dep -y spirv-tools && \
apt-get build-dep -y -ai386 spirv-tools && \
+
git clone --depth 1 --branch wine-3.21
https://gitlab.winehq.org/wine/wine.git
&& \
cd wine && \
mkdir build && \
@@ -45,6 +48,7 @@ RUN export DEBIAN_FRONTEND=noninteractive; \
cp tools/widl/widl /usr/local/bin && \
cd ../.. && \
rm -rf wine && \
+
apt-get source spirv-tools && \
cd spirv-tools-* && \
sed -i -e 's|-DBUILD_SHARED_LIBS=OFF|-DBUILD_SHARED_LIBS=ON|g' debian/rules
&& \
@@ -55,6 +59,7 @@ RUN export DEBIAN_FRONTEND=noninteractive; \
rm -f spirv-tools-dbgsym_*.deb && \
dpkg -i spirv-tools_*.deb && \
rm -fr * && \
+
apt-get source spirv-tools && \
cd spirv-tools-* && \
sed -i -e 's|-DBUILD_SHARED_LIBS=OFF|-DBUILD_SHARED_LIBS=ON|g' debian/rules
&& \
@@ -65,6 +70,19 @@ RUN export DEBIAN_FRONTEND=noninteractive; \
rm -f spirv-tools-dbgsym_*.deb && \
dpkg -i spirv-tools_*.deb && \
rm -fr * && \
+
+ git clone --depth 1 --branch mesa-24.0.3
https://gitlab.freedesktop.org/mesa/mesa.git
&& \
+ cd mesa && \
+ mkdir build && \
+ cd build && \
+ meson -Dplatforms= -Dvideo-codecs= -Dvulkan-drivers=swrast -Dgallium-drivers=swrast
-Dopengl=false -Dglx=disabled -Degl=disabled -Dgles1=disabled -Dgles2=disabled
-Dshared-glapi=disabled .. && \
+ ninja && \
+ mkdir -p /usr/local/lib/mesa && \
+ sed -e 's|"library_path" *: *".*"|"library_path":
"./libvulkan_lvp.so"|g' src/gallium/targets/lavapipe/lvp_icd.x86_64.json
> /usr/local/lib/mesa/lvp_icd.x86_64.jsonrr && \
+ cp src/gallium/targets/lavapipe/libvulkan_lvp.so /usr/local/lib/mesa && \
+ cd ../.. && \
+ rm -fr mesa && \
+
apt-get clean && \
curl -L -s
https://github.com/microsoft/DirectXShaderCompiler/releases/download/v1.7.2…
| tar zx -C /usr/local ./lib/libdxcompiler.so ./lib/libdxil.so && \
groupadd host-render -g 800 && \
--
GitLab
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/743