|
37 | 37 | - move /Y .\Packages\com.unity.inputsystem\Samples.meta .\Assets
|
38 | 38 | # Now run our full test suite that sits in Assets/Tests by running UTR on our project.
|
39 | 39 | - ./utr --testproject . --timeout=1200 --editor-location=.Editor --artifacts_path=upm-ci~/test-results/isolation-com.unity.inputsystem.tests --suite=playmode {% if platform.name == "win" %} --suite=editor {% endif %} {% if category.name == "performance" %} --category=Performance {% else %} --category=!Performance {% endif %} --api-profile=NET_4_6 {% if platform.runtime %} --platform {{ platform.runtime }} {% endif %} {% if platform.scripting-backend %} --scripting-backend {{ platform.scripting-backend }} {% endif %} {% if category.name == "performance" %} --report-performance-data --performance-project-id=InputSystem {% endif %} {% if platform.name == "win" and category.name == "functional" %}--enable-code-coverage --coverage-options="generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem" --coverage-results-path={{ yamato_source_dir_win }}/upm-ci~/test-results/CodeCoverage/Project --coverage-upload-options="reportsDir:upm-ci~/test-results/CodeCoverage/Project;name:{{platform.name}}_{{editor.version}}_project;flags:{{platform.name}}_{{editor.version}}_project" {% endif %}
|
40 |
| - # Merge all the code coverage results into one report. |
41 | 40 | {% if platform.name == "win" and category.name == "functional" %}
|
42 |
| - - '{{ yamato_source_dir_win }}/.Editor/Unity.exe -projectPath {{ yamato_source_dir_win }} -batchmode -debugCodeOptimization -enableCodeCoverage -coverageResultsPath {{ yamato_source_dir_win }}/upm-ci~/test-results/CodeCoverage/ -coverageOptions "generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem;sourcePaths:{{ yamato_source_dir_win }}/Packages/com.unity.inputsystem/" -quit' |
43 |
| - # Delete the Package and Project reports, only keep the final merged one to keep Aritfacts.zip smaller |
| 41 | + # Delete the Package and Project reports & raw coverage data, to keep Artifacts.zip smaller |
44 | 42 | - rmdir /s/q "{{ yamato_source_dir_win }}/upm-ci~/test-results/CodeCoverage/Package"
|
45 | 43 | - rmdir /s/q "{{ yamato_source_dir_win }}/upm-ci~/test-results/CodeCoverage/Project"
|
46 | 44 | {% endif %}
|
|
51 | 49 | UTR_Output.zip:
|
52 | 50 | paths:
|
53 | 51 | - "upm-ci~/test-results/**/*"
|
| 52 | +{% if platform.name == "win" and category.name == "functional" %} |
| 53 | + triggers: |
| 54 | + expression: push.branch eq "develop" |
| 55 | + cancel_old_ci: true |
| 56 | +{% endif %} |
54 | 57 | {% endfor %} # test_category
|
55 | 58 | {% endfor %} # platforms_win
|
56 | 59 |
|
|
76 | 79 | - mv ./Assets/Samples.meta ./Packages/com.unity.inputsystem
|
77 | 80 | - upm-ci package pack --package-path ./Packages/com.unity.inputsystem/
|
78 | 81 | # Run upm-ci verification tests as well as tests contained in the package.
|
79 |
| - - upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u $EDITOR_VERSION {% if category.name == "functional" and platform.name == "mac" or platform.name == "linux" %} --enable-code-coverage --code-coverage-options "generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem;pathReplacePatterns:@*,,Library/PackageCache,Packages" --extra-utr-arg="--coverage-results-path={{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/Package" {% endif %} |
| 82 | + - upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u $EDITOR_VERSION {% if category.name == "functional" and platform.name == "mac" or platform.name == "linux" %} --enable-code-coverage --code-coverage-options "generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem;pathReplacePatterns:@*,,Library/PackageCache,Packages" --extra-utr-arg="--coverage-results-path={{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/Package --coverage-upload-options=\"reportsDir:upm-ci~/test-results/CodeCoverage/Package;name:{{platform.name}}_{{editor.version}}_pkg;flags:{{platform.name}}_{{editor.version}}_pkg\"" {% endif %} |
80 | 83 | {% if platform.installscript %}
|
81 | 84 | - {{ unity_downloader_install }}
|
82 | 85 | - {{ platform.installscript }} $EDITOR_VERSION
|
|
86 | 89 | - mv ./Packages/com.unity.inputsystem/Samples ./Assets
|
87 | 90 | - mv ./Packages/com.unity.inputsystem/Samples.meta ./Assets
|
88 | 91 | # Now run our full test suite that sits in Assets/Tests by running UTR on our project.
|
89 |
| - - ./utr --testproject . --timeout=1200 --editor-location=.Editor --artifacts_path=upm-ci~/test-results/isolation-com.unity.inputsystem.tests --suite=playmode {% if platform.name == "mac" or platform.name == "linux"%} --suite=editor {% endif %} {% if category.name == "performance" %} --category=Performance {% else %} --category=!Performance {% endif %} --api-profile=NET_4_6 {% if platform.runtime %} --platform {{ platform.runtime }} {% endif %} {% if platform.scripting-backend %} --scripting-backend {{ platform.scripting-backend }} {% endif %} {% if category.name == "performance" %} --report-performance-data --performance-project-id=InputSystem {% endif %} {% if category.name == "functional" and platform.name == "mac" or platform.name == "linux" %} --enable-code-coverage --coverage-options="generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem" --coverage-results-path={{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/Project {% endif %} |
90 |
| - # Merge all the code coverage results into one report. |
91 |
| - {% if platform.name == "mac" and category.name == "functional" %} |
92 |
| - - '{{ yamato_source_dir_nix }}/.Editor/Unity.app/Contents/MacOS/Unity -projectPath {{ yamato_source_dir_nix }} -batchmode -debugCodeOptimization -enableCodeCoverage -coverageResultsPath {{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/ -coverageOptions "generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem;sourcePaths:{{ yamato_source_dir_nix }}/Packages/com.unity.inputsystem/" -quit' |
93 |
| - {% endif %} |
94 |
| - {% if platform.name == "linux" and category.name == "functional" %} |
95 |
| - - '{{ yamato_source_dir_nix }}/.Editor/Unity -projectPath {{ yamato_source_dir_nix }} -batchmode -debugCodeOptimization -enableCodeCoverage -coverageResultsPath {{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/ -coverageOptions "generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem;sourcePaths:{{ yamato_source_dir_nix }}/Packages/com.unity.inputsystem/" -quit' |
96 |
| - {% endif %} |
97 |
| - # Delete the Package and Project reports, only keep the final merged one to keep Aritfacts.zip smaller |
| 92 | + - ./utr --testproject . --timeout=1200 --editor-location=.Editor --artifacts_path=upm-ci~/test-results/isolation-com.unity.inputsystem.tests --suite=playmode {% if platform.name == "mac" or platform.name == "linux"%} --suite=editor {% endif %} {% if category.name == "performance" %} --category=Performance {% else %} --category=!Performance {% endif %} --api-profile=NET_4_6 {% if platform.runtime %} --platform {{ platform.runtime }} {% endif %} {% if platform.scripting-backend %} --scripting-backend {{ platform.scripting-backend }} {% endif %} {% if category.name == "performance" %} --report-performance-data --performance-project-id=InputSystem {% endif %} {% if category.name == "functional" and platform.name == "mac" or platform.name == "linux" %} --enable-code-coverage --coverage-options="generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem" --coverage-results-path={{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/Project --coverage-upload-options="reportsDir:upm-ci~/test-results/CodeCoverage/Project;name:{{platform.name}}_{{editor.version}}_project;flags:{{platform.name}}_{{editor.version}}_project" {% endif %} |
| 93 | + {% if category.name == "functional" and platform.name == "mac" or platform.name == "linux"%} |
| 94 | + # Delete the Package and Project reports & raw coverage data, to keep Artifacts.zip smaller |
98 | 95 | - rm -rf {{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/Package
|
99 |
| - - rm -rf {{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/Project |
| 96 | + - rm -rf {{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/Project |
| 97 | + {% endif %} |
100 | 98 | after:
|
101 | 99 | - {{ instabilities_install_nix }}
|
102 | 100 | - {{ platform.instabilities_run }}
|
103 | 101 | artifacts:
|
104 | 102 | UTR_Output.zip:
|
105 | 103 | paths:
|
106 | 104 | - "upm-ci~/test-results/**/*"
|
| 105 | +{% if category.name == "functional" and platform.name == "mac" or platform.name == "linux"%} |
| 106 | + triggers: |
| 107 | + expression: push.branch eq "develop" |
| 108 | + cancel_old_ci: true |
| 109 | +{% endif %} |
107 | 110 | {% endfor %} # test_category
|
108 | 111 | {% endfor %} # platforms_nix
|
109 | 112 | {% endfor %} # editors
|
|
0 commit comments