fix(ci): isolate imported client test image

This commit is contained in:
Josh Creek
2026-08-21 20:16:01 +01:00
parent 3649620726
commit 24d6a547d6
22 changed files with 864 additions and 8 deletions
+9 -4
View File
@@ -1,19 +1,24 @@
# Local-only dedicated-server build and verification image. Pin the Godot
# release family used by project.godot; no image is pushed by this repository.
FROM --platform=linux/amd64 barichello/godot-ci:4.7.1 AS exporter
FROM --platform=linux/amd64 barichello/godot-ci:4.7.1 AS project-imported
WORKDIR /workspace
RUN apt-get update \
&& apt-get install -y --no-install-recommends libfontconfig1 \
&& rm -rf /var/lib/apt/lists/*
COPY Game /workspace/Game
# The ENet integration workflow runs its multi-process harness inside this
# pinned Godot image so source and CI use the same engine version.
RUN godot --headless --editor --path Game --import --quit
# Test the source client from an untouched, fully imported project. The
# dedicated-server export below rewrites the main scene and must not be used
# to run client integration tests.
FROM project-imported AS enet-test
COPY scripts/verify_enet_integration.sh /workspace/scripts/verify_enet_integration.sh
# Godot dedicated exports disallow command-line scene overrides. Bake the
# server scene into this export (the interactive project's source stays
# unchanged), then generate the global-script/autoload metadata it needs.
FROM project-imported AS exporter
RUN sed -i 's|^run/main_scene=.*$|run/main_scene="res://scenes/server_boot.tscn"|' Game/project.godot \
&& godot --headless --editor --path Game --import --quit \
&& mkdir -p /opt/cosmic-clash \
&& godot --headless --path Game --export-release "Linux Dedicated Server" /opt/cosmic-clash/CosmicClashServer.x86_64