Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b4cd946486 | ||
|
|
b44f0f266b | ||
|
|
8d5fc4eaae | ||
|
|
546f96b6d0 | ||
|
|
770c17349d | ||
|
|
3aeae2e81e | ||
|
|
75fa9cae18 |
+24
-5
@@ -2,16 +2,14 @@ FROM ubuntu-hlsdk
|
|||||||
|
|
||||||
# Avoid interactive prompts during package installation
|
# Avoid interactive prompts during package installation
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
ENV VULKAN_SDK_VERSION=1.4.341.1
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
# Install Vulkan SDK repos
|
RUN apt-get update && apt-get full-upgrade -y && apt-get autoremove -y
|
||||||
RUN wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | tee /etc/apt/trusted.gpg.d/lunarg.asc \
|
|
||||||
&& wget -qO /etc/apt/sources.list.d/lunarg-vulkan-noble.list http://packages.lunarg.com/vulkan/lunarg-vulkan-noble.list
|
|
||||||
|
|
||||||
# Install system dependencies and development packages
|
# Install system dependencies and development packages
|
||||||
RUN apt-get update && apt-get install --no-install-recommends --no-install-suggests -y \
|
RUN apt-get install --no-install-recommends --no-install-suggests -y \
|
||||||
vulkan-sdk \
|
|
||||||
libsdl2-dev \
|
libsdl2-dev \
|
||||||
libfreetype-dev \
|
libfreetype-dev \
|
||||||
\
|
\
|
||||||
@@ -33,6 +31,27 @@ RUN apt-get update && apt-get install --no-install-recommends --no-install-sugge
|
|||||||
libvulkan1 \
|
libvulkan1 \
|
||||||
imagemagick
|
imagemagick
|
||||||
|
|
||||||
|
# Install Vulkan SDK runtime dependencies only
|
||||||
|
#RUN apt-get update && apt-get install -y \
|
||||||
|
# libxcb-xinput0 libxcb-xinerama0 libxcb-cursor-dev
|
||||||
|
|
||||||
|
# Install Vulkan SDK
|
||||||
|
RUN mkdir -p /opt/VulkanSDK && wget -qO- \
|
||||||
|
https://sdk.lunarg.com/sdk/download/${VULKAN_SDK_VERSION}/linux/vulkansdk-linux-x86_64-${VULKAN_SDK_VERSION}.tar.xz | \
|
||||||
|
tar -xJ -C /opt/VulkanSDK/
|
||||||
|
|
||||||
|
ENV VULKAN_SDK=/opt/VulkanSDK/${VULKAN_SDK_VERSION}/x86_64
|
||||||
|
ENV PATH=$VULKAN_SDK/bin:$PATH
|
||||||
|
ENV LD_LIBRARY_PATH="$VULKAN_SDK/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
|
||||||
|
ENV VK_ADD_LAYER_PATH="$VULKAN_SDK/share/vulkan/explicit_layer.d${VK_ADD_LAYER_PATH:+:$VK_ADD_LAYER_PATH}"
|
||||||
|
ENV PKG_CONFIG_PATH="$VULKAN_SDK/share/pkgconfig:$VULKAN_SDK/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
|
||||||
|
|
||||||
|
# Common dev utils
|
||||||
|
RUN apt-get install --no-install-recommends --no-install-suggests -y \
|
||||||
|
ripgrep \
|
||||||
|
less \
|
||||||
|
fd-find
|
||||||
|
|
||||||
# Remove extra cache after all the installations
|
# Remove extra cache after all the installations
|
||||||
RUN rm -rf /var/lib/apt/lists/*
|
RUN rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,12 @@ build() {
|
|||||||
|
|
||||||
rendertest() {
|
rendertest() {
|
||||||
pushd /build/HLRTest/render
|
pushd /build/HLRTest/render
|
||||||
WAYLAND_DISPLAY=/tmp/wayland-headless ./rendertest.py --xash-dir /opt/hl run
|
WAYLAND_DISPLAY=/tmp/wayland-headless ./rendertest.py \
|
||||||
|
--xash-dir /opt/hl \
|
||||||
|
--xash-revision "${XASH3D_REVISION}" \
|
||||||
|
--pbr-revision "${PBR_REVISION}" \
|
||||||
|
--tests-revision "${HLRTEST_REVISION}" \
|
||||||
|
run
|
||||||
popd
|
popd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+43
-5
@@ -1,9 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -eux
|
set -eux
|
||||||
|
|
||||||
|
# just podman things
|
||||||
|
export DBUS_SESSION_BUS_ADDRESS=
|
||||||
|
|
||||||
NAME=xash-builder
|
NAME=xash-builder
|
||||||
|
|
||||||
HLRTEST_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. && pwd)"
|
HLRTEST_REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. && pwd)"
|
||||||
|
|
||||||
source .env
|
source .env
|
||||||
|
|
||||||
@@ -20,10 +23,38 @@ build() {
|
|||||||
build-image
|
build-image
|
||||||
}
|
}
|
||||||
|
|
||||||
|
git_short() {
|
||||||
|
local dir="${1:-.}"
|
||||||
|
local hash dirty_flag
|
||||||
|
|
||||||
|
# Get short commit hash
|
||||||
|
hash=$(cd "$dir" && git rev-parse --short HEAD 2>/dev/null)
|
||||||
|
|
||||||
|
if [[ -z "$hash" ]]; then
|
||||||
|
echo "Not a git repository" >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check for uncommitted changes (staged or unstaged)
|
||||||
|
dirty_flag=$(cd "$dir" && git status --porcelain --untracked-files=no 2>/dev/null)
|
||||||
|
|
||||||
|
if [[ -n "$dirty_flag" ]]; then
|
||||||
|
echo "${hash}-dirty"
|
||||||
|
else
|
||||||
|
echo "$hash"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
render-test() {
|
render-test() {
|
||||||
OUTPUT="${HLRTEST_PATH}/render/work"
|
local OUTPUT="${HLRTEST_REPO_DIR}/render/work"
|
||||||
# Make sure the image ubuntu user can write to the output
|
mkdir -p "${OUTPUT}"
|
||||||
chmod -R o+rw "${OUTPUT}"
|
|
||||||
|
local HLRTEST_REVISION=$(git_short "${HLRTEST_REPO_DIR}")
|
||||||
|
local XASH3D_REVISION=$(git_short "${XASH3D_RT_REPO_DIR}")
|
||||||
|
local PBR_REVISION=$(git_short "${HALFLIFE_PBR_REPO_DIR}")
|
||||||
|
|
||||||
|
# Make sure the image's ubuntu (uid=1000) user can write to the output
|
||||||
|
#chmod -R o+rw "${OUTPUT}"
|
||||||
|
|
||||||
podman run -it --rm \
|
podman run -it --rm \
|
||||||
--name ${NAME} \
|
--name ${NAME} \
|
||||||
@@ -34,14 +65,21 @@ render-test() {
|
|||||||
--read-only \
|
--read-only \
|
||||||
--tmpfs /tmp \
|
--tmpfs /tmp \
|
||||||
\
|
\
|
||||||
|
-e HLRTEST_REVISION="${HLRTEST_REVISION}" \
|
||||||
|
-e XASH3D_REVISION="${XASH3D_REVISION}" \
|
||||||
|
-e PBR_REVISION="${PBR_REVISION}" \
|
||||||
|
\
|
||||||
-v /dev/dri/renderD128:/dev/dri/renderD128:ro \
|
-v /dev/dri/renderD128:/dev/dri/renderD128:ro \
|
||||||
|
-v /etc/localtime:/etc/localtime:ro \
|
||||||
\
|
\
|
||||||
-v /opt/hl \
|
-v /opt/hl \
|
||||||
|
-v /home/ubuntu \
|
||||||
-v ${HALFLIFE_PBR_REPO_DIR}/valve/pbr:/opt/hl/valve/pbr:ro \
|
-v ${HALFLIFE_PBR_REPO_DIR}/valve/pbr:/opt/hl/valve/pbr:ro \
|
||||||
|
-v ${HALFLIFE_PBR_REPO_DIR}/valve/bluenoise:/opt/hl/valve/bluenoise:ro \
|
||||||
\
|
\
|
||||||
-v ${XASH3D_RT_REPO_DIR}:/build/xash3d-fwgs:O \
|
-v ${XASH3D_RT_REPO_DIR}:/build/xash3d-fwgs:O \
|
||||||
\
|
\
|
||||||
-v ${HLRTEST_PATH}:/build/HLRTest:ro \
|
-v ${HLRTEST_REPO_DIR}:/build/HLRTest:O \
|
||||||
-v ${OUTPUT}:/build/HLRTest/render/work \
|
-v ${OUTPUT}:/build/HLRTest/render/work \
|
||||||
\
|
\
|
||||||
ubuntu-xash-builder:latest \
|
ubuntu-xash-builder:latest \
|
||||||
|
|||||||
+1
-1
@@ -1,2 +1,2 @@
|
|||||||
imagecompare: imagecompare.c stb_image.h stb_image_write.h Makefile
|
imagecompare: imagecompare.c stb_image.h stb_image_write.h Makefile
|
||||||
${CC} -O3 -ggdb3 -march=native -Wall -Werror -pedantic -lm -o imagecompare imagecompare.c
|
${CC} -O3 -ggdb3 -march=native -Wall -Werror -pedantic -o imagecompare imagecompare.c -lm
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user