You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ci(audience): Linux PlayMode under xvfb (SDK-317 / SDK-318)
- Adds playmode-linux job using docker + xvfb. game-ci/unity-test-runner@v4 hardcodes -nographics, so PlayMode tests came back inconclusive and silently passed.
- Watchdog SIGTERMs Unity 30s after "Test run completed" so cells exit on suite finish; handles Unity 6's known shutdown hang.
- Replaces cartesian + partial-include matrix with explicit per-cell entries; partial includes failed to merge the runner column and spawned zero tests.
- Forces StandaloneLinux64 to OpenGLCore-only at build to skip Vulkan shader variants and runtime negotiation.
- Suppresses in-app log pane on Unity 6 Linux to skip llvmpipe rasterising UI Toolkit triangles per frame.
- Stamps CI provenance into Player.log on player startup; gated to CI runs only.
- Mirrors SDK output and OnError fires to Debug.Log so failures land in Player.log.
- Captures Unity profiler binary log when AUDIENCE_PLAYER_PROFILE_PATH is set.
- DiskStore.ReadBatch treats missing queue dir as empty (matches existing guards).
- Trims 30 unused packages from the sample-app manifest.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
# Stream the log to job stdout for live visibility while the
527
+
# editor is alive. tail --pid exits when unity_pid does.
528
+
tail --pid=$unity_pid -F "$log" 2>/dev/null &
529
+
530
+
deadline=$((SECONDS + 2400)) # 40 min hard cap
531
+
flush_deadline=0
532
+
kill_reason=""
533
+
while kill -0 $unity_pid 2>/dev/null; do
534
+
if [ "$SECONDS" -ge "$deadline" ]; then
535
+
kill_reason="hard-cap-40m"
536
+
break
537
+
fi
538
+
if [ "$flush_deadline" -eq 0 ] && grep -q "Test run completed" "$log" 2>/dev/null; then
539
+
flush_deadline=$((SECONDS + 30))
540
+
echo "[watchdog] saw \"Test run completed\" at ${SECONDS}s; SIGTERM after 30s flush window"
541
+
fi
542
+
if [ "$flush_deadline" -gt 0 ] && [ "$SECONDS" -ge "$flush_deadline" ]; then
543
+
kill_reason="flush-window-elapsed"
544
+
break
545
+
fi
546
+
sleep 5
547
+
done
548
+
549
+
if [ -n "$kill_reason" ]; then
550
+
echo "[watchdog] sending SIGTERM to Unity (reason: $kill_reason)"
551
+
kill -TERM $unity_pid 2>/dev/null || true
552
+
# 15 s grace, then SIGKILL if still alive.
553
+
for _ in 1 2 3; do
554
+
kill -0 $unity_pid 2>/dev/null || break
555
+
sleep 5
556
+
done
557
+
if kill -0 $unity_pid 2>/dev/null; then
558
+
echo "[watchdog] SIGTERM not honored, sending SIGKILL"
559
+
kill -KILL $unity_pid 2>/dev/null || true
560
+
fi
561
+
fi
562
+
563
+
wait $unity_pid 2>/dev/null
564
+
test_rc=$?
565
+
if [ "$kill_reason" = "hard-cap-40m" ]; then
566
+
echo "::warning::Unity hit the 40 min hard cap without logging \"Test run completed\". The player may have hung mid-suite. Inspect Player.log to see how far it got."
567
+
fi
568
+
569
+
# Player runs in a separate process from the editor; copy its Player.log so HTTP traces and OnError fires are captured.
570
+
# Glob across companies / products so the capture survives renames.
571
+
find /root/.config/unity3d -name "Player.log" 2>/dev/null | while IFS= read -r f; do
echo "::error::$inconclusive test(s) came back inconclusive. Unity could not actually execute them. Check that xvfb is running and the player launches."
611
+
exit 1
612
+
fi
613
+
if [ "${passed:-0}" -eq 0 ] && [ "${failed:-0}" -eq 0 ]; then
614
+
echo "::error::Zero tests passed and zero failed. The suite did not execute."
615
+
exit 1
616
+
fi
617
+
618
+
- name: Surface CI provenance to job summary
619
+
# Greps the [CI] line from Player.log into the job summary so the buildGuid is copy-pasteable from the Actions UI.
0 commit comments