|
| 1 | +{% metadata_file .yamato/package.metafile -%} |
| 2 | +--- |
| 3 | +{% for editor in player_test_editors -%} |
| 4 | +{% for platform in player_test_platforms -%} |
| 5 | +{% if platform.build -%} |
| 6 | +{% assign agent = agents[platform.build] -%} |
| 7 | +{% if agent.os == "win" -%}{% assign os = os_variables.win -%}{% else -%}{% assign os = os_variables.unix -%}{% endif -%} |
| 8 | +build_{{ platform.name }}_{{ editor.version }}: |
| 9 | + name : Build {{ editor.version }} {{ platform.name }} Player |
| 10 | + agent: |
| 11 | + type: {{ agent.type }} |
| 12 | + image: {{ agent.image }} |
| 13 | + flavor: {{ agent.flavor}} |
| 14 | + source: |
| 15 | + skip_checkout: true |
| 16 | + commands: |
| 17 | + - | |
| 18 | + mkdir Packages |
| 19 | + pushd Packages |
| 20 | + git clone {{ os.git_url }} --no-checkout gltfast |
| 21 | + cd gltfast |
| 22 | + git fetch origin {{ os.git_revision }} |
| 23 | + git checkout -f --detach {{ os.git_revision }} |
| 24 | + popd |
| 25 | +
|
| 26 | + - mkdir Assets |
| 27 | +{% for asset_set in asset_sets -%} |
| 28 | + - | |
| 29 | + pushd Assets |
| 30 | + git clone {{ asset_set.git_uri }} --no-checkout {{ asset_set.name }} |
| 31 | + cd {{ asset_set.name }} |
| 32 | + git fetch origin {{ asset_set.git_revision }} |
| 33 | + git checkout -f --detach {{ asset_set.git_revision }} |
| 34 | + popd |
| 35 | +{% endfor -%} |
| 36 | + |
| 37 | + - npm install upm-ci-utils@stable -g --registry {{ registry.npm }} |
| 38 | + - | |
| 39 | +{% if platform.windows_host -%} |
| 40 | + set GLTF_TEST_ASSET_DIR={{ os.yamato_source_dir }}\Assets |
| 41 | +{% else -%} |
| 42 | + export GLTF_TEST_ASSET_DIR="{{ os.yamato_source_dir }}/Assets" |
| 43 | +{% endif -%} |
| 44 | + upm-ci package test -u {{ editor.version }} --platform {{ platform.id }} {% if platform.upm_ci_params %}{{ platform.upm_ci_params }}{% endif %} --package-path Packages/gltfast --extra-create-project-arg=-upmNoDefaultPackages --player-build-path upm-ci~/player/{{ platform.id }} --build-only |
| 45 | + artifacts: |
| 46 | + logs: |
| 47 | + paths: |
| 48 | + - "**/*.log" |
| 49 | + player: |
| 50 | + paths: |
| 51 | + - "upm-ci~/player/{{ platform.id }}/**" |
| 52 | + test-results: |
| 53 | + paths: |
| 54 | + - "**/test-results/**" |
| 55 | + dependencies: |
| 56 | + - .yamato/package-pack.yml#pack |
| 57 | +{% endif -%} |
| 58 | + |
| 59 | +{% if platform.run -%} |
| 60 | +{% assign agent = agents[platform.run] -%} |
| 61 | +{% if agent.os == "win" -%}{% assign os = os_variables.win -%}{% else -%}{% assign os = os_variables.unix -%}{% endif -%} |
| 62 | +run_{{ platform.name }}_{{ editor.version }}: |
| 63 | + name : Run {{ editor.version }} {{ platform.name }} Player Tests |
| 64 | + agent: |
| 65 | + type: {{ agent.type }} |
| 66 | + image: {{ agent.image }} |
| 67 | + flavor: {{ agent.flavor}} |
| 68 | + source: |
| 69 | + skip_checkout: true |
| 70 | + commands: |
| 71 | + - | |
| 72 | + mkdir Packages |
| 73 | + pushd Packages |
| 74 | + git clone {{ os.git_url }} --no-checkout gltfast |
| 75 | + cd gltfast |
| 76 | + git fetch origin {{ os.git_revision }} |
| 77 | + git checkout -f --detach {{ os.git_revision }} |
| 78 | + popd |
| 79 | +
|
| 80 | + - mkdir Assets |
| 81 | +{% for asset_set in asset_sets -%} |
| 82 | + - | |
| 83 | + pushd Assets |
| 84 | + git clone {{ asset_set.git_uri }} --no-checkout {{ asset_set.name }} |
| 85 | + cd {{ asset_set.name }} |
| 86 | + git fetch origin {{ asset_set.git_revision }} |
| 87 | + git checkout -f --detach {{ asset_set.git_revision }} |
| 88 | + popd |
| 89 | +{% endfor -%} |
| 90 | + - npm install upm-ci-utils@stable -g --registry {{ registry.npm }} |
| 91 | + - | |
| 92 | +{% if platform.name == "win" -%} |
| 93 | + set GLTF_TEST_ASSET_DIR={{ os.yamato_source_dir }}\Assets |
| 94 | +{% else -%} |
| 95 | + export GLTF_TEST_ASSET_DIR="{{ os.yamato_source_dir }}/Assets" |
| 96 | +{% endif -%} |
| 97 | + upm-ci package test -u {{ editor.version }} --platform {{ platform.id }} --player-build-path upm-ci~/player/{{ platform.id }} --package-path Packages/gltfast --extra-create-project-arg=-upmNoDefaultPackages |
| 98 | + artifacts: |
| 99 | + logs: |
| 100 | + paths: |
| 101 | + - "**/*.log" |
| 102 | + test-results: |
| 103 | + paths: |
| 104 | + - "**/test-results/**" |
| 105 | + dependencies: |
| 106 | + - .yamato/package-pack.yml#pack |
| 107 | + - .yamato/package-player-test.yml#build_{{ platform.name }}_{{ editor.version }} |
| 108 | +{% endif -%} |
| 109 | + |
| 110 | +{% if platform.build_and_run -%} |
| 111 | +{% assign agent = agents[platform.build_and_run] -%} |
| 112 | +{% if agent.os == "win" -%}{% assign os = os_variables.win -%}{% else -%}{% assign os = os_variables.unix -%}{% endif -%} |
| 113 | +build_and_run_{{ platform.name }}_{{ editor.version }}: |
| 114 | + name : Build and run {{ editor.version }} {{ platform.name }} Player Tests |
| 115 | + agent: |
| 116 | + type: {{ agent.type }} |
| 117 | + image: {{ agent.image }} |
| 118 | + flavor: {{ agent.flavor}} |
| 119 | + source: |
| 120 | + skip_checkout: true |
| 121 | + commands: |
| 122 | + - | |
| 123 | + mkdir Packages |
| 124 | + pushd Packages |
| 125 | + git clone {{ os.git_url }} --no-checkout gltfast |
| 126 | + cd gltfast |
| 127 | + git fetch origin {{ os.git_revision }} |
| 128 | + git checkout -f --detach {{ os.git_revision }} |
| 129 | + popd |
| 130 | +
|
| 131 | + - mkdir Assets |
| 132 | +{% for asset_set in asset_sets -%} |
| 133 | + - | |
| 134 | + pushd Assets |
| 135 | + git clone {{ asset_set.git_uri }} --no-checkout {{ asset_set.name }} |
| 136 | + cd {{ asset_set.name }} |
| 137 | + git fetch origin {{ asset_set.git_revision }} |
| 138 | + git checkout -f --detach {{ asset_set.git_revision }} |
| 139 | + popd |
| 140 | +{% endfor -%} |
| 141 | + |
| 142 | + - npm install upm-ci-utils@stable -g --registry {{ registry.npm }} |
| 143 | + - | |
| 144 | +{% if platform.name == "win" -%} |
| 145 | + set GLTF_TEST_ASSET_DIR={{ os.yamato_source_dir }}\Assets |
| 146 | +{% else -%} |
| 147 | + export GLTF_TEST_ASSET_DIR="{{ os.yamato_source_dir }}/Assets" |
| 148 | +{% endif -%} |
| 149 | + upm-ci package test -u {{ editor.version }} --platform {{ platform.id }} --package-path Packages/gltfast --extra-create-project-arg=-upmNoDefaultPackages |
| 150 | + artifacts: |
| 151 | + logs: |
| 152 | + paths: |
| 153 | + - "**/*.log" |
| 154 | + test-results: |
| 155 | + paths: |
| 156 | + - "**/test-results/**" |
| 157 | + dependencies: |
| 158 | + - .yamato/package-pack.yml#pack |
| 159 | +{% endif -%} |
| 160 | +{% endfor -%} |
| 161 | +{% endfor -%} |
| 162 | + |
| 163 | +player_test_all: |
| 164 | + name: _Player Tests All |
| 165 | + dependencies: |
| 166 | +{% for editor in player_test_editors -%} |
| 167 | +{% for platform in player_test_platforms -%} |
| 168 | +{% if platform.run -%} |
| 169 | + - .yamato/package-player-test.yml#run_{{ platform.name }}_{{ editor.version }} |
| 170 | +{% elsif platform.build_and_run -%} |
| 171 | + - .yamato/package-player-test.yml#build_and_run_{{ platform.name }}_{{ editor.version }} |
| 172 | +{% endif -%} |
| 173 | +{% endfor -%} |
| 174 | +{% endfor -%} |
| 175 | + |
| 176 | +player_test_pr: |
| 177 | + name: _Player Test subset for PRs |
| 178 | + dependencies: |
| 179 | +{% for platform in player_test_platforms -%} |
| 180 | +{% assign editor_index = forloop.index0 | modulo: player_test_editors.size -%} |
| 181 | +{% assign editor = player_test_editors[editor_index] -%} |
| 182 | +{% if platform.run -%} |
| 183 | + - .yamato/package-player-test.yml#run_{{ platform.name }}_{{ editor.version }} |
| 184 | +{% elsif platform.build_and_run -%} |
| 185 | + - .yamato/package-player-test.yml#build_and_run_{{ platform.name }}_{{ editor.version }} |
| 186 | +{% endif -%} |
| 187 | +{% endfor -%} |
0 commit comments