Skip to content

Commit 0e8100c

Browse files
committed
fix: correct demo asset location in CI smoke test
The smoke test was copying demo assets to release/demo/ but running the engine from build/ directory. The engine's fs_basepath defaults to its working directory, so it was looking for build/demo/ instead of release/demo/. Changes: - Update CI workflow to copy demo assets to build/demo/ instead of release/demo/ - Modify smoke test script to explicitly set fs_basepath to engine's directory - This ensures the engine can find the demo assets during testing The smoke test now correctly locates demo assets regardless of engine location.
1 parent 9ade8a9 commit 0e8100c

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,8 @@ jobs:
281281
run: |
282282
echo "Running 10-second smoke test..."
283283
cd build
284-
# Copy demo assets for smoke test
285-
cp -r ../mods/demo ../release/ 2>/dev/null || true
284+
# Copy demo assets for smoke test (engine looks in its own directory)
285+
cp -r ../mods/demo ./ 2>/dev/null || true
286286
# Run the smoke test
287287
ENGINE_BIN="./idtech3.x86_64" TIMEOUT=10 ../scripts/smoke_test.sh
288288

scripts/smoke_test.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,15 @@ echo "⏱️ Timeout: ${TIMEOUT}s"
2727
LOG_FILE="/tmp/smoke_test_$(date +%s).log"
2828
echo "📝 Log: ${LOG_FILE}"
2929

30+
# Set base path to directory containing the engine binary (should contain demo assets)
31+
ENGINE_DIR="$(dirname "${ENGINE_BIN}")"
32+
if [[ "${ENGINE_DIR}" == "." ]]; then
33+
ENGINE_DIR="$(pwd)"
34+
fi
35+
3036
set +e
3137
timeout "${TIMEOUT}s" "${ENGINE_BIN}" \
38+
+set fs_basepath "${ENGINE_DIR}" \
3239
+set r_renderer opengl \
3340
+set fs_game demo \
3441
+set sv_pure 0 \

0 commit comments

Comments
 (0)