Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 35 additions & 19 deletions .yamato/_run-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,35 @@
run_all_tests:
name: Run All Package and Project Tests
dependencies:
# Pull in package and validate jobs through the badges job
- .yamato/_triggers.yml#badges_test_trigger
- .yamato/mobile-build-and-test.yml#2021.2_Run_iOS_Player_With_Tests
- .yamato/mobile-build-and-test.yml#2021.2_Run_Android_Player_With_Tests
{% for platform in test_platforms -%}
{% for project in projects -%}
{% for editor in project.test_editors -%}
{% for package in project.packages -%}
- .yamato/package-tests.yml#test_{{ project.name}}_{{ package.name }}_{{ editor }}_{{ platform.name }}
{% endfor -%}
- .yamato/project-tests.yml#test_{{ project.name }}_{{ editor }}_{{ platform.name }}
{% endfor -%}
{% endfor -%}
{% endfor -%}
- .yamato/_run-all.yml#all_project_tests
- .yamato/_run-all.yml#all_package_tests
- .yamato/_run-all.yml#all_singlenode_multiprocess_tests
- .yamato/_run-all.yml#all_project_tests_standalone
- .yamato/_run-all.yml#all_project_tests_mobile
- .yamato/_triggers.yml#dependency_tests_trigger_{{ projects.first.name }}

all_project_tests:
name: Run All Project Tests
dependencies:
# Pull in package and validate jobs through the badges job
- .yamato/_triggers.yml#badges_test_trigger
{% for platform in test_platforms -%}
{% for project in projects -%}
{% for editor in project.test_editors -%}
- .yamato/project-tests.yml#test_{{ projects.first.name }}_{{ editor }}_{{ platform.name }}
- .yamato/project-tests.yml#project_tests_{{ projects.first.name }}_{{ platform.name }}_{{ editor }}
{% endfor -%}
{% endfor -%}
{% endfor -%}

all_package_tests:
name: Run All Package Tests
dependencies:
# Pull in package and validate jobs through the badges job
- .yamato/_triggers.yml#badges_test_trigger
{% for platform in test_platforms -%}
{% for project in projects -%}
{% for editor in project.test_editors -%}
{% for package in project.packages -%}
- .yamato/package-tests.yml#test_{{ project.name}}_{{ package.name }}_{{ editor }}_{{ platform.name }}
- .yamato/package-tests.yml#package_tests_{{ package.name }}_{{ project.name }}_{{ platform.name }}_{{ editor }}
{% endfor -%}
{% endfor -%}
{% endfor -%}
Expand All @@ -49,13 +40,38 @@ all_package_tests:
all_singlenode_multiprocess_tests:
name: Run All Multiprocess Tests - Single Node
dependencies:
# Pull in package and validate jobs through the badges job
{% for platform in test_platforms -%}
{% for project in projects -%}
{% if project.name == "testproject" %}
{% for editor in project.test_editors -%}
{% if editor != "trunk" %}
- .yamato/multiprocess-project-tests.yml#singlenode_multiprocess_test_testproject_{{ editor }}_{{ platform.name }}
- .yamato/multiprocess-project-tests.yml#singlenode_multiprocess_tests_{{ project.name }}_{{ platform.name }}_{{ editor }}
{% endif %}
{% endfor -%}
{% endif %}
{% endfor -%}
{% endfor -%}

all_project_tests_standalone:
name: Run All Project Tests - Standalone
dependencies:
{% for platform in test_platforms -%}
{% for project in projects -%}
{% for editor in project.test_editors -%}
{% for backend in scripting_backends -%}
- .yamato/standalone-project-tests.yml#standalone_tests_{{ project.name }}_{{ backend }}_{{ editor }}_{{ platform.name }}
{% endfor -%}
{% endfor -%}
{% endfor -%}
{% endfor -%}

all_project_tests_mobile:
name: Run All Project Tests - Mobile
dependencies:
{% for project in projects -%}
{% for editor in project.test_editors -%}
- .yamato/mobile-project-tests.yml#run_tests_{{ project.name }}_android_{{ editor }}
- .yamato/mobile-project-tests.yml#run_tests_{{ project.name }}_iOS_{{ editor }}
{% endfor -%}
{% endfor -%}

41 changes: 34 additions & 7 deletions .yamato/_triggers.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% metadata_file .yamato/project.metafile %}
---
develop_nightly:
name: "[Nightly] Run All Tests"
name: "\U0001F319 [Nightly] Run All Tests"
triggers:
recurring:
- branch: develop
Expand All @@ -14,7 +14,7 @@ develop_nightly:
{% endfor -%}

multiprocess_nightly:
name: "[Nightly] Run Multiprocess Tests"
name: "\U0001F319 [Nightly] Run Multiprocess Tests"
triggers:
recurring:
- branch: develop
Expand All @@ -27,7 +27,7 @@ multiprocess_nightly:
# branch is created or updated. Currently only netcode package tests are
# enabled, since the others are missing test coverage and will fail CI.
pull_request_trigger:
name: Pull Request Trigger (master, develop, & release branches)
name: Pull Request Trigger (master, develop, & release branches)
dependencies:
- .yamato/project-standards.yml#standards_{{ projects.first.name }}
{% for project in projects -%}
Expand All @@ -38,9 +38,9 @@ pull_request_trigger:
{% endfor -%}
{% for platform in test_platforms -%}
{% for package in project.packages -%}
- .yamato/package-tests.yml#test_{{ project.name }}_{{ package.name }}_{{ project.test_editors.first }}_{{ platform.name }}
- .yamato/package-tests.yml#package_tests_{{ package.name }}_{{ project.name }}_{{ platform.name }}_{{ project.test_editors.first }}
{% endfor -%}
- .yamato/project-tests.yml#test_{{ project.name }}_{{ project.test_editors.first }}_{{ platform.name }}
- .yamato/project-tests.yml#project_tests_{{ project.name }}_{{ platform.name }}_{{ project.test_editors.first }}
{% endfor -%}
{% endfor -%}
triggers:
Expand All @@ -55,7 +55,7 @@ pull_request_trigger:
# Currently, we need to have a trigger to updated badges
# Only package badges currently exist
badges_test_trigger:
name: Badges Tests Trigger
name: Badges Tests Trigger
agent:
type: Unity::VM
image: package-ci/ubuntu:stable
Expand All @@ -78,8 +78,35 @@ badges_test_trigger:
{% endif -%}
{% for editor in project.test_editors -%}
{% for platform in test_platforms -%}
- .yamato/package-tests.yml#test_{{ project.name }}_{{ package.name }}_{{ editor }}_{{ platform.name }}
- .yamato/package-tests.yml#package_tests_{{ package.name }}_{{ project.name }}_{{ platform.name }}_{{ editor }}
{% endfor -%}
{% endfor -%}
{% endfor -%}
{% endfor -%}

dependency_tests_trigger_{{ projects.first.name }}:
name: ⚡ Dependency Tests Trigger - {{ projects.first.name }}
agent:
type: Unity::VM
image: package-ci/ubuntu:stable
flavor: b1.small
commands:
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- upm-ci project izon -d --project-path {{ projects.first.path }}
artifacts:
logs:
paths:
- "upm-ci~/test-results/**/*"
triggers:
recurring:
- branch: develop
frequency: daily
rerun: always
dependencies:
{% for package in projects.first.packages -%}
{% for editor in projects.first.test_editors -%}
{% for platform in test_platforms -%}
- .yamato/project-updated-dependencies-test.yml#dependency_tests_{{ projects.first.name }}_{{ package.name }}_{{ platform.name }}_{{ editor }}
{% endfor -%}
{% endfor -%}
{% endfor -%}
4 changes: 2 additions & 2 deletions .yamato/code-coverage.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{% metadata_file .yamato/project.metafile %}
---
{% for project in projects -%}
code_coverage_win_{{ project.name }}:
name: Code Coverage Report - Windows - {{ project.name }}
code_coverage_{{ project.name }}_win_trunk:
name: Code Coverage Report - {{ project.name }} - [win, trunk]
agent:
type: Unity::VM
image: package-ci/win10:stable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
2021.2_Build_Android_player:
name: 2021.2 Build Android player
{% metadata_file .yamato/project.metafile %}
---
{% for project in projects -%}
{% for editor in project.test_editors -%}
build_tests_{{ project.name }}_android_{{ editor }}:
name: Build Tests - {{ project.name }} - [android, {{ editor }}]
agent:
type: Unity::VM
image: desktop/android-execution-r19:v0.1.1-860408
Expand All @@ -8,7 +12,7 @@
- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
- curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr.bat --output utr.bat
- python .yamato/disable-burst-if-requested.py --project-path testproject --platform Android
- unity-downloader-cli -u 2021.2 -c editor -c Android -w --fast
- unity-downloader-cli -u {{ editor }} -c editor -c Android -w --fast
- |
set UTR_VERSION=0.12.0
utr.bat --artifacts_path=artifacts --timeout=1800 --testproject=testproject --editor-location=.Editor --suite=playmode --platform=android --build-only --player-save-path=build/players --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --testfilter=Unity.Netcode.RuntimeTests
Expand All @@ -28,20 +32,31 @@
variables:
CI: true
ENABLE_BURST_COMPILATION: False
{% endfor -%}
{% endfor -%}

2021.2_Build_iOS_player:
name: 2021.2 Build iOS player
{% for project in projects -%}
{% for editor in project.test_editors -%}
run_tests_{{ project.name }}_android_{{ editor }}:
name: Run Tests {{ project.name }} - [android, {{ editor }}]
agent:
type: Unity::VM::osx
image: mobile/macos-10.15-testing:stable
flavor: b1.large
type: Unity::mobile::shield
image: mobile/android-execution-r19:stable
flavor: b1.medium
# Skip repository cloning
skip_checkout: true
# Set a dependency on the build job
dependencies:
- .yamato/mobile-project-tests.yml#build_tests_{{ project.name }}_android_{{ editor }}
commands:
- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
- unity-downloader-cli -u 2021.2 -c editor -c iOS -w --fast
- curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr
- chmod +x ./utr
- export UTR_VERSION=0.12.0
- ./utr --artifacts_path=artifacts --timeout=1800 --testproject=testproject --editor-location=.Editor --suite=playmode --platform=iOS --build-only --player-save-path=build/players --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --testfilter=Unity.Netcode.RuntimeTests
- curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr.bat --output utr.bat
- |
set ANDROID_DEVICE_CONNECTION=%BOKKEN_DEVICE_IP%
start %ANDROID_SDK_ROOT%\platform-tools\adb.exe connect %BOKKEN_DEVICE_IP%
start %ANDROID_SDK_ROOT%\platform-tools\adb.exe devices
set UTR_VERSION=0.12.0
./utr --artifacts_path=artifacts --testproject=testproject --editor-location=.Editor --reruncount=2 --suite=playmode --platform=android --player-connection-ip=%BOKKEN_HOST_IP% --player-load-path=build/players --testfilter=Unity.Netcode.RuntimeTests
# Set uploadable artifact paths
artifacts:
logs:
paths:
Expand All @@ -55,26 +70,25 @@
- build/test-results/**
- artifacts/**
- build/players/**
{% endfor -%}
{% endfor -%}


2021.2_Run_iOS_Player_With_Tests:
name: 2021.2 Run iOS player with tests
{% for project in projects -%}
{% for editor in project.test_editors -%}
build_tests_{{ project.name }}_iOS_{{ editor }}:
name: Build Tests - {{ project.name }} - [iOS, {{ editor }}]
agent:
type: Unity::mobile::iPhone
model: SE
image: mobile/macos-10.15-testing:stable
flavor: b1.medium
# Set a dependency on the build job
dependencies:
- .yamato/mobile-build-and-test.yml#2021.2_Build_iOS_player
type: Unity::VM::osx
image: mobile/macos-10.15-testing:stable
flavor: b1.large
commands:
# Download standalone UnityTestRunner
- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
- unity-downloader-cli -u {{ editor }} -c editor -c iOS -w --fast
- curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr
# Give UTR execution permissions
- chmod +x ./utr
# Run the test build on the device
- export UTR_VERSION=0.12.0
- ./utr -artifacts_path=artifacts --testproject=testproject --editor-location=.Editor --reruncount=2 --suite=playmode --platform=iOS --player-load-path=build/players --testfilter=Unity.Netcode.RuntimeTests
- ./utr --artifacts_path=artifacts --timeout=1800 --testproject=testproject --editor-location=.Editor --suite=playmode --platform=iOS --build-only --player-save-path=build/players --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --testfilter=Unity.Netcode.RuntimeTests
artifacts:
logs:
paths:
Expand All @@ -88,27 +102,30 @@
- build/test-results/**
- artifacts/**
- build/players/**

2021.2_Run_Android_Player_With_Tests:
name: 2021.2 Run Android player with tests
{% endfor -%}
{% endfor -%}


{% for project in projects -%}
{% for editor in project.test_editors -%}
run_tests_{{ project.name }}_iOS_{{ editor }}:
name: Run Tests {{ project.name }} - [iOS, {{ editor }}]
agent:
type: Unity::mobile::shield
image: mobile/android-execution-r19:stable
type: Unity::mobile::iPhone
model: SE
image: mobile/macos-10.15-testing:stable
flavor: b1.medium
# Skip repository cloning
skip_checkout: true
# Set a dependency on the build job
dependencies:
- .yamato/mobile-build-and-test.yml#2021.2_Build_Android_player
- .yamato/mobile-project-tests.yml#build_tests_{{ project.name }}_iOS_{{ editor }}
commands:
- curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr.bat --output utr.bat
- |
set ANDROID_DEVICE_CONNECTION=%BOKKEN_DEVICE_IP%
start %ANDROID_SDK_ROOT%\platform-tools\adb.exe connect %BOKKEN_DEVICE_IP%
start %ANDROID_SDK_ROOT%\platform-tools\adb.exe devices
set UTR_VERSION=0.12.0
./utr --artifacts_path=artifacts --testproject=testproject --editor-location=.Editor --reruncount=2 --suite=playmode --platform=android --player-connection-ip=%BOKKEN_HOST_IP% --player-load-path=build/players --testfilter=Unity.Netcode.RuntimeTests
# Set uploadable artifact paths
# Download standalone UnityTestRunner
- curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr
# Give UTR execution permissions
- chmod +x ./utr
# Run the test build on the device
- export UTR_VERSION=0.12.0
- ./utr -artifacts_path=artifacts --testproject=testproject --editor-location=.Editor --reruncount=2 --suite=playmode --platform=iOS --player-load-path=build/players --testfilter=Unity.Netcode.RuntimeTests
artifacts:
logs:
paths:
Expand All @@ -122,3 +139,5 @@
- build/test-results/**
- artifacts/**
- build/players/**
{% endfor -%}
{% endfor -%}
4 changes: 2 additions & 2 deletions .yamato/multiprocess-project-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
{% if project.name == "testproject" %}
{% for editor in project.test_editors -%}
{% for platform in test_platforms -%}
singlenode_multiprocess_test_testproject_{{ editor }}_{{ platform.name }}:
name : Multiprocess Tests - {{ editor }} on {{ platform.name }}
singlenode_multiprocess_tests_{{ project.name }}_{{ platform.name }}_{{ editor }}:
name : Multiprocess Tests - {{ project.name }} - [{{ platform.name }}, {{ editor }}]
agent:
type: {{ platform.type }}
image: {{ platform.image }}
Expand Down
4 changes: 2 additions & 2 deletions .yamato/package-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
{% for package in project.packages -%}
{% for editor in project.test_editors -%}
{% for platform in test_platforms -%}
test_{{project.name}}_{{ package.name }}_{{ editor }}_{{ platform.name }}:
name : {{ project.name }} - {{ package.name }} package tests - {{ editor }} on {{ platform.name }}
package_tests_{{ package.name }}_{{ project.name }}_{{ platform.name }}_{{ editor }}:
name : Package Tests - {{ package.name }} for {{ project.name }} - [{{ platform.name }}, {{ editor }}]
agent:
type: {{ platform.type }}
image: {{ platform.image }}
Expand Down
Loading