Skip to content

Commit 816fea9

Browse files
committed
chore: Small yamato tweaks to try speed up our PR trigger runs
1 parent 06118b8 commit 816fea9

File tree

6 files changed

+33
-36
lines changed

6 files changed

+33
-36
lines changed

.yamato/_triggers.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
# It's important to ensure that all dependencies exist (this can be verified in Yamato) since a modification in parameters may result in a given job not being generated, and thus we will not be able to run such erroneous job.
4545

4646

47-
#-----------------------------------------------------------------------------------
47+
#-----------------------------------------------------------------------------------
4848

4949
# After some experimenting with CI setups we discovered that even though sometimes we don't need CI to run (no reason to run package tests if only Documentation is changed) there are some checks that devs may not realize but changes in seemingly unrelated files will cause their failures
5050
# This trigger was created to ensure that ALL PRs run this minimal check even when we don't need to run full tests
@@ -82,7 +82,7 @@ pr_code_changes_checks:
8282

8383
# Run standalone test. We run it only on Ubuntu since it's the fastest machine, and it was noted that for example distribution on macOS is taking 40m since we switched to Apple Silicon
8484
# Coverage on other standalone machines is present in Nightly job so it's enough to not run all of them for PRs
85-
- .yamato/desktop-standalone-tests.yml#desktop_standalone_test_testproject_win_il2cpp_6000.0
85+
- .yamato/desktop-standalone-tests.yml#desktop_standalone_test_testproject_ubuntu_il2cpp_trunk
8686
- .yamato/cmb-service-standalone-tests.yml#cmb_service_standalone_test_testproject_ubuntu_il2cpp_trunk
8787
triggers:
8888
expression: |-
@@ -104,9 +104,9 @@ pr_code_changes_checks:
104104
"**/*.md"
105105
]
106106
cancel_old_ci: true
107-
108-
109-
107+
108+
109+
110110

111111

112112

.yamato/package-pack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ package_pack_-_ngo_{{ platform.name }}:
2929
agent:
3030
type: {{ platform.type }}
3131
image: {{ platform.image }}
32-
flavor: {{ platform.flavor }}
32+
flavor: {{ platform.smaller_flavor }}
3333
{% if platform.model %}
3434
model: {{ platform.model }} # This is set only in platforms where we want non-default model to use (more information in project.metafile)
3535
{% endif %}

.yamato/package-tests.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,23 @@
55
# This job is responsible for execution of package-specific tests in Unity Editor context
66
# Those tests cover both PlayMode and EditMode tests from package test assemblies
77
# Additionally it combines Package Verification Pipeline (PVP) validation. This ensures that package is compatible with Unity standards
8-
8+
99
# CONFIGURATION STRUCTURE--------------------------------------------------------------
1010
# Jobs are generated using nested loops through:
1111
# 1. For all desktop platforms (Windows, Ubuntu, macOS)
1212
# 2. For all supported Unity Editor versions (for NGOv2.X this means 6000.0+ editors)
13-
13+
1414
# TECHNICAL CONSIDERATIONS---------------------------------------------------------------
1515
# This job runs in Editor context only (no player builds required)
1616
# No scripting backend variations needed (Editor context)
1717
# Architecture variations not applicable (Editor context)
1818
# Requires project packaging as prerequisite (dependency job)
1919
# Uses PVP for package validation. Specifically it looks for supported profiles which we should conform to but takes ./pvpExceptions.json file into consideration where we note our known issues related to PVP checks
20-
20+
2121
# QUALITY CONSIDERATIONS--------------------------------------------------------------------
2222
# To see where this job is included (in trigger job definitions) look into _triggers.yml file
2323
# TODO: we should aim to replace target PVP profile from supported to gold
24-
24+
2525
#------------------------------------------------------------------------------------
2626

2727
{% for platform in test_platforms.desktop -%}
@@ -31,7 +31,7 @@ package_test_-_ngo_{{ editor }}_{{ platform.name }}:
3131
agent:
3232
type: {{ platform.type }}
3333
image: {{ platform.image }}
34-
flavor: {{ platform.flavor }}
34+
flavor: {{ platform.smaller_flavor }}
3535
{% if platform.model %}
3636
model: {{ platform.model }} # This is set only in platforms where we want non-default model to use (more information in project.metafile)
3737
{% endif %}
@@ -40,7 +40,7 @@ package_test_-_ngo_{{ editor }}_{{ platform.name }}:
4040
UNITY_EXT_LOGGING: 1
4141
commands:
4242
- unity-downloader-cli --fast --wait -u {{ editor }} -c Editor {% if platform.name == "mac" %} --arch arm64 {% endif %} # For macOS we use ARM64 models.
43-
43+
4444
# Validate PVP checks for package.
4545
- upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --filter "com.unity.netcode.gameobjects" --results pvp-results
4646
- upm-pvp require {% if platform.name == "win" %}"%XRAY_PROFILE%"{% else %}"$XRAY_PROFILE"{% endif %} --results pvp-results
@@ -57,4 +57,4 @@ package_test_-_ngo_{{ editor }}_{{ platform.name }}:
5757
- .yamato/_run-all.yml#run_quick_checks # initial checks to perform fast validation of common errors
5858
- .yamato/package-pack.yml#package_pack_-_ngo_{{ platform.name }}
5959
{% endfor -%}
60-
{% endfor -%}
60+
{% endfor -%}

.yamato/project-pack.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,20 @@
44
# DESCRIPTION--------------------------------------------------------------------------
55
# This job is responsible for packing a specific project. It generates package artifacts (.tgz) required for testing and publishing, ensuring all dependencies are properly bundled and validated before any test execution.
66
# The job itself doesn't test anything specific but rather it prepares project packages that will be consumed by other pipeline jobs.
7-
7+
88
# CONFIGURATION STRUCTURE--------------------------------------------------------------
99
# Jobs configurations are generated using nested loops through:
1010
# 1. For all projects (testproject, minimalproject, testproject-tools-integration).
1111
# 2. For all desktop platforms (Win, Ubuntu, Mac)
12-
12+
1313
# TECHNICAL CONSIDERATIONS--------------------------------------------------------------------
1414
# Job does not require Unity Editor in order to perform packing.
1515
# In theory, we could just use one platform for packing projects (for example ubuntu) but in order to reduce confusion we are using same platform as the job utilizing project pack as dependency.
16-
16+
1717
# QUALITY CONSIDERATIONS--------------------------------------------------------------------
1818
# To see where this job is included (in trigger job definitions) look into _triggers.yml file
19-
# TODO: Currently upm-ci is being used but in the future it will be replaced by upm-pvp. Additionally this would allow us to run PVP checks on projects
20-
21-
22-
#--------------------------------------------------------------------------------------
19+
20+
#--------------------------------------------------------------------------------------
2321

2422
{% for project in projects.all -%}
2523
{% for platform in test_platforms.desktop -%}
@@ -28,18 +26,17 @@ project_pack_-_{{ project.name }}_{{ platform.name }}:
2826
agent:
2927
type: {{ platform.type }}
3028
image: {{ platform.image }}
31-
flavor: {{ platform.flavor }}
29+
flavor: {{ platform.smaller_flavor }}
3230
{% if platform.model %}
3331
model: {{ platform.model }} # This is set only in platforms where we want non-default model to use (more information in project.metafile)
3432
{% endif %}
3533
commands:
36-
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm # upm-ci is not preinstalled on the image so we need to download it
37-
- upm-ci project pack --project-path {{ project.path }}
34+
- upm-pvp pack --project {{ project.path }} --output upm-ci~/packages
3835
dependencies:
3936
- .yamato/_run-all.yml#run_quick_checks # initial checks to perform fast validation of common errors
4037
artifacts:
4138
packages:
4239
paths:
4340
- "upm-ci~/packages/**/*"
4441
{% endfor -%}
45-
{% endfor -%}
42+
{% endfor -%}

.yamato/project-tests.yml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,23 @@
44
# DESCRIPTION--------------------------------------------------------------------------
55
# This job executes project-specific tests in Unity Editor context
66
# Those tests cover both PlayMode and EditMode tests from project test assemblies
7-
# NGO package tests are NOT being executed within this job (those are handled in separate package test jobs)
8-
7+
# NGO package tests are NOT being executed within this job (those are handled in separate package test jobs) ??
8+
99
# CONFIGURATION STRUCTURE--------------------------------------------------------------
1010
# Jobs configurations are generated using nested loops through:
1111
# 1. For all projects WITH TESTS (filtered by has_tests flag) (testproject, testproject-tools-interation) [For more info look into project.metafile configuration]
1212
# 2. For all desktop platforms (Windows, Ubuntu, macOS)
1313
# 3. For all supported Unity Editor versions (for NGOv2.X this means 6000.0+ editors)
14-
14+
1515
# TECHNICAL CONSIDERATIONS---------------------------------------------------------------
1616
# This job runs in Editor context only (no player builds is required)
1717
# No scripting backend variations needed (Editor context)
1818
# Architecture variations not applicable (Editor context)
1919
# Requires project packaging as prerequisite (dependency job)
20-
20+
2121
# QUALITY CONSIDERATIONS--------------------------------------------------------------------
22-
# TODO: Currently upm-ci is being used but in the future it will be replaced by upm-pvp
2322
# To see where this job is included (in trigger job definitions) look into _triggers.yml file
24-
23+
2524
#------------------------------------------------------------------------------------
2625

2726
{% for project in projects.all -%}
@@ -38,16 +37,13 @@ test_{{ project.name }}_{{ platform.name }}_{{ editor }}:
3837
model: {{ platform.model }} # This is set only in platforms where we want non-default model to use (more information in project.metafile)
3938
{% endif %}
4039
commands:
41-
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm # upm-ci is not preinstalled on the image so we need to download it
4240
- unity-downloader-cli --fast --wait -u {{ editor }} -c Editor {% if platform.name == "mac" %} --arch arm64 {% endif %} # For macOS we use ARM64 models. Installing basic editor for tests execution
43-
- upm-ci project test -u {{ editor }} --project-path {{ project.path }} --type project-tests --extra-utr-arg="--reruncount=1 --clean-library-on-rerun" # project tests execution via upm-ci
41+
- UnifiedTestRunner --testproject={{ project.path }} --suite=editor --suite=playmode --artifacts-path=test-results --editor-location=.Editor --reruncount=1 --clean-library-on-rerun --timeout=1800
4442
artifacts:
4543
logs:
4644
paths:
47-
- "upm-ci~/test-results/**/*"
48-
dependencies:
49-
- .yamato/project-pack.yml#project_pack_-_{{ project.name }}_{{ platform.name }}
45+
- "test-results/**/*"
5046
{% endfor -%}
5147
{% endfor -%}
5248
{% endif -%}
53-
{% endfor -%}
49+
{% endfor -%}

.yamato/project.metafile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
# type --> Specifies the Bokken agent type (e.g., Unity::VM, Unity::VM::osx, Unity::mobile::shield)
1010
# image --> Defines the package-ci Bokken image to use for the environment (e.g., package-ci/ubuntu-22.04:v4). This is basically a device configuration
1111
# flavor --> Determines the VM size/resources (e.g., b1.small, b1.large, m1.mac)
12+
# smaller_flavor --> An override for flavor that determines the VM size/resources for lighter weight jobs that can run on a smaller vm
1213
# standalone --> Specifies the build target platform (e.g., StandaloneLinux64, Android, IOS)
1314
# model --> Defines specific hardware model requirements (e.g., rtx2080, iPhone model 13). Notice that trunk currently (19.08.2025) has 13.0 as minimal iOS version which devices below this are not supporting
1415
# base --> Indicates the base operating system for build operations (e.g., win, mac)
@@ -45,18 +46,21 @@ test_platforms:
4546
type: Unity::VM
4647
image: package-ci/ubuntu-22.04:v4
4748
flavor: b1.large
49+
smaller_flavor: b1.medium
4850
standalone: StandaloneLinux64
4951
model: rtx2080
5052
- name: win
5153
type: Unity::VM
5254
image: package-ci/win10:v4
5355
flavor: b1.large
56+
smaller_flavor: b1.medium
5457
standalone: StandaloneWindows64
5558
model: rtx2080
5659
- name: mac
5760
type: Unity::VM::osx
5861
image: package-ci/macos-13-arm64:v4 # ARM64 to support M1 model (below)
5962
flavor: m1.mac
63+
smaller_flavor: m1.mac # mac doesn't have a smaller vm size. We define it anyway as it simplifies the yaml templating to have it defined.
6064
standalone: StandaloneOSX
6165
model: M1 # The default model (an x64 Intel Mac VM) quite often caused a known issue of doing all the bitflips in packages resulting in failures
6266
# For mobile devices there is a split between the build and run phase so there is a need of splitting specification for both

0 commit comments

Comments
 (0)