|
1 | | -{% metadata_file .yamato/project.metafile %} |
2 | | ---- |
3 | | - |
4 | | -# DESCRIPTION-------------------------------------------------------------------------- |
5 | | - # This job validates the NGO 2.x -> 3.x upgrade path for editor scripts. |
6 | | - # NGO 3.0 renamed the editor assembly and its namespaces (Unity.Netcode.Editor -> |
7 | | - # Unity.Netcode.GameObjects.Editor), and every relocated public type carries a [MovedFrom] so that |
8 | | - # Unity's API updater rewrites a 2.x project's editor scripts automatically on upgrade. |
9 | | - # apiupdaterproject holds editor code written against the 2.x API; the job imports it with |
10 | | - # -accept-apiupdate and asserts that every 2.x type reference was rewritten and none survived. |
11 | | - # See apiupdaterproject/README.md. |
12 | | - |
13 | | - |
14 | | -# TECHNICAL CONSIDERATIONS--------------------------------------------------------------- |
15 | | - # apiupdaterproject/Packages/manifest.json references the package by relative path |
16 | | - # (file:../../com.unity.netcode.gameobjects), so the job tests the package as it sits in the repo |
17 | | - # and needs no package-pack dependency. |
18 | | - # The script restores the 2.x sources when it finishes, so the checkout is left unmodified and the |
19 | | - # job is safe to re-run on the same agent. |
20 | | - # --clean purges Library first: the assertion is meaningless against a warm Library that already |
21 | | - # holds rewritten sources from a previous run. |
22 | | - |
23 | | -{% for platform in test_platforms.default -%} |
24 | | -{% for editor in validation_editors.default -%} |
25 | | -api_updater_test_{{ platform.name }}_{{ editor }}: |
26 | | - name : API Updater Test - NGO 2.x editor scripts upgrade [{{ platform.name }}, {{ editor }}] |
27 | | - agent: |
28 | | - type: {{ platform.type }} |
29 | | - image: {{ platform.image }} |
30 | | - flavor: {{ platform.flavor }} |
31 | | - commands: |
32 | | - - unity-downloader-cli --fast --wait -u {{ editor }} -c Editor # Installing basic editor for the import |
33 | | - - python apiupdaterproject/run_upgrade_test.py --unity .Editor --clean |
34 | | - artifacts: |
35 | | - logs: |
36 | | - paths: |
37 | | - - "apiupdaterproject/upgrade-test.log" |
38 | | - dependencies: |
39 | | - - .yamato/_run-all.yml#run_quick_checks # initial checks to perform fast validation of common errors |
40 | | -{% endfor -%} |
41 | | -{% endfor -%} |
| 1 | +{% metadata_file .yamato/project.metafile %} |
| 2 | +--- |
| 3 | + |
| 4 | +# DESCRIPTION-------------------------------------------------------------------------- |
| 5 | + # This job validates the NGO 2.x -> 3.x upgrade path for user scripts. |
| 6 | + # NGO 3.0 renamed the editor assembly and its namespaces (Unity.Netcode.Editor -> |
| 7 | + # Unity.Netcode.GameObjects.Editor) and moved the runtime timing types (Unity.Netcode.NetworkTime |
| 8 | + # and friends -> Unity.Netcode.GameObjects.Timing), and every relocated public type carries a |
| 9 | + # [MovedFrom] so that Unity's API updater rewrites a 2.x project's scripts automatically on upgrade. |
| 10 | + # apiupdaterproject holds code written against the 2.x API; the job imports it with |
| 11 | + # -accept-apiupdate and asserts that every 2.x type reference was rewritten and none survived. |
| 12 | + # See apiupdaterproject/README.md. |
| 13 | + # |
| 14 | + # The second run adds an assembly that occupies Unity.Netcode.NetworkTimeSystem, standing in for |
| 15 | + # any second installed package that declares the same name, and inverts the expectation for that |
| 16 | + # one name: the updater is driven by resolution failure, so a name that still resolves cannot be |
| 17 | + # migrated. NetworkTime and NetworkTickSystem are absent from the stub and must still migrate, so |
| 18 | + # a pass proves both halves. |
| 19 | + # This is the regression test for why the timing types were moved at all. |
| 20 | + |
| 21 | + |
| 22 | +# TECHNICAL CONSIDERATIONS--------------------------------------------------------------- |
| 23 | + # apiupdaterproject/Packages/manifest.json references the package by relative path |
| 24 | + # (file:../../com.unity.netcode.gameobjects), so the job tests the package as it sits in the repo |
| 25 | + # and needs no package-pack dependency. |
| 26 | + # The script restores the 2.x sources when it finishes, so the checkout is left unmodified and the |
| 27 | + # job is safe to re-run on the same agent. |
| 28 | + # --clean purges Library first: the assertion is meaningless against a warm Library that already |
| 29 | + # holds rewritten sources from a previous run. That is also why the two runs are sequential |
| 30 | + # commands rather than one - each needs its own cold import, and the script removes the stub and |
| 31 | + # restores the sources on every exit path, so the second run starts from the same state as the first. |
| 32 | + |
| 33 | +{% for platform in test_platforms.default -%} |
| 34 | +{% for editor in validation_editors.default -%} |
| 35 | +api_updater_test_{{ platform.name }}_{{ editor }}: |
| 36 | + name : API Updater Test - NGO 2.x editor scripts upgrade [{{ platform.name }}, {{ editor }}] |
| 37 | + agent: |
| 38 | + type: {{ platform.type }} |
| 39 | + image: {{ platform.image }} |
| 40 | + flavor: {{ platform.flavor }} |
| 41 | + commands: |
| 42 | + - unity-downloader-cli --fast --wait -u {{ editor }} -c Editor # Installing basic editor for the import |
| 43 | + - python apiupdaterproject/run_upgrade_test.py --unity .Editor --clean |
| 44 | + - python apiupdaterproject/run_upgrade_test.py --unity .Editor --clean --collision-stub |
| 45 | + artifacts: |
| 46 | + logs: |
| 47 | + paths: |
| 48 | + - "apiupdaterproject/upgrade-test.log" |
| 49 | + dependencies: |
| 50 | + - .yamato/_run-all.yml#run_quick_checks # initial checks to perform fast validation of common errors |
| 51 | +{% endfor -%} |
| 52 | +{% endfor -%} |
|
0 commit comments