Repository navigation
ci: try the Unity CLI in place of GameCI for one EditMode job - #454
Closed
VPDPersonal wants to merge 4 commits into
Closed
VPDPersonal wants to merge 4 commits into
VPDPersonal wants to merge 4 commits into
Conversation
An experimental workflow that runs the EditMode tests of 6000.0.53f1 on the bare runner: the Unity CLI installs the Editor (cached as an installed folder), the Licensing Client bundled in the Editor takes the Personal seat, and `unity test` runs the tests and writes NUnit and JUnit reports. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e CLI Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Experiment, not for merge: can the official Unity CLI replace
game-ci/unity-test-runnerin the Unity EditMode job ofci.yml, and does the job get simpler or faster?Recommendation: stay on GameCI. The CLI job works on all 7 Unity versions with the Personal license, and the tests themselves run much faster on the bare runner. But the job is not simpler, and it is faster only with the Editor cached: 7 cached Editors need about 33 GB, and the repository cache holds 10 GB. Without the cache, the matrix takes 15:14 against 10:37 for GameCI. Details and a possible hybrid are below.
unity-cli-experiment.ymlruns on this PR only. Its file name does not match the Unity plan regex ofci.yml, so the GameCI matrix skips here and the two never compete for Personal seats.What the experimental job does
On a bare
ubuntu-latestrunner, without a container:install.sh, pinned byUNITY_CLI_VERSION=1.0.0-beta.13. There is no stable channel yet.actions/cache. On a miss it runsunity install <version> --yes --accept-eulaand saves the folder at once. In this experiment only 6000.0.53f1 is saved.scripts/make-unity-test-project.sh.Unity.Licensing.Client --activate-all --include-personal --username --password. It succeeds only on aSeat ID:line and retries twice.xvfb-run unity test ci-unity-project --editor-path … --mode EditMode --report-format nunit,junit --timeout 1200 --format github -- -aspidFastToolsStrictSetup -logFile …. Exit 8 fails the job. Exit 6 gets one more attempt.Unity -returnlicense -username -passwordin analways()step, then checksunity license status.No extra apt packages were needed for any 6000.x Editor. The
unity ci inittemplate installs 29 of them.Timings
6000.0.53f1, per step
GameCI: main run 38788273451 (job 116605893901). CLI warm: 38816519929. CLI cold: 38819031692, attempt 2, with the cache entry deleted first.
install.sh)unity install11:17 (download 7:48, unpack 3:20); 9:24 on an earlier cold runAll versions
GameCI: the same main run 38788273451. CLI: run 38819031692, cold for every version except the cached 6000.0.53f1.
What the numbers say:
unityci/editorimage, LLVM 20 on the ubuntu-24.04 runner. That is the likely cause, not verified. This gain comes from running outside the GameCI container, not from the CLI.The cache
Data/Resources/PackageManageris 4.5 GB:Editor2.0 GB (bundled package tarballs),BuiltInPackages1.4 GB,ProjectTemplates1.0 GB. RemovingProjectTemplateswould save about 1 GB per entry, since those tarballs are already compressed. The rest is needed to resolve the test project.pushto main, and a PR miss should not save, or every PR writes another 4.5 GB.~/.config/unityhub/downloads(theunity ci initdefault) would skip only the download. The 2:30–3:30 unpack would remain.The Personal license
ASSIGN_SEATand 3 withSameMachine, so runner machine ids sometimes repeat. The "assigned no seat" case thatci.ymlretries did not occur.unity license statusshowed "none active" afterwards. Neither CLI route can return a Personal seat:unity license return --yes: "Some licenses, such as free Personal licenses, can't be returned."Unity.Licensing.Client --return-ulf: "Ulf license file not found … (1404)". GameCI's log shows the same 1404, and GameCI then falls back to the Editor.Unity -returnlicense -username -passwordworks, which is what GameCI does too.Simpler?
No. The YAML and bash we would own:
ci.yml)Seat ID:check, retries, Editor-returnlicensewith the passwordxvfb-runxvfb-run.-nographicsfails 68 tests with "No graphic device is available to initialize the view"What the CLI gives:
--report-format nunit,junit;--retries N, which reruns failing tests and reports flaky ones separately;--shard N/M(not needed for a 1–2 minute suite);--format githubannotations;--timeout;unity installtakes any version and module from the CDN.What we would maintain ourselves:
xvfb-run;The CLI is still a beta.
install.shis unpinned and fetched from unity.com, and it checks the binary against a checksum from the same CDN.Findings along the way:
unity install-path --setrejects a path that contains..(exit 6, "This path is not valid.").unity ci init --provider githubwrites a workflow with a serial license, 29 apt packages and a downloads cache. Its own comment saysunity license activate --personaldoes not work in CI.Recommendation
Stay on GameCI for the required matrix:
xvfb-run.The speed lever this experiment found is elsewhere. The EditMode tests of 6000.3–6000.6 take 6.5–7.5 minutes inside the GameCI container and 1–1.5 minutes on the bare runner. Two next steps follow from that:
unityci/editorimage (LLVM 15 llvmpipe is the first suspect).docker create+docker cp /opt/unity: a fast Docker Hub pull and no cache budget), then run it on the bare runner withunity test. This was not tested here.Revisit a full switch when the CLI is stable, or when the cache budget can hold the Editors.
🤖 Generated with Claude Code