Running the tests on AMD requires rebuilding the Docker image, unfortunately, so the pipelines for this MR won't work until the MR itself is accepted (and the image is regenerated).
-- v7: ci: Briefly document the CI setup. ci: Execute the tests. ci: Execute CI also an a runner with an AMD GPU.
From: Giovanni Mascellani gmascellani@codeweavers.com
In order for this to work it is expected that the Docker host exposes the devices in /dev/dri to the guest system, and that the render nodes have GID 800 (usually that would be the "render" group, but the GID for that group is dynamically assigned, so we explicitly agree on a fixed number). --- gitlab/build.yml | 12 +++++++++++- gitlab/image.docker | 3 ++- 2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/gitlab/build.yml b/gitlab/build.yml index 49e69d57..c10d64a6 100644 --- a/gitlab/build.yml +++ b/gitlab/build.yml @@ -25,5 +25,15 @@ paths: - artifacts
-build: +build-radv: extends: .build + tags: + - amd-gpu + variables: + VK_LOADER_DRIVERS_SELECT: 'radeon_*' + +build-llvmpipe: + extends: .build + allow_failure: true + variables: + VK_LOADER_DRIVERS_SELECT: 'lvp_*' diff --git a/gitlab/image.docker b/gitlab/image.docker index afc0dd1b..dd6923cb 100644 --- a/gitlab/image.docker +++ b/gitlab/image.docker @@ -35,6 +35,7 @@ RUN export DEBIAN_FRONTEND=noninteractive; \ cd ../.. && \ rm -rf wine && \ apt-get clean && \ - useradd -m gitlab + groupadd host-render -g 800 && \ + useradd -m gitlab -G host-render
USER gitlab
From: Giovanni Mascellani gmascellani@codeweavers.com
--- gitlab/build-linux | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gitlab/build-linux b/gitlab/build-linux index 1b7a7a5b..4162442d 100755 --- a/gitlab/build-linux +++ b/gitlab/build-linux @@ -11,9 +11,9 @@ set -Eeuxo pipefail rm -fr build mkdir build cd build -../configure --enable-demos && make -j$(nproc) && make -j$(nproc) crosstest || touch ../pipeline_failed +../configure --enable-demos && make -j$(nproc) && make -j$(nproc) crosstest && make -j$(nproc) check || touch ../pipeline_failed
mkdir -p ../artifacts/$COMMIT -rsync -Rr doc/* tests/*.exe ../artifacts/$COMMIT +rsync -Rr doc/* tests/*.exe test-suite.log tests/*.log tests/*/*.log ../artifacts/$COMMIT
git reset --hard
From: Giovanni Mascellani gmascellani@codeweavers.com
--- README | 11 +++++++++++ gitlab/README | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 gitlab/README
diff --git a/README b/README index 155f7de2..336fb197 100644 --- a/README +++ b/README @@ -82,3 +82,14 @@ commas or semicolons. conditions in tests.
* VKD3D_TEST_BUG - set to 0 to disable bug_if() conditions in tests. + +================ +Developing vkd3d +================ + +Development of vkd3d happens on the Wine GitLab instance +(https://gitlab.winehq.org/wine/vkd3d/). Contributor are encouraged to +submit their patches using the merge request tool. + +Each merge request is automatically tested with the GitLab CI +system. See gitlab/README in the Git tree for more details. diff --git a/gitlab/README b/gitlab/README new file mode 100644 index 00000000..e24f0b08 --- /dev/null +++ b/gitlab/README @@ -0,0 +1,42 @@ +===================== +vkd3d testing scripts +===================== + +These scripts are used by the GitLab CI feature to automatically run +the vkd3d tests on each merge request. + +The CI target build-image, 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. + +The file build.yml contains the actual testing targets. Currently +vkd3d is tested on Linux x86-64, with two different Vulkan drivers +(both from Mesa): llvmpipe (a software implementation) and RADV (a +hardware implementation backed by an AMD GPU). The testing logs are +available as CI artifacts. + +Some custom runner configuration is required in order to run the tests +on an AMD GPU. Specifically, a runner tagged with "amd-gpu" must be +available with the following features: + +* of course a sufficiently recent AMD GPU must be available to the + host; + +* the host kernel must have the appropriate driver and firmware + installed; + +* the runner must forward the DRI nodes to the guest; this can be + configured by adding the line + + devices = ["/dev/dri"] + + to the relevant [runners.docker] section in the config.toml file; + +* the DRI render nodes must be readable and writable by GID 800, + either because they belong to that group (e.g. because the group + "render", which tipically owns those files, has GID 800) or via a FS + ACL; such stipulation is needed because in Debian group "render" is + created dynamically, therefore has no predictable GID: the use of a + fixed GID enables the guest system to be set up so that the user + running the tests can access the render nodes.