From f674a45e9b703287dd3ce88e4d9395523574ecd2 Mon Sep 17 00:00:00 2001 From: Kbz-8 Date: Wed, 11 Mar 2026 13:54:17 +0100 Subject: [PATCH] adding a testing environment --- build.zig.zon | 4 ++-- test/environment/Dockerfile | 11 +++++++++++ test/environment/README.md | 7 +++++++ test/environment/docker-compose.yaml | 6 ++++++ 4 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 test/environment/Dockerfile create mode 100644 test/environment/README.md create mode 100644 test/environment/docker-compose.yaml diff --git a/build.zig.zon b/build.zig.zon index 9a79bb3..772a2cd 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -59,8 +59,8 @@ .lazy = true, }, .SPIRV_Interpreter = .{ - .url = "git+https://git.kbz8.me/kbz_8/SPIRV-Interpreter#5d704dcc5fabdea92831d132957bad930bafc974", - .hash = "SPIRV_Interpreter-0.0.1-ajmpnwigAwCCfRQ1Z7QEwcSaSINeGCsjiOeMHgt_KWHj", + .url = "git+https://git.kbz8.me/kbz_8/SPIRV-Interpreter#7dd86b021d2c8bf60cc68d517864e50556d649cf", + .hash = "SPIRV_Interpreter-0.0.1-ajmpn_-fAwAaA7IFb6x6le74IZBlfjXrQjyuHF-SCtf0", }, }, diff --git a/test/environment/Dockerfile b/test/environment/Dockerfile new file mode 100644 index 0000000..26f8af3 --- /dev/null +++ b/test/environment/Dockerfile @@ -0,0 +1,11 @@ +FROM ubuntu:latest + +WORKDIR /root + +RUN apt update && apt install -y git rustup clang curl libgl1 libsm6 libwayland-egl1 libwayland-cursor0 libwayland-server0; +RUN rustup default stable; +RUN cargo install deqp-runner && cp $HOME/.cargo/bin/deqp-runner /usr/bin; +RUN curl -L https://github.com/marler8997/anyzig/releases/latest/download/anyzig-x86_64-linux.tar.gz | tar xz && mv zig /usr/bin/; +RUN git clone https://git.kbz8.me/kbz_8/VulkanDriver.git && cd VulkanDriver; + +ENTRYPOINT ["/usr/bin/bash"] diff --git a/test/environment/README.md b/test/environment/README.md new file mode 100644 index 0000000..f855f20 --- /dev/null +++ b/test/environment/README.md @@ -0,0 +1,7 @@ +## Small testing environment + +A simple small testing environment in a docker container to test the driver with controlled resources usage. + +To launch the container with 8GB of memory limit: `docker compose up -d`\ +To launch the container with custom memory limit: `MEM_LIMIT="20g" docker compose up -d`\ +To shell into it: `docker compose run --rm ubuntu-shell` diff --git a/test/environment/docker-compose.yaml b/test/environment/docker-compose.yaml new file mode 100644 index 0000000..0f828dd --- /dev/null +++ b/test/environment/docker-compose.yaml @@ -0,0 +1,6 @@ +services: + ubuntu-shell: + build: . + mem_limit: ${MEM_LIMIT:-8g} + stdin_open: true + tty: true