Skip to content
Merged
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
18 changes: 15 additions & 3 deletions .yamato/_run-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ run_all_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
- .yamato/mobile-build-and-test.yml#run_{{ projects.first.name }}_tests_{{ mobile_validation_editor }}_iOS
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nightly runs only on mobile_validation_editor which is 2021.3

- .yamato/mobile-build-and-test.yml#run_{{ projects.first.name }}_tests_{{ mobile_validation_editor }}_android
# - .yamato/_run-all.yml#all_project_tests_standalone
{% for platform in test_platforms -%}
{% for project in projects -%}
Expand Down Expand Up @@ -89,4 +89,16 @@ all_project_tests_standalone:
{% endfor -%}
{% endif -%}
{% endfor -%}
{% endfor -%}
{% endfor -%}

all_project_tests_mobile:
name: Run All Project Tests - Mobile
dependencies:
{% for project in projects -%}
{% if project.name == "testproject" -%}
{% for editor in project.test_editors -%}
- .yamato/mobile-build-and-test.yml#run_{{ project.name }}_tests_{{ editor }}_android
- .yamato/mobile-build-and-test.yml#run_{{ project.name }}_tests_{{ editor }}_iOS
{% endfor -%}
{% endif -%}
{% endfor -%}
65 changes: 47 additions & 18 deletions .yamato/mobile-build-and-test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
2021.2_Build_Android_player:
name: 2021.2 Build Android player
{% metadata_file .yamato/project.metafile %}
---

{% for project in projects -%}
{% if project.name == "testproject" -%}
{% for editor in project.test_editors -%}
build_{{ project.name }}_tests_{{ editor }}_android:
name: Build {{ project.name }} Tests - {{ editor }} - Android
agent:
type: Unity::VM
image: desktop/android-execution-r19:v0.1.1-860408
Expand All @@ -8,10 +14,10 @@
- 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
utr.bat --artifacts_path=artifacts --timeout=1800 --testproject={{ project.name }} --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
artifacts:
logs:
paths:
Expand All @@ -28,20 +34,27 @@
variables:
CI: true
ENABLE_BURST_COMPILATION: False
{% endfor -%}
{% endif -%}
{% endfor -%}


2021.2_Build_iOS_player:
name: 2021.2 Build iOS player
{% for project in projects -%}
{% if project.name == "testproject" -%}
{% for editor in project.test_editors -%}
build_{{ project.name }}_tests_{{ editor }}_iOS:
name: Build {{ project.name }} Tests - {{ editor }} - iOS
agent:
type: Unity::VM::osx
image: mobile/macos-10.15-testing:stable
image: mobile/ios-macos-11:stable
flavor: b1.large
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
- 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
- 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
- ./utr --artifacts_path=artifacts --timeout=1800 --testproject={{ project.name }} --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 @@ -55,26 +68,32 @@
- build/test-results/**
- artifacts/**
- build/players/**
{% endfor -%}
{% endif -%}
{% endfor -%}


2021.2_Run_iOS_Player_With_Tests:
name: 2021.2 Run iOS player with tests
{% for project in projects -%}
{% if project.name == "testproject" -%}
{% for editor in project.test_editors -%}
run_{{ project.name }}_tests_{{ editor }}_iOS:
name: Run {{ project.name }} Tests - {{ editor }} - iOS
agent:
type: Unity::mobile::iPhone
model: SE
image: mobile/macos-10.15-testing:stable
image: mobile/ios-macos-11:stable
flavor: b1.medium
# Set a dependency on the build job
dependencies:
- .yamato/mobile-build-and-test.yml#2021.2_Build_iOS_player
- .yamato/mobile-build-and-test.yml#build_{{ project.name }}_tests_{{ editor }}_iOS
commands:
# 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
- ./utr -artifacts_path=artifacts --testproject={{ project.name }} --editor-location=.Editor --reruncount=2 --suite=playmode --platform=iOS --player-load-path=build/players --testfilter=Unity.Netcode.RuntimeTests
artifacts:
logs:
paths:
Expand All @@ -88,9 +107,16 @@
- build/test-results/**
- artifacts/**
- build/players/**
{% endfor -%}
{% endif -%}
{% endfor -%}


2021.2_Run_Android_Player_With_Tests:
name: 2021.2 Run Android player with tests
{% for project in projects -%}
{% if project.name == "testproject" -%}
{% for editor in project.test_editors -%}
run_{{ project.name }}_tests_{{ editor }}_android:
name: Run {{ project.name }} Tests - {{ editor }} - Android
agent:
type: Unity::mobile::shield
image: mobile/android-execution-r19:stable
Expand All @@ -99,15 +125,15 @@
skip_checkout: true
# Set a dependency on the build job
dependencies:
- .yamato/mobile-build-and-test.yml#2021.2_Build_Android_player
- .yamato/mobile-build-and-test.yml#build_{{ project.name }}_tests_{{ editor }}_android
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
./utr --artifacts_path=artifacts --testproject={{ project.name }} --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:
Expand All @@ -122,3 +148,6 @@
- build/test-results/**
- artifacts/**
- build/players/**
{% endfor -%}
{% endif -%}
{% endfor -%}
1 change: 1 addition & 0 deletions .yamato/project.metafile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
validation_editor: 2020.3
mobile_validation_editor: 2021.3

# Platforms that will be tested. The first entry in this array will also
# be used for validation
Expand Down