From b59eaf0de101d2fb39aeb8b3edaec18c9c937836 Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Tue, 3 Aug 2021 20:00:32 +0100 Subject: [PATCH 01/45] chore: Add yamato hello world --- .yamato/yamato-config.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .yamato/yamato-config.yml diff --git a/.yamato/yamato-config.yml b/.yamato/yamato-config.yml new file mode 100644 index 000000000..3734f2334 --- /dev/null +++ b/.yamato/yamato-config.yml @@ -0,0 +1,9 @@ +# ./yamato/yamato-config.yml + +name: Hello world +agent: + type: Unity::VM + image: slough-ops/ubuntu-18.04-base:stable + flavor: b1.small +commands: + - echo "Hello world!" \ No newline at end of file From 2fa24369c0c897fe523351e0d32d24c9b43c475e Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Tue, 3 Aug 2021 20:17:14 +0100 Subject: [PATCH 02/45] chore: add yamato project pack --- .yamato/project-pack.yml | 17 +++++++++++++++++ .yamato/project.metafile | 29 +++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 .yamato/project-pack.yml create mode 100644 .yamato/project.metafile diff --git a/.yamato/project-pack.yml b/.yamato/project-pack.yml new file mode 100644 index 000000000..a2fb57c35 --- /dev/null +++ b/.yamato/project-pack.yml @@ -0,0 +1,17 @@ +{% metadata_file .yamato/project.metafile %} +--- +{% for project in projects -%} +pack_{{ project.name }}: + name: Pack {{ project.name }} + agent: + type: Unity::VM + image: package-ci/ubuntu:stable + flavor: b1.small + commands: + - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm + - upm-ci project pack --project-path {{ project.path }} + artifacts: + packages: + paths: + - "upm-ci~/packages/**/*" +{% endfor -%} \ No newline at end of file diff --git a/.yamato/project.metafile b/.yamato/project.metafile new file mode 100644 index 000000000..7f067cd64 --- /dev/null +++ b/.yamato/project.metafile @@ -0,0 +1,29 @@ +# Editors where tests will happen. The first entry of this array is also used +# for validation. +# +# Therefore, **do not** put an older V1-lifecycle ver. +# like 2020.x or 2019.x on top of 'test_editors' +test_editors: + - 2020.3 + +# Platforms that will be tested. The first entry in this array will also +# be used for validation +test_platforms: + - name: win + type: Unity::VM + image: package-ci/win10:stable + flavor: b1.large + - name: mac + type: Unity::VM::osx + image: package-ci/mac:stable + flavor: m1.mac + - name: ubuntu + type: Unity::VM + image: package-ci/ubuntu:stable + flavor: b1.large + +# Projects within the repository that will be tested. Name will be used +# for job ids, so it should not contain spaces/non-supported characters +projects: + - name: 2dspaceshooter + path: Basic/2DSpaceShooter \ No newline at end of file From eead466099ee74c6df7e70d9dfbff2b1547fdc60 Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Tue, 3 Aug 2021 20:31:31 +0100 Subject: [PATCH 03/45] chore: remove hello world --- .yamato/yamato-config.yml | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 .yamato/yamato-config.yml diff --git a/.yamato/yamato-config.yml b/.yamato/yamato-config.yml deleted file mode 100644 index 3734f2334..000000000 --- a/.yamato/yamato-config.yml +++ /dev/null @@ -1,9 +0,0 @@ -# ./yamato/yamato-config.yml - -name: Hello world -agent: - type: Unity::VM - image: slough-ops/ubuntu-18.04-base:stable - flavor: b1.small -commands: - - echo "Hello world!" \ No newline at end of file From 779770760780c444ea14b1c9da954ad1a68b31d2 Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Tue, 3 Aug 2021 20:39:04 +0100 Subject: [PATCH 04/45] add project test yml --- .yamato/project-test.yml | 115 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 .yamato/project-test.yml diff --git a/.yamato/project-test.yml b/.yamato/project-test.yml new file mode 100644 index 000000000..23b08e7fa --- /dev/null +++ b/.yamato/project-test.yml @@ -0,0 +1,115 @@ +{% metadata_file .yamato/project.metafile -%} +--- +# Go through all platforms, editors and packages in the metadata +# to generate its independent package tests and validation tests. +# The idea is to only run validation once per package and not mix. +# the results with package tests +{% for package in projects.first.packages -%} +{% for editor in test_editors -%} +{% for platform in test_platforms -%} +test_{{ projects.first.name}}_{{ package.name }}_{{ platform.name }}_{{ editor }}: + name : Test Project {{ projects.first.name }} - Package {{ package.name }} - {{ editor }} on {{ platform.name }} + agent: + type: {{ platform.type }} + image: {{ platform.image }} + flavor: {{ platform.flavor}} + commands: + - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm + - {% if platform.name == "centos" %}DISPLAY=:0 {% endif %}upm-ci project test -u {{ editor }} --project-path {{ projects.first.path }} --type package-tests --package-filter {{ package.name }} --extra-create-project-arg=-upmNoDefaultPackages + artifacts: + logs: + paths: + - "upm-ci~/test-results/**/*" + dependencies: + - .yamato/project-pack.yml#pack_{{ projects.first.name }} + +{% endfor -%} +{% endfor -%} + +# Validation job for package {{ package.name }}, only using the first entry in the +# platform and editor meta data +# Validation only occurs in editmode. +validate_{{ projects.first.name }}_{{ package.name }}_{{ test_platforms.first.name }}_{{ test_editors.first }}: + name : Validate Project {{ projects.first.name }} - Package {{ package.name }} - {{ test_editors.first }} on {{ test_platforms.first.name }} + agent: + type: {{ test_platforms.first.type }} + image: {{ test_platforms.first.image }} + flavor: {{ test_platforms.first.flavor}} + commands: + - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm + - {% if platform.name == "centos" %}DISPLAY=:0 {% endif %}upm-ci project test -u {{ test_editors.first }} --project-path {{ projects.first.path }} --type vetting-tests --package-filter {{ package.name }} --platform editmode --extra-create-project-arg=-upmNoDefaultPackages + artifacts: + logs: + paths: + - "upm-ci~/test-results/**/*" + dependencies: + - .yamato/project-pack.yml#pack_{{ projects.first.name }} +{% endfor -%} + +# For every platform and editor version, run its project tests without +# running package tests too since they are handled on their respective +# jobs +{% for project in projects -%} +{% for editor in test_editors -%} +{% for platform in test_platforms -%} +test_{{ project.name }}_{{ editor }}_{{ platform.name }}: + name : Test Project {{ project.name }} - {{ editor }} on {{ platform.name }} + agent: + type: {{ platform.type }} + image: {{ platform.image }} + flavor: {{ platform.flavor}} + commands: + - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm + - {% if platform.name == "centos" %}DISPLAY=:0 {% endif %}upm-ci project test -u {{ editor }} --project-path {{ project.path }} --type project-tests --extra-create-project-arg=-upmNoDefaultPackages + artifacts: + logs: + paths: + - "upm-ci~/test-results/**/*" + dependencies: + - .yamato/project-pack.yml#pack_{{ project.name }} + +{% endfor -%} +{% endfor -%} +{% endfor -%} + +# Currently, we need to have a trigger to updated badges +# Only package badges currently exist +badges_test_trigger: + name: Badges Tests Trigger + agent: + type: Unity::VM + image: package-ci/ubuntu:stable + flavor: b1.small + commands: + - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm + - upm-ci package izon -t + artifacts: + logs: + paths: + - "upm-ci~/test-results/**/*" + packages: + paths: + - "upm-ci~/packages/**/*" + dependencies: +{% for project in projects -%} +{% for package in projects.first.packages -%} + - .yamato/project-test.yml#validate_{{ projects.first.name }}_{{ package.name }}_{{ test_platforms.first.name }}_{{ test_editors.first }} +{% for editor in test_editors -%} +{% for platform in test_platforms -%} + - .yamato/project-test.yml#test_{{ projects.first.name }}_{{ package.name }}_{{ platform.name }}_{{ editor }} +{% endfor -%} +{% endfor -%} +{% endfor -%} +{% endfor -%} + +all_tests_trigger: + name: Repository Tests Trigger + dependencies: + - .yamato/project-test.yml#badges_test_trigger +{% for project in projects -%} +{% for editor in test_editors -%} +{% for platform in test_platforms -%} + - .yamato/project-test.yml#test_{{ project.name }}_{{ editor }}_{{ platform.name }} +{% endfor -%} +{% endfor -%} +{% endfor -%} \ No newline at end of file From 46436b807a3d734d9fe538bfa28650f3ab1b1cfb Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Tue, 3 Aug 2021 21:05:35 +0100 Subject: [PATCH 05/45] chore: update project-test yml to only run project tests --- .yamato/project-test.yml | 158 +++++++++++++++++++++------------------ 1 file changed, 85 insertions(+), 73 deletions(-) diff --git a/.yamato/project-test.yml b/.yamato/project-test.yml index 23b08e7fa..486432b75 100644 --- a/.yamato/project-test.yml +++ b/.yamato/project-test.yml @@ -1,50 +1,50 @@ {% metadata_file .yamato/project.metafile -%} --- -# Go through all platforms, editors and packages in the metadata -# to generate its independent package tests and validation tests. -# The idea is to only run validation once per package and not mix. -# the results with package tests -{% for package in projects.first.packages -%} -{% for editor in test_editors -%} -{% for platform in test_platforms -%} -test_{{ projects.first.name}}_{{ package.name }}_{{ platform.name }}_{{ editor }}: - name : Test Project {{ projects.first.name }} - Package {{ package.name }} - {{ editor }} on {{ platform.name }} - agent: - type: {{ platform.type }} - image: {{ platform.image }} - flavor: {{ platform.flavor}} - commands: - - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm - - {% if platform.name == "centos" %}DISPLAY=:0 {% endif %}upm-ci project test -u {{ editor }} --project-path {{ projects.first.path }} --type package-tests --package-filter {{ package.name }} --extra-create-project-arg=-upmNoDefaultPackages - artifacts: - logs: - paths: - - "upm-ci~/test-results/**/*" - dependencies: - - .yamato/project-pack.yml#pack_{{ projects.first.name }} +# # Go through all platforms, editors and packages in the metadata +# # to generate its independent package tests and validation tests. +# # The idea is to only run validation once per package and not mix. +# # the results with package tests +# {% for package in projects.first.packages -%} +# {% for editor in test_editors -%} +# {% for platform in test_platforms -%} +# test_{{ projects.first.name}}_{{ package.name }}_{{ platform.name }}_{{ editor }}: +# name : Test Project {{ projects.first.name }} - Package {{ package.name }} - {{ editor }} on {{ platform.name }} +# agent: +# type: {{ platform.type }} +# image: {{ platform.image }} +# flavor: {{ platform.flavor}} +# commands: +# - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm +# - {% if platform.name == "centos" %}DISPLAY=:0 {% endif %}upm-ci project test -u {{ editor }} --project-path {{ projects.first.path }} --type package-tests --package-filter {{ package.name }} --extra-create-project-arg=-upmNoDefaultPackages +# artifacts: +# logs: +# paths: +# - "upm-ci~/test-results/**/*" +# dependencies: +# - .yamato/project-pack.yml#pack_{{ projects.first.name }} -{% endfor -%} -{% endfor -%} +# {% endfor -%} +# {% endfor -%} -# Validation job for package {{ package.name }}, only using the first entry in the -# platform and editor meta data -# Validation only occurs in editmode. -validate_{{ projects.first.name }}_{{ package.name }}_{{ test_platforms.first.name }}_{{ test_editors.first }}: - name : Validate Project {{ projects.first.name }} - Package {{ package.name }} - {{ test_editors.first }} on {{ test_platforms.first.name }} - agent: - type: {{ test_platforms.first.type }} - image: {{ test_platforms.first.image }} - flavor: {{ test_platforms.first.flavor}} - commands: - - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm - - {% if platform.name == "centos" %}DISPLAY=:0 {% endif %}upm-ci project test -u {{ test_editors.first }} --project-path {{ projects.first.path }} --type vetting-tests --package-filter {{ package.name }} --platform editmode --extra-create-project-arg=-upmNoDefaultPackages - artifacts: - logs: - paths: - - "upm-ci~/test-results/**/*" - dependencies: - - .yamato/project-pack.yml#pack_{{ projects.first.name }} -{% endfor -%} +# # Validation job for package {{ package.name }}, only using the first entry in the +# # platform and editor meta data +# # Validation only occurs in editmode. +# validate_{{ projects.first.name }}_{{ package.name }}_{{ test_platforms.first.name }}_{{ test_editors.first }}: +# name : Validate Project {{ projects.first.name }} - Package {{ package.name }} - {{ test_editors.first }} on {{ test_platforms.first.name }} +# agent: +# type: {{ test_platforms.first.type }} +# image: {{ test_platforms.first.image }} +# flavor: {{ test_platforms.first.flavor}} +# commands: +# - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm +# - {% if platform.name == "centos" %}DISPLAY=:0 {% endif %}upm-ci project test -u {{ test_editors.first }} --project-path {{ projects.first.path }} --type vetting-tests --package-filter {{ package.name }} --platform editmode --extra-create-project-arg=-upmNoDefaultPackages +# artifacts: +# logs: +# paths: +# - "upm-ci~/test-results/**/*" +# dependencies: +# - .yamato/project-pack.yml#pack_{{ projects.first.name }} +# {% endfor -%} # For every platform and editor version, run its project tests without # running package tests too since they are handled on their respective @@ -72,40 +72,52 @@ test_{{ project.name }}_{{ editor }}_{{ platform.name }}: {% endfor -%} {% endfor -%} -# Currently, we need to have a trigger to updated badges -# Only package badges currently exist -badges_test_trigger: - name: Badges Tests Trigger - agent: - type: Unity::VM - image: package-ci/ubuntu:stable - flavor: b1.small - commands: - - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm - - upm-ci package izon -t - artifacts: - logs: - paths: - - "upm-ci~/test-results/**/*" - packages: - paths: - - "upm-ci~/packages/**/*" - dependencies: -{% for project in projects -%} -{% for package in projects.first.packages -%} - - .yamato/project-test.yml#validate_{{ projects.first.name }}_{{ package.name }}_{{ test_platforms.first.name }}_{{ test_editors.first }} -{% for editor in test_editors -%} -{% for platform in test_platforms -%} - - .yamato/project-test.yml#test_{{ projects.first.name }}_{{ package.name }}_{{ platform.name }}_{{ editor }} -{% endfor -%} -{% endfor -%} -{% endfor -%} -{% endfor -%} +# # Currently, we need to have a trigger to updated badges +# # Only package badges currently exist +# badges_test_trigger: +# name: Badges Tests Trigger +# agent: +# type: Unity::VM +# image: package-ci/ubuntu:stable +# flavor: b1.small +# commands: +# - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm +# - upm-ci package izon -t +# artifacts: +# logs: +# paths: +# - "upm-ci~/test-results/**/*" +# packages: +# paths: +# - "upm-ci~/packages/**/*" +# dependencies: +# {% for project in projects -%} +# {% for package in projects.first.packages -%} +# - .yamato/project-test.yml#validate_{{ projects.first.name }}_{{ package.name }}_{{ test_platforms.first.name }}_{{ test_editors.first }} +# {% for editor in test_editors -%} +# {% for platform in test_platforms -%} +# - .yamato/project-test.yml#test_{{ projects.first.name }}_{{ package.name }}_{{ platform.name }}_{{ editor }} +# {% endfor -%} +# {% endfor -%} +# {% endfor -%} +# {% endfor -%} + +# all_tests_trigger: +# name: Repository Tests Trigger +# dependencies: +# - .yamato/project-test.yml#badges_test_trigger +# {% for project in projects -%} +# {% for editor in test_editors -%} +# {% for platform in test_platforms -%} +# - .yamato/project-test.yml#test_{{ project.name }}_{{ editor }}_{{ platform.name }} +# {% endfor -%} +# {% endfor -%} +# {% endfor -%} + all_tests_trigger: name: Repository Tests Trigger dependencies: - - .yamato/project-test.yml#badges_test_trigger {% for project in projects -%} {% for editor in test_editors -%} {% for platform in test_platforms -%} From 8fc71ff175d20763de2da5c720e7e80d089d09b0 Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 5 Aug 2021 15:41:31 +0100 Subject: [PATCH 06/45] chore: use utr to create builds --- .yamato/build.yml | 74 +++++++++++++++++++++++ .yamato/project-pack.yml | 17 ------ .yamato/project-test.yml | 127 --------------------------------------- .yamato/project.metafile | 17 +++--- 4 files changed, 83 insertions(+), 152 deletions(-) create mode 100644 .yamato/build.yml delete mode 100644 .yamato/project-pack.yml delete mode 100644 .yamato/project-test.yml diff --git a/.yamato/build.yml b/.yamato/build.yml new file mode 100644 index 000000000..fc6e1665f --- /dev/null +++ b/.yamato/build.yml @@ -0,0 +1,74 @@ +{% metadata_file .yamato/project.metafile %} +--- + +{% for project in projects -%} +{% for editor in test_editors -%} +{% for platform in test_platforms -%} + +build_{{ project.name }}_{{ editor }}_{{ platform.name }}: + name: Build Players with tests StandaloneWindows64 + variables: + UTR_VERSION: current + agent: + # Do not choose machines with gpus or connected devices to perform this step + # If it takes a lot of time to compile your project prefer flavor with more cores. + # See https://internaldocs.hq.unity3d.com/bokken/reference/flavors/ + type: Unity::VM + image: sdet/gamecode_win10:latest + flavor: b1.xlarge + commands: + - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade + # note: --fast tells unity downloader to get the latest available version editor. + # Saves some time in case if editor is building after batch landed to trunk + # You might want to remove it. + - unity-downloader-cli -u {{ editor }} -c editor --wait --published --fast + - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr.bat --output utr.bat + - ./utr --suite=playmode --platform={{ platform.platform }} --editor-location=.Editor --testproject={{ project.path }} --player-save-path=build/players --artifacts_path=build/logs --build-only + artifacts: + players: + paths: + - "build/players/**" + logs: + paths: + - "build/logs/**" +# run_{{ project.name }}_{{ editor }}_{{ platform.name }}: +# name: Run Test on a windows64 standalone player +# variables: +# UTR_VERSION: current +# # no need to clone repo +# skip_checkout: true +# agent: +# # Running tests is fast, building it not requried, therefore flavor can be smaller. see https://internaldocs.hq.unity3d.com/bokken/reference/flavors/ +# # Now we can use an 'expensive' type. +# type: Unity::VM +# image: sdet/gamecode_win10:latest +# flavor: b1.large +# dependencies: +# - .yamato/standalone_windows64.yml#build_{{ project.name }}_{{ editor }}_{{ platform.name }} +# commands: +# - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr.bat --output utr.bat +# - ./utr --suite=playmode --platform=StandaloneWindows64 --player-load-path=build/players --artifacts_path=build/test-results --player-connection-ip=auto +# artifacts: +# logs: +# paths: +# - "build/test-results/**" + +{% endfor -%} +{% endfor -%} +{% endfor -%} + + + +develop_pull_request_trigger: + name: Develop Branch Triggers + dependencies: +{% for project in projects -%} +{% for editor in test_editors -%} +{% for platform in test_platforms -%} + - .yamato/build.yml#build_{{ project.name }}_{{ editor }}_{{ platform.name }} +{% endfor -%} +{% endfor -%} +{% endfor -%} + triggers: + cancel_old_ci: true + pull_requests: \ No newline at end of file diff --git a/.yamato/project-pack.yml b/.yamato/project-pack.yml deleted file mode 100644 index a2fb57c35..000000000 --- a/.yamato/project-pack.yml +++ /dev/null @@ -1,17 +0,0 @@ -{% metadata_file .yamato/project.metafile %} ---- -{% for project in projects -%} -pack_{{ project.name }}: - name: Pack {{ project.name }} - agent: - type: Unity::VM - image: package-ci/ubuntu:stable - flavor: b1.small - commands: - - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm - - upm-ci project pack --project-path {{ project.path }} - artifacts: - packages: - paths: - - "upm-ci~/packages/**/*" -{% endfor -%} \ No newline at end of file diff --git a/.yamato/project-test.yml b/.yamato/project-test.yml deleted file mode 100644 index 486432b75..000000000 --- a/.yamato/project-test.yml +++ /dev/null @@ -1,127 +0,0 @@ -{% metadata_file .yamato/project.metafile -%} ---- -# # Go through all platforms, editors and packages in the metadata -# # to generate its independent package tests and validation tests. -# # The idea is to only run validation once per package and not mix. -# # the results with package tests -# {% for package in projects.first.packages -%} -# {% for editor in test_editors -%} -# {% for platform in test_platforms -%} -# test_{{ projects.first.name}}_{{ package.name }}_{{ platform.name }}_{{ editor }}: -# name : Test Project {{ projects.first.name }} - Package {{ package.name }} - {{ editor }} on {{ platform.name }} -# agent: -# type: {{ platform.type }} -# image: {{ platform.image }} -# flavor: {{ platform.flavor}} -# commands: -# - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm -# - {% if platform.name == "centos" %}DISPLAY=:0 {% endif %}upm-ci project test -u {{ editor }} --project-path {{ projects.first.path }} --type package-tests --package-filter {{ package.name }} --extra-create-project-arg=-upmNoDefaultPackages -# artifacts: -# logs: -# paths: -# - "upm-ci~/test-results/**/*" -# dependencies: -# - .yamato/project-pack.yml#pack_{{ projects.first.name }} - -# {% endfor -%} -# {% endfor -%} - -# # Validation job for package {{ package.name }}, only using the first entry in the -# # platform and editor meta data -# # Validation only occurs in editmode. -# validate_{{ projects.first.name }}_{{ package.name }}_{{ test_platforms.first.name }}_{{ test_editors.first }}: -# name : Validate Project {{ projects.first.name }} - Package {{ package.name }} - {{ test_editors.first }} on {{ test_platforms.first.name }} -# agent: -# type: {{ test_platforms.first.type }} -# image: {{ test_platforms.first.image }} -# flavor: {{ test_platforms.first.flavor}} -# commands: -# - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm -# - {% if platform.name == "centos" %}DISPLAY=:0 {% endif %}upm-ci project test -u {{ test_editors.first }} --project-path {{ projects.first.path }} --type vetting-tests --package-filter {{ package.name }} --platform editmode --extra-create-project-arg=-upmNoDefaultPackages -# artifacts: -# logs: -# paths: -# - "upm-ci~/test-results/**/*" -# dependencies: -# - .yamato/project-pack.yml#pack_{{ projects.first.name }} -# {% endfor -%} - -# For every platform and editor version, run its project tests without -# running package tests too since they are handled on their respective -# jobs -{% for project in projects -%} -{% for editor in test_editors -%} -{% for platform in test_platforms -%} -test_{{ project.name }}_{{ editor }}_{{ platform.name }}: - name : Test Project {{ project.name }} - {{ editor }} on {{ platform.name }} - agent: - type: {{ platform.type }} - image: {{ platform.image }} - flavor: {{ platform.flavor}} - commands: - - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm - - {% if platform.name == "centos" %}DISPLAY=:0 {% endif %}upm-ci project test -u {{ editor }} --project-path {{ project.path }} --type project-tests --extra-create-project-arg=-upmNoDefaultPackages - artifacts: - logs: - paths: - - "upm-ci~/test-results/**/*" - dependencies: - - .yamato/project-pack.yml#pack_{{ project.name }} - -{% endfor -%} -{% endfor -%} -{% endfor -%} - -# # Currently, we need to have a trigger to updated badges -# # Only package badges currently exist -# badges_test_trigger: -# name: Badges Tests Trigger -# agent: -# type: Unity::VM -# image: package-ci/ubuntu:stable -# flavor: b1.small -# commands: -# - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm -# - upm-ci package izon -t -# artifacts: -# logs: -# paths: -# - "upm-ci~/test-results/**/*" -# packages: -# paths: -# - "upm-ci~/packages/**/*" -# dependencies: -# {% for project in projects -%} -# {% for package in projects.first.packages -%} -# - .yamato/project-test.yml#validate_{{ projects.first.name }}_{{ package.name }}_{{ test_platforms.first.name }}_{{ test_editors.first }} -# {% for editor in test_editors -%} -# {% for platform in test_platforms -%} -# - .yamato/project-test.yml#test_{{ projects.first.name }}_{{ package.name }}_{{ platform.name }}_{{ editor }} -# {% endfor -%} -# {% endfor -%} -# {% endfor -%} -# {% endfor -%} - -# all_tests_trigger: -# name: Repository Tests Trigger -# dependencies: -# - .yamato/project-test.yml#badges_test_trigger -# {% for project in projects -%} -# {% for editor in test_editors -%} -# {% for platform in test_platforms -%} -# - .yamato/project-test.yml#test_{{ project.name }}_{{ editor }}_{{ platform.name }} -# {% endfor -%} -# {% endfor -%} -# {% endfor -%} - - -all_tests_trigger: - name: Repository Tests Trigger - dependencies: -{% for project in projects -%} -{% for editor in test_editors -%} -{% for platform in test_platforms -%} - - .yamato/project-test.yml#test_{{ project.name }}_{{ editor }}_{{ platform.name }} -{% endfor -%} -{% endfor -%} -{% endfor -%} \ No newline at end of file diff --git a/.yamato/project.metafile b/.yamato/project.metafile index 7f067cd64..6bf708a78 100644 --- a/.yamato/project.metafile +++ b/.yamato/project.metafile @@ -12,15 +12,16 @@ test_platforms: - name: win type: Unity::VM image: package-ci/win10:stable + platform: StandaloneWindows64 flavor: b1.large - - name: mac - type: Unity::VM::osx - image: package-ci/mac:stable - flavor: m1.mac - - name: ubuntu - type: Unity::VM - image: package-ci/ubuntu:stable - flavor: b1.large +# - name: mac +# type: Unity::VM::osx +# image: package-ci/mac:stable +# flavor: m1.mac +# - name: ubuntu +# type: Unity::VM +# image: package-ci/ubuntu:stable +# flavor: b1.large # Projects within the repository that will be tested. Name will be used # for job ids, so it should not contain spaces/non-supported characters From 639b7ad8bfb94be833b961497f37881255ff8982 Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 5 Aug 2021 15:44:24 +0100 Subject: [PATCH 07/45] chore: fix test name --- .yamato/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.yamato/build.yml b/.yamato/build.yml index fc6e1665f..7507c1958 100644 --- a/.yamato/build.yml +++ b/.yamato/build.yml @@ -6,7 +6,7 @@ {% for platform in test_platforms -%} build_{{ project.name }}_{{ editor }}_{{ platform.name }}: - name: Build Players with tests StandaloneWindows64 + name: Build Project {{ projects.first.name }} - Package {{ package.name }} - {{ editor }} on {{ platform.name }} variables: UTR_VERSION: current agent: From 25c692a2e580a9ebb0552f2dbd4f0053b0cb48cd Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 5 Aug 2021 17:07:45 +0100 Subject: [PATCH 08/45] chore: add linux and macos platforms --- .yamato/build.yml | 21 ++++++++++++++++----- .yamato/project.metafile | 18 ++++++++++-------- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/.yamato/build.yml b/.yamato/build.yml index 7507c1958..38b142ba3 100644 --- a/.yamato/build.yml +++ b/.yamato/build.yml @@ -17,13 +17,22 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: image: sdet/gamecode_win10:latest flavor: b1.xlarge commands: +{% if "{{ platform.name }}"=="mac" or "{{ platform.name }}"=="linux" -%} #macos and linux - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - # note: --fast tells unity downloader to get the latest available version editor. - # Saves some time in case if editor is building after batch landed to trunk - # You might want to remove it. - - unity-downloader-cli -u {{ editor }} -c editor --wait --published --fast +{% endif -%} + + - unity-downloader-cli -u {{ editor }} -c editor --wait --published --fast #all + +{% if "{{ platform.name }}"=="win" -%} #windows - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr.bat --output utr.bat - - ./utr --suite=playmode --platform={{ platform.platform }} --editor-location=.Editor --testproject={{ project.path }} --player-save-path=build/players --artifacts_path=build/logs --build-only +{% endif -%} + +{% if "{{ platform.name }}"=="mac" or "{{ platform.name }}"=="linux" -%} #macos and linux + - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr + - chmod +x ./utr +{% endif -%} + + - ./utr --suite=playmode --platform={{ platform.platform }} --editor-location=.Editor --testproject={{ project.path }} --player-save-path=build/players --artifacts_path=build/logs --build-only #all artifacts: players: paths: @@ -31,6 +40,8 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: logs: paths: - "build/logs/**" + + # run_{{ project.name }}_{{ editor }}_{{ platform.name }}: # name: Run Test on a windows64 standalone player # variables: diff --git a/.yamato/project.metafile b/.yamato/project.metafile index 6bf708a78..4363565b0 100644 --- a/.yamato/project.metafile +++ b/.yamato/project.metafile @@ -14,14 +14,16 @@ test_platforms: image: package-ci/win10:stable platform: StandaloneWindows64 flavor: b1.large -# - name: mac -# type: Unity::VM::osx -# image: package-ci/mac:stable -# flavor: m1.mac -# - name: ubuntu -# type: Unity::VM -# image: package-ci/ubuntu:stable -# flavor: b1.large + - name: mac + type: Unity::VM::osx + image: package-ci/mac:stable + platform: StandaloneOSX + flavor: m1.mac + - name: linux + type: Unity::VM + image: package-ci/ubuntu:stable + platform: StandaloneLinux64 + flavor: b1.large # Projects within the repository that will be tested. Name will be used # for job ids, so it should not contain spaces/non-supported characters From 47d9d3d903128482482d15df8668d9411eb2f22f Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 5 Aug 2021 17:25:39 +0100 Subject: [PATCH 09/45] chore: develop trigger and run pip everywhere --- .yamato/build.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.yamato/build.yml b/.yamato/build.yml index 38b142ba3..81434a948 100644 --- a/.yamato/build.yml +++ b/.yamato/build.yml @@ -17,12 +17,8 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: image: sdet/gamecode_win10:latest flavor: b1.xlarge commands: -{% if "{{ platform.name }}"=="mac" or "{{ platform.name }}"=="linux" -%} #macos and linux - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade -{% endif -%} - - unity-downloader-cli -u {{ editor }} -c editor --wait --published --fast #all - {% if "{{ platform.name }}"=="win" -%} #windows - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr.bat --output utr.bat {% endif -%} @@ -68,8 +64,9 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: {% endfor -%} {% endfor -%} - - +# Run all relevant tasks when a pull request targeting the develop +# branch is created or updated. Currently only mlapi package tests are +# enabled, since the others are missing test coverage and will fail CI. develop_pull_request_trigger: name: Develop Branch Triggers dependencies: @@ -82,4 +79,8 @@ develop_pull_request_trigger: {% endfor -%} triggers: cancel_old_ci: true - pull_requests: \ No newline at end of file + pull_requests: + - targets: + only: + - "main" + - "develop" \ No newline at end of file From 5a860f0d6e824e8923e21eff54728a51319ab3e5 Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 5 Aug 2021 18:21:06 +0100 Subject: [PATCH 10/45] chore: possibly fix windows build --- .yamato/build.yml | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/.yamato/build.yml b/.yamato/build.yml index 81434a948..ce5173c3c 100644 --- a/.yamato/build.yml +++ b/.yamato/build.yml @@ -19,7 +19,7 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: commands: - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - unity-downloader-cli -u {{ editor }} -c editor --wait --published --fast #all -{% if "{{ platform.name }}"=="win" -%} #windows +{% if "{{platform.name}}"=="win" -%} #windows - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr.bat --output utr.bat {% endif -%} @@ -37,7 +37,6 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: paths: - "build/logs/**" - # run_{{ project.name }}_{{ editor }}_{{ platform.name }}: # name: Run Test on a windows64 standalone player # variables: @@ -67,20 +66,20 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: # Run all relevant tasks when a pull request targeting the develop # branch is created or updated. Currently only mlapi package tests are # enabled, since the others are missing test coverage and will fail CI. -develop_pull_request_trigger: - name: Develop Branch Triggers - dependencies: -{% for project in projects -%} -{% for editor in test_editors -%} -{% for platform in test_platforms -%} - - .yamato/build.yml#build_{{ project.name }}_{{ editor }}_{{ platform.name }} -{% endfor -%} -{% endfor -%} -{% endfor -%} - triggers: - cancel_old_ci: true - pull_requests: - - targets: - only: - - "main" - - "develop" \ No newline at end of file +# develop_pull_request_trigger: +# name: Develop Branch Triggers +# dependencies: +# {% for project in projects -%} +# {% for editor in test_editors -%} +# {% for platform in test_platforms -%} +# - .yamato/build.yml#build_{{ project.name }}_{{ editor }}_{{ platform.name }} +# {% endfor -%} +# {% endfor -%} +# {% endfor -%} +# triggers: +# cancel_old_ci: true +# pull_requests: +# - targets: +# only: +# - "main" +# - "develop" \ No newline at end of file From 392def5c47cf2a575e553adb037cdba4fe91f957 Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 5 Aug 2021 18:57:52 +0100 Subject: [PATCH 11/45] chore: test --- .yamato/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.yamato/build.yml b/.yamato/build.yml index ce5173c3c..f61a5aaaa 100644 --- a/.yamato/build.yml +++ b/.yamato/build.yml @@ -17,6 +17,8 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: image: sdet/gamecode_win10:latest flavor: b1.xlarge commands: + - echo "{{ platform.name }}"=="win" + - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - unity-downloader-cli -u {{ editor }} -c editor --wait --published --fast #all {% if "{{platform.name}}"=="win" -%} #windows From e7b857b7e5885fe71b5fb298944326436410dd31 Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 5 Aug 2021 19:52:53 +0100 Subject: [PATCH 12/45] chore: fix platform branches --- .yamato/build.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.yamato/build.yml b/.yamato/build.yml index f61a5aaaa..15a848fe9 100644 --- a/.yamato/build.yml +++ b/.yamato/build.yml @@ -17,15 +17,13 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: image: sdet/gamecode_win10:latest flavor: b1.xlarge commands: - - echo "{{ platform.name }}"=="win" - - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - unity-downloader-cli -u {{ editor }} -c editor --wait --published --fast #all -{% if "{{platform.name}}"=="win" -%} #windows +{% if platform.name == "win" -%} #windows - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr.bat --output utr.bat {% endif -%} -{% if "{{ platform.name }}"=="mac" or "{{ platform.name }}"=="linux" -%} #macos and linux +{% if platform.name == "mac" or platform.name == "linux" -%} #macos and linux - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr - chmod +x ./utr {% endif -%} From a8408bbb1846a39a2eeb26b866e2a22a009ea21d Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 5 Aug 2021 19:54:55 +0100 Subject: [PATCH 13/45] chore: re-enable develop trigger --- .yamato/build.yml | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.yamato/build.yml b/.yamato/build.yml index 15a848fe9..9c5e10671 100644 --- a/.yamato/build.yml +++ b/.yamato/build.yml @@ -66,20 +66,20 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: # Run all relevant tasks when a pull request targeting the develop # branch is created or updated. Currently only mlapi package tests are # enabled, since the others are missing test coverage and will fail CI. -# develop_pull_request_trigger: -# name: Develop Branch Triggers -# dependencies: -# {% for project in projects -%} -# {% for editor in test_editors -%} -# {% for platform in test_platforms -%} -# - .yamato/build.yml#build_{{ project.name }}_{{ editor }}_{{ platform.name }} -# {% endfor -%} -# {% endfor -%} -# {% endfor -%} -# triggers: -# cancel_old_ci: true -# pull_requests: -# - targets: -# only: -# - "main" -# - "develop" \ No newline at end of file +develop_pull_request_trigger: + name: Develop Branch Triggers + dependencies: +{% for project in projects -%} +{% for editor in test_editors -%} +{% for platform in test_platforms -%} + - .yamato/build.yml#build_{{ project.name }}_{{ editor }}_{{ platform.name }} +{% endfor -%} +{% endfor -%} +{% endfor -%} + triggers: + cancel_old_ci: true + pull_requests: + - targets: + only: + - "main" + - "develop" \ No newline at end of file From d2e785954708c0940995f9b95a8fa7f309261178 Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 5 Aug 2021 21:18:33 +0100 Subject: [PATCH 14/45] chore: fix utr command --- .yamato/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.yamato/build.yml b/.yamato/build.yml index 9c5e10671..e6d1693ab 100644 --- a/.yamato/build.yml +++ b/.yamato/build.yml @@ -24,11 +24,11 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: {% endif -%} {% if platform.name == "mac" or platform.name == "linux" -%} #macos and linux - - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr + - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr - chmod +x ./utr {% endif -%} - - ./utr --suite=playmode --platform={{ platform.platform }} --editor-location=.Editor --testproject={{ project.path }} --player-save-path=build/players --artifacts_path=build/logs --build-only #all + - utr --suite=playmode --platform={{ platform.platform }} --editor-location=.Editor --testproject={{ project.path }} --player-save-path=build/players --artifacts_path=build/logs --build-only #all artifacts: players: paths: From d72f9907a79d3d1419089c7cc94585f879817e56 Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 5 Aug 2021 21:31:26 +0100 Subject: [PATCH 15/45] Revert "chore: fix utr command" This reverts commit d2e785954708c0940995f9b95a8fa7f309261178. --- .yamato/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.yamato/build.yml b/.yamato/build.yml index e6d1693ab..9c5e10671 100644 --- a/.yamato/build.yml +++ b/.yamato/build.yml @@ -24,11 +24,11 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: {% endif -%} {% if platform.name == "mac" or platform.name == "linux" -%} #macos and linux - - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr + - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr - chmod +x ./utr {% endif -%} - - utr --suite=playmode --platform={{ platform.platform }} --editor-location=.Editor --testproject={{ project.path }} --player-save-path=build/players --artifacts_path=build/logs --build-only #all + - ./utr --suite=playmode --platform={{ platform.platform }} --editor-location=.Editor --testproject={{ project.path }} --player-save-path=build/players --artifacts_path=build/logs --build-only #all artifacts: players: paths: From 7d29fb66c1b392ba9318c144955199526af4fd8d Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 5 Aug 2021 22:04:28 +0100 Subject: [PATCH 16/45] no message --- .yamato/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.yamato/build.yml b/.yamato/build.yml index 9c5e10671..0e383ca88 100644 --- a/.yamato/build.yml +++ b/.yamato/build.yml @@ -18,17 +18,17 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: flavor: b1.xlarge commands: - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - - unity-downloader-cli -u {{ editor }} -c editor --wait --published --fast #all + - unity-downloader-cli -u {{ editor }} -c editor --wait --published --fast {% if platform.name == "win" -%} #windows - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr.bat --output utr.bat {% endif -%} {% if platform.name == "mac" or platform.name == "linux" -%} #macos and linux - - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr + - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr - chmod +x ./utr {% endif -%} - - ./utr --suite=playmode --platform={{ platform.platform }} --editor-location=.Editor --testproject={{ project.path }} --player-save-path=build/players --artifacts_path=build/logs --build-only #all + - ./utr --suite=playmode --platform={{ platform.platform }} --editor-location=.Editor --testproject={{ project.path }} --player-save-path=build/players --artifacts_path=build/logs --build-only artifacts: players: paths: From 2d128614c5b54117e814bdcd66bac7707e6c29ec Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 5 Aug 2021 22:18:30 +0100 Subject: [PATCH 17/45] try linux only --- .yamato/build.yml | 51 ++++++++++++++++++++--------------------------- 1 file changed, 22 insertions(+), 29 deletions(-) diff --git a/.yamato/build.yml b/.yamato/build.yml index 0e383ca88..4200a4965 100644 --- a/.yamato/build.yml +++ b/.yamato/build.yml @@ -17,18 +17,11 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: image: sdet/gamecode_win10:latest flavor: b1.xlarge commands: - - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - - unity-downloader-cli -u {{ editor }} -c editor --wait --published --fast -{% if platform.name == "win" -%} #windows - - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr.bat --output utr.bat -{% endif -%} - -{% if platform.name == "mac" or platform.name == "linux" -%} #macos and linux - - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr - - chmod +x ./utr -{% endif -%} - - - ./utr --suite=playmode --platform={{ platform.platform }} --editor-location=.Editor --testproject={{ project.path }} --player-save-path=build/players --artifacts_path=build/logs --build-only + - sudo pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade + - unity-downloader-cli -u trunk -c editor --wait --published --fast + - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr + - chmod +x ./utr + - ./utr --suite=playmode --platform=StandaloneLinux64 --editor-location=.Editor --testproject=. --player-save-path=build/players --artifacts_path=build/logs --build-only artifacts: players: paths: @@ -66,20 +59,20 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: # Run all relevant tasks when a pull request targeting the develop # branch is created or updated. Currently only mlapi package tests are # enabled, since the others are missing test coverage and will fail CI. -develop_pull_request_trigger: - name: Develop Branch Triggers - dependencies: -{% for project in projects -%} -{% for editor in test_editors -%} -{% for platform in test_platforms -%} - - .yamato/build.yml#build_{{ project.name }}_{{ editor }}_{{ platform.name }} -{% endfor -%} -{% endfor -%} -{% endfor -%} - triggers: - cancel_old_ci: true - pull_requests: - - targets: - only: - - "main" - - "develop" \ No newline at end of file +# develop_pull_request_trigger: +# name: Develop Branch Triggers +# dependencies: +# {% for project in projects -%} +# {% for editor in test_editors -%} +# {% for platform in test_platforms -%} +# - .yamato/build.yml#build_{{ project.name }}_{{ editor }}_{{ platform.name }} +# {% endfor -%} +# {% endfor -%} +# {% endfor -%} +# triggers: +# cancel_old_ci: true +# pull_requests: +# - targets: +# only: +# - "main" +# - "develop" \ No newline at end of file From 8bb19dfa34177e5b6bff0e5dca3048dc46c4f89b Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 5 Aug 2021 22:23:37 +0100 Subject: [PATCH 18/45] remove sudo --- .yamato/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.yamato/build.yml b/.yamato/build.yml index 4200a4965..16be64350 100644 --- a/.yamato/build.yml +++ b/.yamato/build.yml @@ -17,7 +17,7 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: image: sdet/gamecode_win10:latest flavor: b1.xlarge commands: - - sudo pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade + - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - unity-downloader-cli -u trunk -c editor --wait --published --fast - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr - chmod +x ./utr From 5b5793afdb453f5be146d451a66e222ffd9b7a8d Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 5 Aug 2021 22:32:47 +0100 Subject: [PATCH 19/45] test --- .yamato/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.yamato/build.yml b/.yamato/build.yml index 16be64350..eed8dad53 100644 --- a/.yamato/build.yml +++ b/.yamato/build.yml @@ -21,7 +21,7 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: - unity-downloader-cli -u trunk -c editor --wait --published --fast - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr - chmod +x ./utr - - ./utr --suite=playmode --platform=StandaloneLinux64 --editor-location=.Editor --testproject=. --player-save-path=build/players --artifacts_path=build/logs --build-only + - ./utr --suite=playmode --platform=StandaloneLinux64 artifacts: players: paths: From e386fd75d29cb1d03d25d6dbd8e7c9bc7db618f7 Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 5 Aug 2021 22:42:40 +0100 Subject: [PATCH 20/45] run ls --- .yamato/build.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.yamato/build.yml b/.yamato/build.yml index eed8dad53..311b0067a 100644 --- a/.yamato/build.yml +++ b/.yamato/build.yml @@ -19,9 +19,11 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: commands: - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - unity-downloader-cli -u trunk -c editor --wait --published --fast - - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr + - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr] + - ls - chmod +x ./utr - - ./utr --suite=playmode --platform=StandaloneLinux64 + - ls + - ./utr --suite=playmode --platform=StandaloneLinux64 --editor-location=.Editor --testproject=. --player-save-path=build/players --artifacts_path=build/logs --build-only artifacts: players: paths: From ca8d80be8eacd0f819568406becb1586ae443dd5 Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 5 Aug 2021 22:45:39 +0100 Subject: [PATCH 21/45] no message --- .yamato/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.yamato/build.yml b/.yamato/build.yml index 311b0067a..57f75a5fa 100644 --- a/.yamato/build.yml +++ b/.yamato/build.yml @@ -19,7 +19,7 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: commands: - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - unity-downloader-cli -u trunk -c editor --wait --published --fast - - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr] + - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr - ls - chmod +x ./utr - ls From 76b1d5340739d16aaa82c9730f52b02d605c2975 Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 5 Aug 2021 22:54:58 +0100 Subject: [PATCH 22/45] finally --- .yamato/build.yml | 60 ++++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/.yamato/build.yml b/.yamato/build.yml index 57f75a5fa..fd3dce477 100644 --- a/.yamato/build.yml +++ b/.yamato/build.yml @@ -10,20 +10,22 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: variables: UTR_VERSION: current agent: - # Do not choose machines with gpus or connected devices to perform this step - # If it takes a lot of time to compile your project prefer flavor with more cores. - # See https://internaldocs.hq.unity3d.com/bokken/reference/flavors/ - type: Unity::VM - image: sdet/gamecode_win10:latest - flavor: b1.xlarge + type: {{ platform.type }} + image: {{ platform.image }} + flavor: {{ platform.flavor}} commands: - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - - unity-downloader-cli -u trunk -c editor --wait --published --fast - - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr - - ls - - chmod +x ./utr - - ls - - ./utr --suite=playmode --platform=StandaloneLinux64 --editor-location=.Editor --testproject=. --player-save-path=build/players --artifacts_path=build/logs --build-only + - unity-downloader-cli -u {{ editor }} -c editor --wait --published --fast +{% if platform.name == "win" -%} #windows + - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr.bat --output utr.bat +{% endif -%} + +{% if platform.name == "mac" or platform.name == "linux" -%} #macos and linux + - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr + - chmod +x ./utr +{% endif -%} + + - ./utr --suite=playmode --platform={{ platform.platform }} --editor-location=.Editor --testproject={{ project.path }} --player-save-path=build/players --artifacts_path=build/logs --build-only artifacts: players: paths: @@ -61,20 +63,20 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: # Run all relevant tasks when a pull request targeting the develop # branch is created or updated. Currently only mlapi package tests are # enabled, since the others are missing test coverage and will fail CI. -# develop_pull_request_trigger: -# name: Develop Branch Triggers -# dependencies: -# {% for project in projects -%} -# {% for editor in test_editors -%} -# {% for platform in test_platforms -%} -# - .yamato/build.yml#build_{{ project.name }}_{{ editor }}_{{ platform.name }} -# {% endfor -%} -# {% endfor -%} -# {% endfor -%} -# triggers: -# cancel_old_ci: true -# pull_requests: -# - targets: -# only: -# - "main" -# - "develop" \ No newline at end of file +develop_pull_request_trigger: + name: Develop Branch Triggers + dependencies: +{% for project in projects -%} +{% for editor in test_editors -%} +{% for platform in test_platforms -%} + - .yamato/build.yml#build_{{ project.name }}_{{ editor }}_{{ platform.name }} +{% endfor -%} +{% endfor -%} +{% endfor -%} + triggers: + cancel_old_ci: true + pull_requests: + - targets: + only: + - "main" + - "develop" \ No newline at end of file From 5ef49245d05f4ce7fc9a2acabe62cdacdc0c8aec Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 12 Aug 2021 07:16:03 +0100 Subject: [PATCH 23/45] temp: test yamato fail --- Basic/2DSpaceShooter/Assets/Scripts/Bullet.cs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Basic/2DSpaceShooter/Assets/Scripts/Bullet.cs b/Basic/2DSpaceShooter/Assets/Scripts/Bullet.cs index 8b29df925..4f54c7023 100644 --- a/Basic/2DSpaceShooter/Assets/Scripts/Bullet.cs +++ b/Basic/2DSpaceShooter/Assets/Scripts/Bullet.cs @@ -8,13 +8,6 @@ public class Bullet : NetworkBehaviour int m_Damage = 5; ShipControl m_Owner; - public GameObject explosionParticle; - - public void Config(ShipControl owner, int damage, bool bounce, float lifetime) - { - m_Owner = owner; - m_Damage = damage; - m_Bounce = bounce; if (IsServer) { From 8ab6750ce1b35c433ebdb9cad724fd337c623a27 Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 12 Aug 2021 10:03:57 +0100 Subject: [PATCH 24/45] try use regular unity build --- .yamato/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.yamato/build.yml b/.yamato/build.yml index fd3dce477..727e6b453 100644 --- a/.yamato/build.yml +++ b/.yamato/build.yml @@ -24,8 +24,9 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr - chmod +x ./utr {% endif -%} + - .Editor\Unity.exe -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildWindowsPlayer build\players\test.exe - - ./utr --suite=playmode --platform={{ platform.platform }} --editor-location=.Editor --testproject={{ project.path }} --player-save-path=build/players --artifacts_path=build/logs --build-only + #- ./utr --suite=playmode --platform={{ platform.platform }} --editor-location=.Editor --testproject={{ project.path }} --player-save-path=build/players --artifacts_path=build/logs --build-only artifacts: players: paths: From 2d7e0273de877de597991d4ba7d4e2fea9c4f9d6 Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 12 Aug 2021 10:12:33 +0100 Subject: [PATCH 25/45] fix path issues and make build succeed --- .yamato/build.yml | 2 +- Basic/2DSpaceShooter/Assets/Scripts/Bullet.cs | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.yamato/build.yml b/.yamato/build.yml index 727e6b453..052d639a7 100644 --- a/.yamato/build.yml +++ b/.yamato/build.yml @@ -24,7 +24,7 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr - chmod +x ./utr {% endif -%} - - .Editor\Unity.exe -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildWindowsPlayer build\players\test.exe + - .Editor/Unity.exe -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildWindowsPlayer build/players/test.exe #- ./utr --suite=playmode --platform={{ platform.platform }} --editor-location=.Editor --testproject={{ project.path }} --player-save-path=build/players --artifacts_path=build/logs --build-only artifacts: diff --git a/Basic/2DSpaceShooter/Assets/Scripts/Bullet.cs b/Basic/2DSpaceShooter/Assets/Scripts/Bullet.cs index 4f54c7023..ef4791a0c 100644 --- a/Basic/2DSpaceShooter/Assets/Scripts/Bullet.cs +++ b/Basic/2DSpaceShooter/Assets/Scripts/Bullet.cs @@ -8,7 +8,13 @@ public class Bullet : NetworkBehaviour int m_Damage = 5; ShipControl m_Owner; + public GameObject explosionParticle; + public void Config(ShipControl owner, int damage, bool bounce, float lifetime) + { + m_Owner = owner; + m_Damage = damage; + m_Bounce = bounce; if (IsServer) { // This is bad code don't use invoke. From 8ee4275fa6652e287009ed7f16fce99caab7a3ba Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 12 Aug 2021 10:21:18 +0100 Subject: [PATCH 26/45] try fix editor path --- .yamato/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.yamato/build.yml b/.yamato/build.yml index 052d639a7..1d8bb34a0 100644 --- a/.yamato/build.yml +++ b/.yamato/build.yml @@ -24,7 +24,7 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr - chmod +x ./utr {% endif -%} - - .Editor/Unity.exe -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildWindowsPlayer build/players/test.exe + - /.Editor/Unity.exe -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildWindowsPlayer build/players/test.exe #- ./utr --suite=playmode --platform={{ platform.platform }} --editor-location=.Editor --testproject={{ project.path }} --player-save-path=build/players --artifacts_path=build/logs --build-only artifacts: From bde5714de9c81c90ac6e162db3fb008da44d8c8b Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 12 Aug 2021 10:28:02 +0100 Subject: [PATCH 27/45] test --- .yamato/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.yamato/build.yml b/.yamato/build.yml index 1d8bb34a0..727e6b453 100644 --- a/.yamato/build.yml +++ b/.yamato/build.yml @@ -24,7 +24,7 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr - chmod +x ./utr {% endif -%} - - /.Editor/Unity.exe -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildWindowsPlayer build/players/test.exe + - .Editor\Unity.exe -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildWindowsPlayer build\players\test.exe #- ./utr --suite=playmode --platform={{ platform.platform }} --editor-location=.Editor --testproject={{ project.path }} --player-save-path=build/players --artifacts_path=build/logs --build-only artifacts: From 95e35124ebb09285a1c04b614921863b8120dd8e Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 12 Aug 2021 10:41:39 +0100 Subject: [PATCH 28/45] fix mac linux --- .yamato/build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.yamato/build.yml b/.yamato/build.yml index 727e6b453..22456eeef 100644 --- a/.yamato/build.yml +++ b/.yamato/build.yml @@ -24,7 +24,13 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr - chmod +x ./utr {% endif -%} + +{% if platform.name == "win" -%} #windows - .Editor\Unity.exe -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildWindowsPlayer build\players\test.exe +{% else -%} + - .Editor/Unity.exe -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildWindowsPlayer build/players/test.exe +{% endif -%} + #- ./utr --suite=playmode --platform={{ platform.platform }} --editor-location=.Editor --testproject={{ project.path }} --player-save-path=build/players --artifacts_path=build/logs --build-only artifacts: From 861ee2620d330b4cd01ac2f9b6c670b39052ac02 Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 12 Aug 2021 10:53:51 +0100 Subject: [PATCH 29/45] actually fix mac linux --- .yamato/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.yamato/build.yml b/.yamato/build.yml index 22456eeef..bf2903112 100644 --- a/.yamato/build.yml +++ b/.yamato/build.yml @@ -28,7 +28,7 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: {% if platform.name == "win" -%} #windows - .Editor\Unity.exe -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildWindowsPlayer build\players\test.exe {% else -%} - - .Editor/Unity.exe -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildWindowsPlayer build/players/test.exe + - .Editor\Unity -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildWindowsPlayer build\players\test.exe {% endif -%} From 8bd3cd79c4b75aa4ba441b902b66d4a205a61bae Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 12 Aug 2021 10:57:54 +0100 Subject: [PATCH 30/45] this should work --- .yamato/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.yamato/build.yml b/.yamato/build.yml index bf2903112..3768952c5 100644 --- a/.yamato/build.yml +++ b/.yamato/build.yml @@ -28,7 +28,7 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: {% if platform.name == "win" -%} #windows - .Editor\Unity.exe -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildWindowsPlayer build\players\test.exe {% else -%} - - .Editor\Unity -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildWindowsPlayer build\players\test.exe + - .Editor/Unity -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildWindowsPlayer build/players/test.exe {% endif -%} From 4e6b86668cbd917c2222cd560446aa9227f182a0 Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 12 Aug 2021 11:09:24 +0100 Subject: [PATCH 31/45] no message --- .yamato/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.yamato/build.yml b/.yamato/build.yml index 3768952c5..b1f536a9d 100644 --- a/.yamato/build.yml +++ b/.yamato/build.yml @@ -28,7 +28,7 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: {% if platform.name == "win" -%} #windows - .Editor\Unity.exe -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildWindowsPlayer build\players\test.exe {% else -%} - - .Editor/Unity -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildWindowsPlayer build/players/test.exe + - .Editor/Unity.app -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildWindowsPlayer build/players/test.exe {% endif -%} From e594988139e191537e2263b2ef7a655fcb3a5ff1 Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 12 Aug 2021 11:16:40 +0100 Subject: [PATCH 32/45] no message --- .yamato/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.yamato/build.yml b/.yamato/build.yml index b1f536a9d..c5f6ea976 100644 --- a/.yamato/build.yml +++ b/.yamato/build.yml @@ -28,7 +28,7 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: {% if platform.name == "win" -%} #windows - .Editor\Unity.exe -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildWindowsPlayer build\players\test.exe {% else -%} - - .Editor/Unity.app -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildWindowsPlayer build/players/test.exe + - ./.Editor/Unity.app -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildWindowsPlayer build/players/test {% endif -%} From ed04b973405a75944779e67a5b9f27f296a247ac Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 12 Aug 2021 11:27:08 +0100 Subject: [PATCH 33/45] tree --- .yamato/build.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.yamato/build.yml b/.yamato/build.yml index c5f6ea976..abd8aac4f 100644 --- a/.yamato/build.yml +++ b/.yamato/build.yml @@ -16,19 +16,12 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: commands: - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - unity-downloader-cli -u {{ editor }} -c editor --wait --published --fast -{% if platform.name == "win" -%} #windows - - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr.bat --output utr.bat -{% endif -%} - -{% if platform.name == "mac" or platform.name == "linux" -%} #macos and linux - - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr - - chmod +x ./utr -{% endif -%} {% if platform.name == "win" -%} #windows - .Editor\Unity.exe -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildWindowsPlayer build\players\test.exe {% else -%} - - ./.Editor/Unity.app -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildWindowsPlayer build/players/test + - tree -a + - ./.Editor/Unity.app -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildWindowsPlayer ./build/players/test {% endif -%} From 586165046e11b0f7d2bd0a6418c31676932ea184 Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 12 Aug 2021 11:42:15 +0100 Subject: [PATCH 34/45] no message --- .yamato/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.yamato/build.yml b/.yamato/build.yml index abd8aac4f..877383514 100644 --- a/.yamato/build.yml +++ b/.yamato/build.yml @@ -20,7 +20,8 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: {% if platform.name == "win" -%} #windows - .Editor\Unity.exe -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildWindowsPlayer build\players\test.exe {% else -%} - - tree -a + - cd .Editor + - ls - ./.Editor/Unity.app -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildWindowsPlayer ./build/players/test {% endif -%} From 2f28aa18c6fa1a4d19a3dcb0682af8e98b89e3e0 Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 12 Aug 2021 11:56:54 +0100 Subject: [PATCH 35/45] no message --- .yamato/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.yamato/build.yml b/.yamato/build.yml index 877383514..f8b974097 100644 --- a/.yamato/build.yml +++ b/.yamato/build.yml @@ -20,6 +20,7 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: {% if platform.name == "win" -%} #windows - .Editor\Unity.exe -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildWindowsPlayer build\players\test.exe {% else -%} + - ls - cd .Editor - ls - ./.Editor/Unity.app -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildWindowsPlayer ./build/players/test From 77c26638c31307156095bf5f583201a226ec7e3b Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 12 Aug 2021 13:26:42 +0100 Subject: [PATCH 36/45] no message --- .yamato/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.yamato/build.yml b/.yamato/build.yml index f8b974097..0559be72d 100644 --- a/.yamato/build.yml +++ b/.yamato/build.yml @@ -20,9 +20,10 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: {% if platform.name == "win" -%} #windows - .Editor\Unity.exe -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildWindowsPlayer build\players\test.exe {% else -%} - - ls + - ls -d - cd .Editor - ls + - ls -d - ./.Editor/Unity.app -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildWindowsPlayer ./build/players/test {% endif -%} From 3d56f1f8ad425ecda2fb39ad772f8bc245b0a4a6 Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 12 Aug 2021 13:33:24 +0100 Subject: [PATCH 37/45] no message --- .yamato/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.yamato/build.yml b/.yamato/build.yml index 0559be72d..f7790c837 100644 --- a/.yamato/build.yml +++ b/.yamato/build.yml @@ -21,7 +21,7 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: - .Editor\Unity.exe -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildWindowsPlayer build\players\test.exe {% else -%} - ls -d - - cd .Editor + - cd . - ls - ls -d - ./.Editor/Unity.app -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildWindowsPlayer ./build/players/test From 5e63e63b82ff5c5871e8fd7bfcc6c9118d1366ec Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 12 Aug 2021 13:46:49 +0100 Subject: [PATCH 38/45] try macos --- .yamato/build.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.yamato/build.yml b/.yamato/build.yml index f7790c837..78003f2f4 100644 --- a/.yamato/build.yml +++ b/.yamato/build.yml @@ -20,15 +20,9 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: {% if platform.name == "win" -%} #windows - .Editor\Unity.exe -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildWindowsPlayer build\players\test.exe {% else -%} - - ls -d - - cd . - - ls - - ls -d - - ./.Editor/Unity.app -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildWindowsPlayer ./build/players/test + - .Editor/Unity.app/Contents/MacOS/Unity -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildWindowsPlayer ./build/players/test {% endif -%} - - #- ./utr --suite=playmode --platform={{ platform.platform }} --editor-location=.Editor --testproject={{ project.path }} --player-save-path=build/players --artifacts_path=build/logs --build-only artifacts: players: paths: From 73dbabb5db2cf3a4a62d4afd18a5816d1458c69c Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 12 Aug 2021 13:48:57 +0100 Subject: [PATCH 39/45] macos build fix --- .yamato/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.yamato/build.yml b/.yamato/build.yml index 78003f2f4..ef9a84f91 100644 --- a/.yamato/build.yml +++ b/.yamato/build.yml @@ -20,7 +20,7 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: {% if platform.name == "win" -%} #windows - .Editor\Unity.exe -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildWindowsPlayer build\players\test.exe {% else -%} - - .Editor/Unity.app/Contents/MacOS/Unity -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildWindowsPlayer ./build/players/test + - .Editor/Unity.app/Contents/MacOS/Unity -projectpath {{ project.path }} -batchmode -quit -logfile build.log -buildOSXUniversalPlayer ./build/players/test {% endif -%} artifacts: From 00431a3d67f87dc1bcdebcd234997eab4280265c Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 12 Aug 2021 14:12:16 +0100 Subject: [PATCH 40/45] CI on spaceshooter and invaders for macos and linux --- .yamato/build.yml | 22 ---------------------- .yamato/project.metafile | 9 +++------ 2 files changed, 3 insertions(+), 28 deletions(-) diff --git a/.yamato/build.yml b/.yamato/build.yml index ef9a84f91..b8560a730 100644 --- a/.yamato/build.yml +++ b/.yamato/build.yml @@ -31,28 +31,6 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: paths: - "build/logs/**" -# run_{{ project.name }}_{{ editor }}_{{ platform.name }}: -# name: Run Test on a windows64 standalone player -# variables: -# UTR_VERSION: current -# # no need to clone repo -# skip_checkout: true -# agent: -# # Running tests is fast, building it not requried, therefore flavor can be smaller. see https://internaldocs.hq.unity3d.com/bokken/reference/flavors/ -# # Now we can use an 'expensive' type. -# type: Unity::VM -# image: sdet/gamecode_win10:latest -# flavor: b1.large -# dependencies: -# - .yamato/standalone_windows64.yml#build_{{ project.name }}_{{ editor }}_{{ platform.name }} -# commands: -# - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr.bat --output utr.bat -# - ./utr --suite=playmode --platform=StandaloneWindows64 --player-load-path=build/players --artifacts_path=build/test-results --player-connection-ip=auto -# artifacts: -# logs: -# paths: -# - "build/test-results/**" - {% endfor -%} {% endfor -%} {% endfor -%} diff --git a/.yamato/project.metafile b/.yamato/project.metafile index 4363565b0..96cd05177 100644 --- a/.yamato/project.metafile +++ b/.yamato/project.metafile @@ -19,14 +19,11 @@ test_platforms: image: package-ci/mac:stable platform: StandaloneOSX flavor: m1.mac - - name: linux - type: Unity::VM - image: package-ci/ubuntu:stable - platform: StandaloneLinux64 - flavor: b1.large # Projects within the repository that will be tested. Name will be used # for job ids, so it should not contain spaces/non-supported characters projects: - name: 2dspaceshooter - path: Basic/2DSpaceShooter \ No newline at end of file + path: Basic/2DSpaceShooter + - name: invaders + path: Basic/Invaders \ No newline at end of file From 71bbe8d26379091794b7e30a8aa852cf2b7b67b9 Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 12 Aug 2021 14:57:39 +0100 Subject: [PATCH 41/45] final test fail --- Basic/Invaders/Assets/Scripts/InvadersGame.cs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/Basic/Invaders/Assets/Scripts/InvadersGame.cs b/Basic/Invaders/Assets/Scripts/InvadersGame.cs index 46e78b5bc..c38695601 100644 --- a/Basic/Invaders/Assets/Scripts/InvadersGame.cs +++ b/Basic/Invaders/Assets/Scripts/InvadersGame.cs @@ -11,19 +11,7 @@ public enum InvadersObjectType { - Enemy = 1, - Shield, - Max -} -[Flags] -public enum UpdateEnemiesResultFlags : byte -{ - None = 0x0000, - FoundEnemy = 0x0001, // Found at least one eligible enemy to continue, without creating a new set - ReachedHorizontalBoundary = 0x0002, // If at least one of the enemies reached either left or right boundary - ReachedBottom = 0x004, // If at least one of the enemies reached the bottom boundary the game is over - Max } public enum GameOverReason : byte From 8829e532c84bc620de4b7b2022395a26945a07f4 Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 12 Aug 2021 15:30:06 +0100 Subject: [PATCH 42/45] Revert "final test fail" This reverts commit 71bbe8d26379091794b7e30a8aa852cf2b7b67b9. --- Basic/Invaders/Assets/Scripts/InvadersGame.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Basic/Invaders/Assets/Scripts/InvadersGame.cs b/Basic/Invaders/Assets/Scripts/InvadersGame.cs index c38695601..46e78b5bc 100644 --- a/Basic/Invaders/Assets/Scripts/InvadersGame.cs +++ b/Basic/Invaders/Assets/Scripts/InvadersGame.cs @@ -11,7 +11,19 @@ public enum InvadersObjectType { + Enemy = 1, + Shield, + Max +} +[Flags] +public enum UpdateEnemiesResultFlags : byte +{ + None = 0x0000, + FoundEnemy = 0x0001, // Found at least one eligible enemy to continue, without creating a new set + ReachedHorizontalBoundary = 0x0002, // If at least one of the enemies reached either left or right boundary + ReachedBottom = 0x004, // If at least one of the enemies reached the bottom boundary the game is over + Max } public enum GameOverReason : byte From 24b39a1b693e9e270791e2ce91796dd483499986 Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 12 Aug 2021 15:31:09 +0100 Subject: [PATCH 43/45] Final CI changes --- .yamato/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.yamato/build.yml b/.yamato/build.yml index b8560a730..de4512189 100644 --- a/.yamato/build.yml +++ b/.yamato/build.yml @@ -6,7 +6,7 @@ {% for platform in test_platforms -%} build_{{ project.name }}_{{ editor }}_{{ platform.name }}: - name: Build Project {{ projects.first.name }} - Package {{ package.name }} - {{ editor }} on {{ platform.name }} + name: Build Project {{ project.name }} - Package {{ package.name }} - {{ editor }} on {{ platform.name }} variables: UTR_VERSION: current agent: From da8f45f7d008b0d96b9e4815e328e63b7c7fb3b0 Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 12 Aug 2021 15:35:48 +0100 Subject: [PATCH 44/45] revert change made by mistake --- Basic/2DSpaceShooter/Assets/Scripts/Bullet.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Basic/2DSpaceShooter/Assets/Scripts/Bullet.cs b/Basic/2DSpaceShooter/Assets/Scripts/Bullet.cs index ef4791a0c..6cabb78dd 100644 --- a/Basic/2DSpaceShooter/Assets/Scripts/Bullet.cs +++ b/Basic/2DSpaceShooter/Assets/Scripts/Bullet.cs @@ -15,6 +15,7 @@ public void Config(ShipControl owner, int damage, bool bounce, float lifetime) m_Owner = owner; m_Damage = damage; m_Bounce = bounce; + if (IsServer) { // This is bad code don't use invoke. From 387063217594e60b16e008965d327ab145174125 Mon Sep 17 00:00:00 2001 From: Luke Stampfli Date: Thu, 12 Aug 2021 15:38:31 +0100 Subject: [PATCH 45/45] update comment --- .yamato/build.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.yamato/build.yml b/.yamato/build.yml index de4512189..80ac61f5d 100644 --- a/.yamato/build.yml +++ b/.yamato/build.yml @@ -35,9 +35,7 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}: {% endfor -%} {% endfor -%} -# Run all relevant tasks when a pull request targeting the develop -# branch is created or updated. Currently only mlapi package tests are -# enabled, since the others are missing test coverage and will fail CI. +# Run all relevant tasks when a pull request targeting the develop / main develop_pull_request_trigger: name: Develop Branch Triggers dependencies: