|
1 | 1 | {% metadata_file .yamato/config.metadata %} |
2 | 2 | --- |
| 3 | + |
3 | 4 | {% for editor in editors %} |
4 | 5 | {% for platform in platforms %} |
5 | 6 | {{ platform.name }}_{{ editor.version }}: |
|
26 | 27 | {% endfor %} |
27 | 28 | {% endfor %} |
28 | 29 |
|
| 30 | +{% for editor in editors %} |
| 31 | +build_ios_{{ editor.version }}: |
| 32 | + name: Build Tests on {{ editor.version }} on ios |
| 33 | + agent: |
| 34 | + type: Unity::VM::osx |
| 35 | + image: mobile/macos-10.13-testing:stable |
| 36 | + flavor: b1.large |
| 37 | + commands: |
| 38 | + - pip install unity-downloader-cli --extra-index-url https://artifactory.internal.unity3d.com/api/pypi/common-python/simple |
| 39 | + - unity-downloader-cli -c Editor -c iOS -u {{ editor.version }} --fast |
| 40 | + - curl -s https://artifactory.internal.unity3d.com/core-automation/tools/utr-standalone/utr --output utr |
| 41 | + - chmod +x ./utr |
| 42 | + - ./utr --suite=playmode --platform=iOS --editor-location=.Editor --testproject=. --player-save-path=build/players --artifacts_path=build/logs --build-only |
| 43 | + artifacts: |
| 44 | + players: |
| 45 | + paths: |
| 46 | + - "build/players/**" |
| 47 | + logs: |
| 48 | + paths: |
| 49 | + - "build/logs/**" |
| 50 | + |
| 51 | +run_ios_{{ editor.version }}: |
| 52 | + name: Run Tests on {{ editor.version }} on ios |
| 53 | + agent: |
| 54 | + type: Unity::mobile::iPhone |
| 55 | + image: mobile/macos-10.13-testing:stable |
| 56 | + flavor: b1.medium |
| 57 | + skip_checkout: true |
| 58 | + dependencies: |
| 59 | + - .yamato/upm-ci.yml#build_ios_{{ editor.version }} |
| 60 | + commands: |
| 61 | + # Download standalone UnityTestRunner |
| 62 | + - curl -s https://artifactory.internal.unity3d.com/core-automation/tools/utr-standalone/utr --output utr |
| 63 | + # Give UTR execution permissions |
| 64 | + - chmod +x ./utr |
| 65 | + # Run the test build on the device |
| 66 | + - ./utr --suite=playmode --platform=iOS --player-load-path=build/players --artifacts_path=build/test-results |
| 67 | + artifacts: |
| 68 | + logs: |
| 69 | + paths: |
| 70 | + - "build/test-results/**" |
| 71 | + |
| 72 | +{% for backend in scripting_backends %} |
| 73 | +build_android_{{ editor.version }}_{{ backend.name }}: |
| 74 | + name: Build Tests on {{ editor.version }} on android {{ backend.name }} |
| 75 | + agent: |
| 76 | + type: Unity::VM |
| 77 | + image: mobile/android-execution-r19:stable |
| 78 | + flavor: b1.xlarge |
| 79 | + commands: |
| 80 | + - pip install unity-downloader-cli --extra-index-url https://artifactory.internal.unity3d.com/api/pypi/common-python/simple |
| 81 | + - unity-downloader-cli -c Editor -c Android -u {{ editor.version }} --fast |
| 82 | + - curl -s https://artifactory.internal.unity3d.com/core-automation/tools/utr-standalone/utr.bat --output utr.bat |
| 83 | + - ./utr.bat --suite=playmode --platform=Android --editor-location=.Editor --testproject=. --player-save-path=build/players --artifacts_path=build/logs --scripting-backend={{ backend.name }} --build-only |
| 84 | + artifacts: |
| 85 | + players: |
| 86 | + paths: |
| 87 | + - "build/players/**" |
| 88 | + logs: |
| 89 | + paths: |
| 90 | + - "build/logs/**" |
| 91 | +run_android_{{ editor.version }}_{{ backend.name }}: |
| 92 | + name: Run Tests on {{ editor.version }} on android {{ backend.name }} |
| 93 | + agent: |
| 94 | + type: Unity::mobile::shield |
| 95 | + image: mobile/android-execution-r19:stable |
| 96 | + flavor: b1.medium |
| 97 | + |
| 98 | + # Skip repository cloning |
| 99 | + skip_checkout: true |
| 100 | + # Set a dependency on the build job |
| 101 | + dependencies: |
| 102 | + - .yamato/upm-ci.yml#build_android_{{ editor.version }}_{{ backend.name }} |
| 103 | + commands: |
| 104 | + - | |
| 105 | + # Download standalone UnityTestRunner |
| 106 | + curl -s https://artifactory.internal.unity3d.com/core-automation/tools/utr-standalone/utr.bat --output utr.bat |
| 107 | + # Set the IP of the device. In case device gets lost, UTR will try to recconect to ANDROID_DEVICE_CONNECTION |
| 108 | + set ANDROID_DEVICE_CONNECTION=%BOKKEN_DEVICE_IP% |
| 109 | + # Establish an ADB connection with the device |
| 110 | + start %ANDROID_SDK_ROOT%\platform-tools\adb.exe connect %BOKKEN_DEVICE_IP% |
| 111 | + # List the connected devices |
| 112 | + start %ANDROID_SDK_ROOT%\platform-tools\adb.exe devices |
| 113 | + {% if editor.version != "2020.1" or backend.name == "mono" %} ./utr --suite=playmode --platform=android --player-load-path=build/players --artifacts_path=build/test-results {% else %}echo "2020.1 Android Debug il2cpp has a bug Case 1252614" {%endif%} |
| 114 | + after: |
| 115 | + - start %ANDROID_SDK_ROOT%\platform-tools\adb.exe connect %BOKKEN_DEVICE_IP% |
| 116 | + - if not exist build\test-results mkdir build\test-results |
| 117 | + - powershell %ANDROID_SDK_ROOT%\platform-tools\adb.exe logcat -d > build/test-results/device_log.txt |
| 118 | + # Set uploadable artifact paths |
| 119 | + artifacts: |
| 120 | + logs: |
| 121 | + paths: |
| 122 | + - "build/test-results/**" |
| 123 | +{% endfor %} |
| 124 | + |
| 125 | +{% endfor %} |
| 126 | + |
| 127 | + |
29 | 128 | all_tests: |
30 | 129 | name: All Tests |
31 | 130 | dependencies: |
32 | 131 | {% for editor in editors %} |
33 | 132 | {% for platform in platforms %} |
34 | 133 | - .yamato/upm-ci.yml#{{ platform.name }}_{{ editor.version }} |
35 | 134 | {% endfor %} |
| 135 | + {% for backend in scripting_backends %} |
| 136 | + - .yamato/upm-ci.yml#run_android_{{ editor.version }}_{{ backend.name }} |
| 137 | + {% endfor %} |
| 138 | + - .yamato/upm-ci.yml#run_ios_{{ editor.version }} |
36 | 139 | {% endfor %} |
37 | 140 | triggers: |
38 | 141 | cancel_old_ci: true |
|
0 commit comments