Run Unity nuget test on GitHub-hosted runners#6396
Open
Grantim wants to merge 15 commits into
Open
Conversation
Replace the self-hosted EC2 Windows runner with a hosted 4-OS matrix (buildalon actions): the Unity Personal license is activated per run from repo secrets and auto-returned, removing the monthly manual Hub re-auth. The test project moves into test_unity/NugetTestProj; windows-latest stays the blocking gate while linux/macos legs cover the previously untested package natives as non-blocking until proven. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
pr-test releases created by full-ci PR runs are drafts, which a contents:read token cannot see -- gh release download failed with "release not found" on all matrix legs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The job now fans out to a windows/linux/macos matrix, not only Windows. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Replace credential-based activation (buildalon/activate-unity-license) and the unity-action wrapper with the official Unity CLI: the only CI secret is now the regenerable .ulf license file, and no third-party action sees any secret or the job token (checkout credential persistence disabled). buildalon/unity-setup remains for the cross-OS editor install only. Manual activations are not seat-counted, so the matrix now runs all legs in parallel. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Latest 6.0 LTS at the time of migration; the editor version installed in CI comes from this file. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Unity removed personal-license activation from the manual (.ulf) web flow, so activate with Unity.Licensing.Client (bundled with the editor) using account credentials instead: --activate-ulf --include-personal on job start, --return-ulf when the job ends. Credentials stay within this first-party step. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
On a fresh runner the first editor session both compiles the NuGetForUnity UPM package and imports the restored native plugins; that import runs before the NuGetForUnity asset postprocessor exists, so the plugins keep the restorer's placeholder settings (all platforms disabled) and every P/Invoke fails with DllNotFoundException (reproduced locally). Run a throwaway editor session first and restore afterwards, so natives are imported with the postprocessor active. The self-hosted machine never hit this because its Library persisted between runs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Replace the template-derived project (URP and 2D leftovers, scene-driven test) with a minimal one: 37 files / ~130KB instead of 60 / 4MB. The playmode test now builds a 30000-vertex sphere and decimates it through the nuget package, so the native library must load and compute; previously the native call only constructed a settings object from a scene script. Verified locally with Unity 6000.0.79f1 against MeshLib 3.1.3.297 from nuget.org. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Reusable workflows do not receive repository secrets unless the caller passes them; without secrets: inherit the license activation saw empty UNITY_USERNAME / UNITY_PASSWORD. The previous EC2 version never needed inherited secrets (AWS OIDC + github.token only), which is why this was not visible before. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Two independent macOS-only issues from the first hosted run: - macOS runners ship dotnet without a registered install location, so the NuGetForUnity.Cli tool host failed with '.NET location: Not found'; actions/setup-dotnet registers the runtime. - NuGetForUnity's default native runtime configuration leaves editorOperatingSystem empty for osx-arm64, so its natives are never enabled for the Apple Silicon editor; fill in the editor OS/CPU for both osx entries so each dylib set is enabled exactly for its editor architecture. windows and ubuntu legs passed in run 29108517692. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The only conflict was unity-nuget-test.yml, where master bumped the aws-actions pin that this branch removes entirely; resolved with the branch version. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Job logs share the artifact retention period, so a parsed results.xml summary in the console (plus an error annotation per failed test) replaces the artifact upload; the full editor log was already printed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Fedr
approved these changes
Jul 13, 2026
The editor download is the only step with a live external dependency; a hung CDN download should fail the step quickly and visibly rather than consume the 60-minute job budget. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Track only what the editor cannot regenerate: ProjectSettings shrinks to the version pin and the NuGetForUnity native runtime map (the prime session recreates the rest with defaults, now gitignored), the UPM manifest shrinks to its two real dependencies with the lock keeping the NuGetForUnity commit pin. The test logs begin/end markers and the mesh numbers it produces, which the results printer surfaces in CI output. Workflow comments condensed. Validated with a local cold-boot cycle (prime, restore, playmode test: passed). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Nothing in the project is referenced by GUID, so the metas Unity regenerates on import are equivalent to the committed ones; validated with a meta-free local cold-boot cycle. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Fedr
approved these changes
Jul 13, 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.
Replaces the self-hosted EC2 Windows Unity runner with a GitHub-hosted matrix and moves the Unity test project into the repo (test_unity/NugetTestProj).
Test plan: this PR carries build-release-windows + upload-binaries (+ skip-image-rebuild), so unity-nuget-test runs the new workflow against the pr-test draft release produced by this run. The windows leg must pass; linux/macos legs are informative.
Generated with Claude Code