Skip to content

Commit

Permalink
Merge branch 'develop' into release/1.X
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanunity committed Jan 15, 2025
2 parents c851869 + 8b51f90 commit d1bf057
Show file tree
Hide file tree
Showing 147 changed files with 18,472 additions and 1,738 deletions.
18 changes: 11 additions & 7 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
### Description

_Please fill this section with a description what the pull request is trying to address._
_Please fill this section with a description what the pull request is trying to address and what changes were made._

### Changes made

_Please write down a short description of what changes were made._

### Testing
### Testing status & QA

_Please describe the testing already done by you and what testing you request/recommend QA to execute. If you used or created any testing project please link them here too for QA._

### Risk
### Overall Product Risks

_Please rate the potential complexity and halo effect from low to high for the reviewers. Note down potential risks to specific Editor branches if any._

- Complexity:
- Halo Effect:

### Comments to reviewers

_Please describe the potential risks of your changes for the reviewers._
_Please describe any additional information such as what to focus on, or historical info for the reviewers._

### Checklist

Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ Packages/com.unity.inputsystem/**/*.api.meta
Packages/com.unity.package-manager-ui/
Packages/com.unity.package-manager-doctools/

Tools/CI/[Bb]in
Tools/CI/[Oo]bj

.Editor
.bin
.download

!Tools/CI/InputSystem.Cookbook.csproj
!Tools/CI/InputSystem-recipes.sln
31 changes: 23 additions & 8 deletions .yamato/config.metadata
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
editors:
- version: 2021.3
- version: 2021.3.45f
- version: 2022.3
disable_tvos_run: true
- version: 6000.0
Expand All @@ -17,50 +17,56 @@ upm_ci_install: npm install -g upm-ci-utils@stable --registry https://artifactor
platforms_win:
- name: win
type: Unity::VM
image: package-ci/win10:default
image: package-ci/win10:v4
flavor: b1.large
- name: win_standalone
type: Unity::VM
image: package-ci/win10:default
image: package-ci/win10:v4
flavor: b1.large
runtime: StandaloneWindows64
- name: win_standalone_il2cpp
type: Unity::VM
image: package-ci/win10:default
image: package-ci/win10:v4
flavor: b1.large
runtime: StandaloneWindows64
scripting-backend: Il2Cpp
installscript: unity-downloader-cli -c editor -c StandaloneSupport-IL2CPP --wait --fast -u
platforms_nix:
- name: mac
type: Unity::VM::osx
image: package-ci/macos-13:default
image: package-ci/macos-13:v4
flavor: m1.mac
instabilities_run: sh ./run_standalone_instability_detection-latest.sh macos 0.5.1 || exit 0
- name: mac_standalone
type: Unity::VM::osx
image: package-ci/macos-13:default
image: package-ci/macos-13:v4
flavor: m1.mac
instabilities_run: sh ./run_standalone_instability_detection-latest.sh macos 0.5.1 || exit 0
runtime: StandaloneOSX
- name: mac_standalone_il2cpp
type: Unity::VM::osx
image: package-ci/macos-13:default
image: package-ci/macos-13:v4
flavor: m1.mac
instabilities_run: sh ./run_standalone_instability_detection-latest.sh macos 0.5.1 || exit 0
runtime: StandaloneOSX
scripting-backend: Il2Cpp
installscript: unity-downloader-cli -c editor -c StandaloneSupport-IL2CPP --wait --fast -u
- name: linux
type: Unity::VM
image: package-ci/ubuntu-20.04:v4.50.0
flavor: b1.large
instabilities_run: sh ./run_standalone_instability_detection-latest.sh ubuntu 0.5.1 || exit 0
- name: linux_standalone
type: Unity::VM
image: package-ci/ubuntu-20.04:v4.50.0
flavor: b1.large
instabilities_run: sh ./run_standalone_instability_detection-latest.sh ubuntu 0.5.1 || exit 0
runtime: StandaloneLinux64
- name: linux_standalone_il2cpp
type: Unity::VM
image: package-ci/ubuntu-20.04:v4.50.0
flavor: b1.large
instabilities_run: sh ./run_standalone_instability_detection-latest.sh ubuntu 0.5.1 || exit 0
runtime: StandaloneLinux64
scripting-backend: Il2Cpp
installscript: unity-downloader-cli -c editor -c StandaloneSupport-IL2CPP --wait --fast -u
Expand All @@ -72,4 +78,13 @@ ios_and_tvos_macos_bokken_image: package-ci/macos-13:v4.50.0

test_category:
- name: performance
- name: all
- name: all

instabilities_install_win: curl -s https://artifactory.prd.it.unity3d.com/artifactory/automation-and-tooling/infrastructure-instability-detection/standalone/setup/run_standalone_instability_detection-latest.bat --output run_standalone_instability_detection-latest.bat --retry 5 || exit 0
instabilities_run_win: run_standalone_instability_detection-latest.bat 0.5.1 || exit 0

instabilities_install_nix: curl -s https://artifactory.prd.it.unity3d.com/artifactory/automation-and-tooling/infrastructure-instability-detection/standalone/setup/run_standalone_instability_detection-latest.sh --output run_standalone_instability_detection-latest.sh --retry 5 || exit 0
instabilities_run_mac: sh ./run_standalone_instability_detection-latest.sh macos 0.5.1 || exit 0

yamato_source_dir_win: "%YAMATO_SOURCE_DIR%"
yamato_source_dir_nix: ${YAMATO_SOURCE_DIR}
2 changes: 2 additions & 0 deletions .yamato/promotion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ promote:
type: Unity::VM
image: package-ci/win10:default
flavor: b1.large
dependencies:
- .yamato/publish-samples.yml#test_sample_projects
variables:
UPMCI_PROMOTION: 1
commands:
Expand Down
83 changes: 70 additions & 13 deletions .yamato/upm-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
type: {{ platform.type }}
image: {{ platform.image }}
flavor: {{ platform.flavor }}
commands:
variables:
EDITOR_VERSION: {{ editor.version }}
commands:
- {{ utr_install_win }}
- {{ upm_ci_install }}
# Get version 2.3.0-preview of doctools package (it currently fails for 3.0.0-preview).
Expand All @@ -23,17 +25,29 @@
- move /Y .\Assets\Samples.meta .\Packages\com.unity.inputsystem
- upm-ci package pack --package-path ./Packages/com.unity.inputsystem/
# Run upm-ci verification tests as well as tests contained in the package.
- upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u {{ editor.version }}
- upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u %EDITOR_VERSION%
{% if platform.name == "win" %} --enable-code-coverage --code-coverage-options "generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem;pathReplacePatterns:@*,,Library/PackageCache,Packages"
--extra-utr-arg="--coverage-results-path={{ yamato_source_dir_win }}/upm-ci~/test-results/CodeCoverage/Package" {% endif %}
{% if platform.installscript %}
- {{ unity_downloader_install }}
- {{ platform.installscript }} {{ editor.version }}
- {{ platform.installscript }} %EDITOR_VERSION%
{% endif %}
# ADBv2 on 2019.4 causes the test runner to not start on initial import when the
# samples are in the package. Move the samples back into the project.
- move /Y .\Packages\com.unity.inputsystem\Samples .\Assets
- move /Y .\Packages\com.unity.inputsystem\Samples.meta .\Assets
# Now run our full test suite that sits in Assets/Tests by running UTR on our project.
- ./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 {% endif %} --api-profile=NET_4_6 {% if platform.runtime %} --platform {{ platform.runtime }} {% endif %} {% if platform.scripting-backend %} --scripting-backend {{ platform.scripting-backend }} {% endif %} --report-performance-data --performance-project-id=InputSystem
- ./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 {% endif %} --api-profile=NET_4_6 {% if platform.runtime %} --platform {{ platform.runtime }} {% endif %} {% if platform.scripting-backend %} --scripting-backend {{ platform.scripting-backend }} {% endif %} --report-performance-data --performance-project-id=InputSystem {% if platform.name == "win" %}--enable-code-coverage --coverage-options="generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem" --coverage-results-path={{ yamato_source_dir_win }}/upm-ci~/test-results/CodeCoverage/Project {% endif %}
# Merge all the code coverage results into one report.
{% if platform.name == "win" %}
- '{{ 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'
#delete the reports from the two runs and only keep the final merged one
- rmdir /s/q "{{ yamato_source_dir_win }}/upm-ci~/test-results/CodeCoverage/Package"
- rmdir /s/q "{{ yamato_source_dir_win }}/upm-ci~/test-results/CodeCoverage/Project"
{% endif %}
after:
- {{ instabilities_install_win }}
- {{ instabilities_run_win }}
artifacts:
UTR_Output.zip:
paths:
Expand All @@ -49,6 +63,8 @@
type: {{ platform.type }}
image: {{ platform.image }}
flavor: {{ platform.flavor }}
variables:
EDITOR_VERSION: {{ editor.version }}
commands:
- {{ utr_install_nix }}
- {{ upm_ci_install }}
Expand All @@ -61,17 +77,29 @@
- mv ./Assets/Samples.meta ./Packages/com.unity.inputsystem
- upm-ci package pack --package-path ./Packages/com.unity.inputsystem/
# Run upm-ci verification tests as well as tests contained in the package.
- upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u {{ editor.version }}
- upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u $EDITOR_VERSION {% if 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 %}
{% if platform.installscript %}
- {{ unity_downloader_install }}
- {{ platform.installscript }} {{ editor.version }}
- {{ platform.installscript }} $EDITOR_VERSION
{% endif %}
# ADBv2 on 2019.4 causes the test runner to not start on initial import when the
# samples are in the package. Move the samples back into the project.
- mv ./Packages/com.unity.inputsystem/Samples ./Assets
- mv ./Packages/com.unity.inputsystem/Samples.meta ./Assets
# Now run our full test suite that sits in Assets/Tests by running UTR on our project.
- ./utr --testproject . --timeout=1200 --editor-location=.Editor --artifacts_path=upm-ci~/test-results/isolation-com.unity.inputsystem.tests --suite=playmode {% if platform.name == "mac" %} --suite=editor {% endif %} {% if platform.name == "linux" %} --suite=editor {% endif %} {% if category.name == "performance" %} --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 %} --report-performance-data --performance-project-id=InputSystem
- ./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 {% endif %} --api-profile=NET_4_6 {% if platform.runtime %} --platform {{ platform.runtime }} {% endif %} {% if platform.scripting-backend %} --scripting-backend {{ platform.scripting-backend }} {% endif %} --report-performance-data --performance-project-id=InputSystem {% if 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 %}
# Merge all the code coverage results into one report.
{% if platform.name == "mac" %}
- '{{ 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'
{% endif %}
{% if platform.name == "linux" %}
- '{{ 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'
{% endif %}
- rm -rf {{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/Package
- rm -rf {{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/Project
after:
- {{ instabilities_install_nix }}
- {{ platform.instabilities_run }}
artifacts:
UTR_Output.zip:
paths:
Expand All @@ -88,11 +116,16 @@ build_ios_{{ editor.version }}_{{ category.name }}:
type: Unity::VM::osx
image: {{ ios_and_tvos_macos_bokken_image }}
flavor: b1.large
variables:
EDITOR_VERSION: {{ editor.version }}
commands:
- {{ utr_install_nix }}
- {{ unity_downloader_install }}
- unity-downloader-cli -c Editor -c iOS -u {{ editor.version }} --fast --wait
- unity-downloader-cli -c Editor -c iOS -u $EDITOR_VERSION --fast --wait
- ./utr --suite=playmode {% if category.name == "performance" %} --category=Performance {% endif %} --platform=iOS --editor-location=.Editor --testproject=. --player-save-path=build/players --artifacts_path=build/logs --build-only --report-performance-data --performance-project-id=InputSystem
after:
- {{ instabilities_install_nix }}
- {{ instabilities_run_mac }}
artifacts:
players:
paths:
Expand All @@ -108,12 +141,17 @@ run_ios_{{ editor.version }}_{{ category.name }}:
image: {{ ios_and_tvos_macos_bokken_image }}
model: SE
flavor: b1.medium
variables:
EDITOR_VERSION: {{ editor.version }}
skip_checkout: true
dependencies:
- .yamato/upm-ci.yml#build_ios_{{ editor.version }}_{{ category.name }}
commands:
- {{ utr_install_nix }}
- ./utr --suite=playmode {% if category.name == "performance" %} --category=Performance {% endif %} --platform=iOS --player-load-path=build/players --artifacts_path=build/test-results --report-performance-data --performance-project-id=InputSystem
- ./utr --suite=playmode {% if category.name == "performance" %} --category=Performance {% endif %} --platform=iOS --player-load-path=build/players --artifacts_path=build/test-results --report-performance-data --performance-project-id=InputSystem
after:
- {{ instabilities_install_nix }}
- {{ instabilities_run_mac }}
artifacts:
logs:
paths:
Expand All @@ -126,11 +164,16 @@ build_tvos_{{ editor.version }}:
type: Unity::VM::osx
image: {{ ios_and_tvos_macos_bokken_image }}
flavor: b1.large
variables:
EDITOR_VERSION: {{ editor.version }}
commands:
- {{ utr_install_nix }}
- {{ unity_downloader_install }}
- unity-downloader-cli -c Editor -c AppleTV -u {{ editor.version }} --fast --wait
- unity-downloader-cli -c Editor -c AppleTV -u $EDITOR_VERSION --fast --wait
- ./utr --suite=playmode --platform=tvOS --editor-location=.Editor --testproject=. --player-save-path=build/players --artifacts_path=build/logs --build-only --report-performance-data --performance-project-id=InputSystem
after:
- {{ instabilities_install_nix }}
- {{ instabilities_run_mac }}
artifacts:
players:
paths:
Expand All @@ -145,12 +188,17 @@ run_tvos_{{ editor.version }}:
type: Unity::mobile::appletv
image: {{ ios_and_tvos_macos_bokken_image }}
flavor: b1.medium
variables:
EDITOR_VERSION: {{ editor.version }}
skip_checkout: true
dependencies:
- .yamato/upm-ci.yml#build_tvos_{{ editor.version }}
commands:
- {{ utr_install_nix }}
- ./utr --suite=playmode --platform=tvOS --player-load-path=build/players --artifacts_path=build/test-results --report-performance-data --performance-project-id=InputSystem
after:
- {{ instabilities_install_nix }}
- {{ instabilities_run_mac }}
artifacts:
logs:
paths:
Expand All @@ -164,11 +212,16 @@ build_android_{{ editor.version }}_{{ backend.name }}_{{ category.name }}:
type: Unity::VM
image: package-ci/win10:default
flavor: b1.xlarge
variables:
EDITOR_VERSION: {{ editor.version }}
commands:
- {{ utr_install_win }}
- {{ unity_downloader_install }}
- unity-downloader-cli -c Editor -c Android -u {{ editor.version }} --fast --wait
- unity-downloader-cli -c Editor -c Android -u %EDITOR_VERSION% --fast --wait
- ./utr --suite=playmode {% if category.name == "performance" %} --category=Performance {% endif %} --platform=Android --editor-location=.Editor --testproject=. --player-save-path=build/players --artifacts_path=build/logs --scripting-backend={{ backend.name }} --build-only --repository --performance-project-id=InputSystem
after:
- {{ instabilities_install_win }}
- {{ instabilities_run_win }}
artifacts:
players:
paths:
Expand All @@ -183,6 +236,8 @@ run_android_{{ editor.version }}_{{ backend.name }}_{{ category.name }}:
type: Unity::mobile::shield
image: package-ci/win10:default
flavor: b1.medium
variables:
EDITOR_VERSION: {{ editor.version }}
# Skip repository cloning
skip_checkout: true
# Set a dependency on the build job
Expand All @@ -201,7 +256,9 @@ run_android_{{ editor.version }}_{{ backend.name }}_{{ category.name }}:
after:
- start %ANDROID_SDK_ROOT%\platform-tools\adb.exe connect %BOKKEN_DEVICE_IP%
- if not exist build\test-results mkdir build\test-results
- powershell %ANDROID_SDK_ROOT%\platform-tools\adb.exe logcat -d > build/test-results/device_log.txt
- powershell %ANDROID_SDK_ROOT%\platform-tools\adb.exe logcat -d > build/test-results/device_log.txt
- {{ instabilities_install_win }}
- {{ instabilities_run_win }}
# Set uploadable artifact paths
artifacts:
logs:
Expand All @@ -212,7 +269,7 @@ run_android_{{ editor.version }}_{{ backend.name }}_{{ category.name }}:
{% endfor %} # editors

all_tests:
name: All Tests
name: All Tests
dependencies:
{% for editor in editors %}
{% for platform in platforms_win %}
Expand Down
Loading

0 comments on commit d1bf057

Please sign in to comment.