ci(audience): run linux PlayMode under xvfb (SDK-317 / SDK-318)#768
Merged
ImmutableJeffrey merged 3 commits intomainfrom May 10, 2026
Merged
ci(audience): run linux PlayMode under xvfb (SDK-317 / SDK-318)#768ImmutableJeffrey merged 3 commits intomainfrom
ImmutableJeffrey merged 3 commits intomainfrom
Conversation
9a1379c to
e68a7f2
Compare
- Reworks playmode-linux to run inside a docker container under xvfb, via .github/scripts/audience/playmode-linux.sh. 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. - -force-glcore at runtime skips the Unity 6 Vulkan init and matches the Unity 2021.3 default path. - Suppresses in-app log pane on Unity 6 Linux to skip llvmpipe rasterising UI Toolkit triangles per frame. - Stamps CI build info 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. - DiskStore.ReadBatch treats missing queue dir as empty (matches existing guards). - Live-fire test SetUp ignores cleanup-time OnError fires so background flush cancellations do not fail unrelated tests. - Trims 30 unused packages from the sample-app manifest. - Extracts the macOS and Windows playmode runners and the Windows VS Build Tools setup to .github/scripts/, mirroring the Linux pattern. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…SampleApp Drops 30 of 39 manifest.json entries that the SampleApp does not use. Verified by grepping the SampleApp source, the SampleApp scene, and the Audience SDK runtime for any reference to each removed module or package. Removed packages: - com.unity.textmeshpro: no TMP_Text or TMPro references - com.unity.timeline: no PlayableDirector or TimelineAsset references - com.unity.ugui: SampleApp uses UI Toolkit, no Canvas references - com.unity.visualscripting: no ScriptMachine or graph references Removed engine modules: - ai, animation, assetbundle, cloth, director, imageconversion, particlesystem, physics, physics2d, screencapture, terrain, terrainphysics, tilemap, ui, umbra, unityanalytics, vehicles, video, vr, wind, xr: no runtime references in SampleApp or audience SDK - unitywebrequestassetbundle, unitywebrequestaudio, unitywebrequesttexture, unitywebrequestwww: SDK uses System.Net.Http.HttpClient, not UnityWebRequest variants Kept (verified used or required): - com.immutable.audience: the SDK - com.unity.test-framework: test runner - com.unity.modules.androidjni: Android plugin compatibility - com.unity.modules.audio: AudioListener present in SampleApp scene - com.unity.modules.imgui: test runner overlay - com.unity.modules.jsonserialize: defensive - com.unity.modules.uielements: UI Toolkit, primary UI surface - com.unity.modules.unitywebrequest: defensive (test framework) Expected impact: - Smaller IL2CPP and Mono player binaries. - Faster IL2CPP compile and Bee/Tundra build phases on every cell. - Faster project init (less to load, fewer InitializeOnLoad hooks). - Per-frame UI Toolkit cost on llvmpipe is unchanged; that is targeted separately by PR #765's log-pane suppression. Risk: a build link error on a platform that needs a removed module shows immediately in CI; revert is one-line.
ff27597 to
dea2d97
Compare
Removes the cached on-disk file counter and the BumpCount delta
tracking that maintained it. Count() now calls Directory.GetFiles
each time.
Why
- File.Delete silently succeeds when the path is missing, so
TryDelete returned true regardless of whether a real file went
away. Two concurrent flushes that both called Delete on the same
paths each got true back and each called BumpCount(-1), drifting
the cached count negative.
- Shutdown's force-clear of _sendInFlight followed by an ungated
final SendBatchAsync gave the race a real opening (visible as
the StatusBar_QueueSizeIncrementsAfterTrack flake on Linux Unity 6,
where finalCount went past zero into "got -2").
- The cached counter was already documented as approximate ("Tests
that plant files outside the DiskStore API will drift this and
should assert on filesystem state, not Count()"), so callers
could not rely on it anyway.
Trade-off: Count() is now O(N) on the queue directory. The only
caller is ImmutableAudience.QueueSize, read from a 500 ms UI poll
and a couple of test assertions, so this is fine for any realistic
queue size and removes an entire class of drift.
TryDelete drops its bool return because nothing needs to know
whether a real file was removed once we are not counting deltas.
dea2d97 to
ac25f26
Compare
nattb8
reviewed
May 10, 2026
nattb8
approved these changes
May 10, 2026
nattb8
reviewed
May 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
unityci/editor:ubuntu-*-linux-il2cpp-3under xvfb. The previousgame-ci/unity-test-runner@v4hardcoded-nographics, so PlayMode tests came back inconclusive and silently passed.Test run completedlog line so each Linux cell exits as soon as its suite finishes. 40-min hard cap as fallback.-force-glcoreat runtime skips Unity 6's Vulkan init and matches the Unity 2021.3 default GL path.matrix-shared.jsonso adding or removing a target only edits one file..github/scripts/audience/(install-unity-windows.ps1,install-unity-macos.sh,playmode-windows.ps1,playmode-macos.sh,playmode-linux.shhost wrapper,playmode-linux-container.shin-container body).Detect or Install Unity (StandaloneWindows64 only)); no suffix when the step is skipped.[CI] buildGuid=... runId=... cellId=...into Player.log on player startup. CI-only via env vars.DiskStore.ReadBatchtreats a missing queue directory as an empty queue. Matches existing guards.Linear: SDK-317, SDK-318