Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
cbb4568
feat: dgs core [MTT-6058] (#1)
Sep 28, 2023
95678c4
feat: adding dedicated server package to DGS sample [MTT-6834] (#2)
Oct 23, 2023
0ae3671
Merge branch 'develop' into sample/DGS
Oct 23, 2023
a7bbdca
feature: adding DGS sample to CI [MTT-7459] (#3)
Oct 25, 2023
4c1e416
feat: player character and base level design [MTT-6059][MTT-7372][MTT…
Nov 1, 2023
41c4457
feat: DGS Sample AI characters [MTT-6062] (#6)
Nov 15, 2023
14ff3bb
feature: add readme to DGS sample (#7)
Jan 7, 2024
0b1a346
Merge branch 'main' into develop
fernando-cortez Jan 16, 2024
8e2fbaa
Project version upgrade + mini fix [MTT-7789] (#10)
Jan 18, 2024
adc44f9
Doors integration [MTT-6061] (#12)
Jan 22, 2024
4fca0df
chore: updated multiplayer packages to solve UGS integration issues
Jan 25, 2024
ffea108
DGS door UI (#13)
Jan 29, 2024
fdd2f39
DGS readme corrections [MTT-7869] (#14)
Feb 5, 2024
e6cbd25
Feature: Dedicated Game Server Sample Art Pass [MTT-7403] (#8)
jilfranco-unity Feb 5, 2024
257eddf
merge with public/develop
RikuTheFuffs Feb 6, 2024
a8a31a2
MTT-7858: Make ParrelSync window interactable in tutorial (#155)
Elfi0Kuhndorf Feb 16, 2024
672d472
[DGS] Unneded systems strip [MTT-8054] (#15)
Feb 19, 2024
95578d3
Fixed incorrect CI settings (#16)
Feb 19, 2024
449e70b
Merge branch 'main' into develop
fernando-cortez Mar 4, 2024
66e05ca
feat: dotnet standards tests + formatting pass on samples [MTT-5183] …
fernando-cortez Mar 14, 2024
a85144c
chore: updated dedicated server and multiplayer play mode packages to…
Mar 18, 2024
1bcb86d
merge with develop
Mar 19, 2024
40649a1
chore: updated documentation links
Mar 20, 2024
917fe32
chore: removed unneeded folders
Mar 20, 2024
fc7db39
Revert "merge with develop"
Mar 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
43 changes: 43 additions & 0 deletions .yamato/_triggers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{% metadata_file .yamato/project.metafile %}
---

# Run all relevant tasks when a pull request targets the develop / main or a sample branch
pull_request_trigger:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to add specific yml files for the triggers and the tests.

However, inside the previous build.yml file, the old pull request trigger job remains. I'm fine with removing that one out of the build.yml file and keeping this here, but let's also move over the standard pass that was recently added as a dependency to our pull request triggers.

On that note, project-standards.yml seems to have been removed. Let's revisit that merge and get that file back, so that the job would fire, since the job def file isn't actually compiling on Yamato (both build.yml & project-standards.yml). See the branch here: https://unity-ci.cds.internal.unity3d.com/project/1573/branch/sample%2FDGS?nav=jobDefinitions.

Last note about the project tests, could we leverage UPM-CI tools here, since I'm seeing that there's an individual job to build a project for every supported platform? You can notice that the dependency graph on Boss Room's pull request trigger job has one packing job, in which the 3 project tests refer to that artifact.

I'm thinking, every project is packed, and we use the booleans (run_editor_tests & run_playmode_tests) inside the projects to determine whether a project test is run, like you've done here. So we would shrink by a lot the number of jobs run.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disclaimer: these changes were made by LP, months ago, so I don't have the full context of "why" they were made.

On that note, project-standards.yml seems to have been removed. Let's revisit that merge and get that file back, so that the job would fire

I'll open a new branch to start from a point before the merge (reverting it doesn't seem enough, this PR still tries to delete the Anticipation Sample) and open a new PR. If the issues persist there, we'll fix them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On that note, project-standards.yml seems to have been removed.

project-standards is not present in main either. It's only in develop.
It seems that develop hasn't been merged into main yet.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah okay noted! And yes I wrote that before noticing that this was targeting develop. I'll check out the other PR.

name: Pull Request Trigger (main, develop, & sample branches)
dependencies:
{% for project in projects -%}
{% for editor in project.test_editors -%}
{% for platform in test_platforms -%}
- .yamato/build.yml#build_{{ project.name }}_{{ editor }}_{{ platform.name }}
{% if project.run_editor_tests or project.run_playmode_tests -%} # Only run tests for projects where relevant
- .yamato/tests.yml#test_{{ project.name }}_{{ editor }}_{{ platform.name }}
{% endif -%}
{% endfor -%}
{% endfor -%}
{% endfor -%}
triggers:
cancel_old_ci: true
pull_requests:
- targets:
only:
- "main"
- "develop"
- "/^sample\//"

# Run all tasks on the bitesize sample develop branch (head) when there is a push to the Netcode for GameObjects develop branch
external_ngo_develop_pull_request_trigger:
name: Netcode for GameObjects (External) Develop Branch Triggers
dependencies:
{% for project in projects -%}
{% for editor in project.test_editors -%}
{% for platform in test_platforms -%}
- .yamato/build.yml#build_{{ project.name }}_{{ editor }}_{{ platform.name }}
{% endfor -%}
{% endfor -%}
{% endfor -%}
triggers:
external:
source: git@github.com/Unity-Technologies/com.unity.netcode.gameobjects.git
expression: push.branch eq "develop"
refs_on_this_repository:
- develop
60 changes: 17 additions & 43 deletions .yamato/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
---

{% for project in projects -%}
{% for editor in test_editors -%}
{% for editor in project.test_editors -%}
{% for platform in test_platforms -%}

build_{{ project.name }}_{{ editor }}_{{ platform.name }}:
name: Build Project {{ project.name }} - Package {{ package.name }} - {{ editor }} on {{ platform.name }}
variables:
Expand All @@ -15,59 +14,34 @@ build_{{ project.name }}_{{ editor }}_{{ platform.name }}:
flavor: {{ platform.flavor}}
commands:
- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade
{% if project.name == "dedicatedgameserver" -%} #dedicatedgameserver sample builds via custom editor script. This script generates client and server builds on the Mac, Windows, and Linux platforms
- unity-downloader-cli -u {{ editor }} -c editor -c macOS -c Windows -c Linux -c macOSDedicatedServerBuildSupport -c LinuxDedicatedServerBuildSupport -c WindowsDedicatedServerBuildSupport --wait --published --fast
{% if platform.name == "win" -%} #windows
- .Editor\Unity.exe -batchmode -nographics -logfile build.log -executeMethod Unity.DedicatedGameServerSample.Editor.BuildHelpers.BuildEverything -projectPath {{ project.path }} -quit
{% else -%}
- .Editor/Unity.app/Contents/MacOS/Unity -batchmode -nographics -logfile build.log -executeMethod Unity.DedicatedGameServerSample.Editor.BuildHelpers.BuildEverything -projectPath {{ project.path }} -quit
{% endif -%}
{% else -%}
- unity-downloader-cli -u {{ editor }} -c editor --wait --published --fast

{% 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 -buildOSXUniversalPlayer ./build/players/test
{% endif -%}
{% endif -%}

artifacts:
players:
paths:
- "build/players/**"
{% if project.name == "dedicatedgameserver" -%} #dedicatedgameserver sample builds via custom editor script into different location
- "{{ project.path }}/Builds/**"
{% else -%}
- "{{ project.path }}/build/players/**"
{% endif -%}
logs:
paths:
- "build/logs/**"

{% endfor -%}
{% endfor -%}
{% endfor -%}
- "build.log"

# Run all relevant tasks when a pull request targeting the develop / main
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"

# Run all tasks on the bitesize sample develop branch (head) when there is a push to the Netcode for GameObjects develop branch
external_ngo_develop_pull_request_trigger:
name: Netcode for GameObjects (External) 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:
external:
source: git@github.com/Unity-Technologies/com.unity.netcode.gameobjects.git
expression: push.branch eq "develop"
refs_on_this_repository:
- develop
{% endfor -%}
50 changes: 37 additions & 13 deletions .yamato/project.metafile
Original file line number Diff line number Diff line change
@@ -1,35 +1,59 @@
# 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:
- 2022.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
image: package-ci/win10:v4.36.0
platform: StandaloneWindows64
flavor: b1.large
- name: mac
type: Unity::VM::osx
image: package-ci/mac:stable
image: package-ci/macos-13:v4
platform: StandaloneOSX
flavor: m1.mac

# 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 within the repository that will be tested. Name will be used for job ids, so it should not contain spaces/non-supported characters
# The test-editors field is for 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'
projects:
- name: 2dspaceshooter
path: Basic/2DSpaceShooter
test_editors:
- 2022.3
run_editor_tests: !!bool false
run_playmode_tests: !!bool false
test_filter:
- name: invaders
path: Basic/Invaders
test_editors:
- 2022.3
run_editor_tests: !!bool false
run_playmode_tests: !!bool false
test_filter:
- name: clientdriven
path: Basic/ClientDriven
test_editors:
- 2022.3
run_editor_tests: !!bool false
run_playmode_tests: !!bool false
test_filter:
- name: dynamicaddressablesnetworkprefabs
path: Basic/DynamicAddressablesNetworkPrefabs
test_editors:
- 2022.3
run_editor_tests: !!bool false
run_playmode_tests: !!bool false
test_filter:
- name: dedicatedgameserver
path: Experimental/DedicatedGameServer
test_editors:
- 2023.3.0a17
run_editor_tests: !!bool false
run_playmode_tests: !!bool true
test_filter: Unity.DedicatedGameServerSample.Tests
- name: multiplayerusecases
path: Experimental/MultiplayerUsecases
path: Experimental/MultiplayerUseCases
test_editors:
- 2022.3
run_editor_tests: !!bool true
run_playmode_tests: !!bool false
43 changes: 43 additions & 0 deletions .yamato/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{% metadata_file .yamato/project.metafile %}
---

{% for project in projects -%}
{% for editor in project.test_editors -%}
{% for platform in test_platforms -%}
test_{{ project.name }}_{{ editor }}_{{ platform.name }}:
name: {{ project.name }} project tests - {{ editor }} on {{ platform.name }}
variables:
UTR_VERSION: current
agent:
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
- unity-downloader-cli -u {{ editor }} -c editor -w --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
{% if project.run_editor_tests -%} # Only run editor tests for projects where relevant
- utr --suite=editor --editor-location=.Editor --testproject={{ project.path }} --testfilter={{ project.test_filter }} --artifacts-path=testlogs
{% endif -%}
{% if project.run_playmode_tests -%} # Only run playmode tests for projects where relevant
- utr --suite=playmode --editor-location=.Editor --testproject={{ project.path }} --testfilter={{ project.test_filter }} --artifacts-path=testlogs
{% endif -%}
{% else -%}
- curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr
- chmod +x utr
{% if project.run_editor_tests -%} # Only run editor tests for projects where relevant
- ./utr --suite=editor --editor-location=.Editor --testproject={{ project.path }} --testfilter={{ project.test_filter }} --artifacts-path=testlogs
{% endif -%}
{% if project.run_playmode_tests -%} # Only run playmode tests for projects where relevant
- ./utr --suite=playmode --editor-location=.Editor --testproject={{ project.path }} --testfilter={{ project.test_filter }} --artifacts-path=testlogs
{% endif -%}
{% endif -%}
artifacts:
logs:
paths:
- "testlogs/**"

{% endfor -%}
{% endfor -%}
{% endfor -%}
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@
- Upgraded to Netcode for GameObjects v1.6.0 (#134)
- Upgraded sample to 2022.3.9f1 LTS (#134)

## [Unreleased]

### Dedicated Game Server
todo: the changelog entry for this sample will be updated with subsequent PRs before being merged when ready

- New Dedicated Game Server sample. (#1) This sample's goal is to demonstrate how to use the different tools and packages available to create a game using the dedicated server approach. It requires editor version 2023.3.

## [1.3.0] - 2023-07-07

### Dynamic Addressables Network Prefabs
Expand Down

This file was deleted.

Loading