From 0c49262c48070ee537892c92d61bcc58f6420ef2 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Wed, 17 Sep 2025 14:06:01 +0200 Subject: [PATCH 01/12] Added GitHub workflow to prevent PR from merging when checks are running --- .github/workflows/all-checks-pass.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/all-checks-pass.yml diff --git a/.github/workflows/all-checks-pass.yml b/.github/workflows/all-checks-pass.yml new file mode 100644 index 0000000000..7409dcd49f --- /dev/null +++ b/.github/workflows/all-checks-pass.yml @@ -0,0 +1,19 @@ +# Check based on https://github.com/marketplace/actions/allcheckspassed to prevent PRs from merging when there is no required checks but some jobs are running + +name: All checks pass verification +on: + pull_request: + types: [ opened, synchronize, reopened, ready_for_review ] + +jobs: + allchecks: + runs-on: ubuntu-latest + permissions: + checks: read + contents: read + steps: + - uses: wechuli/allcheckspassed@v1 + with: + delay: '1' + retries: '48' + polling_interval: '5' \ No newline at end of file From 121d8033f5ad744b19e99919657f69b52430a4a7 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Wed, 17 Sep 2025 14:14:52 +0200 Subject: [PATCH 02/12] Added minimal required job set --- .yamato/_triggers.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.yamato/_triggers.yml b/.yamato/_triggers.yml index 549e90ccdb..bdb557e308 100644 --- a/.yamato/_triggers.yml +++ b/.yamato/_triggers.yml @@ -42,6 +42,20 @@ #----------------------------------------------------------------------------------- +# After some experimenting with CI setups we discovered that even though sometimes we don't need CI to run (no reason to run package tests if only Documentation is changed) there are some checks that devs may not realize but changes in seemingly unrelated files will cause their failures +# This trigger was created to ensure that ALL PRs run this minimal check even when we don't need to run full tests +minimal_required_checks_trigger: + name: Minimal PR check (develop, develop-2.0.0 & release branches) + dependencies: + - .yamato/package-pack.yml#package_pack_-_ngo_win + - .yamato/project-standards.yml#standards_ubuntu_testproject_trunk + triggers: + expression: |- + (pull_request.target eq "develop" OR + pull_request.target eq "develop-2.0.0" OR + pull_request.target match "release/*") AND + NOT pull_request.draft + cancel_old_ci: true # Run all relevant tasks when a pull request targeting the develop or release branch is created or updated. # In order to have better coverage we run desktop standalone tests with different configurations which allows to mostly cover for different platforms, scripting backends and editor versions. From 1d8fdfb0cd07d21626895b3fd7939d7a2f209f79 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Wed, 17 Sep 2025 14:27:00 +0200 Subject: [PATCH 03/12] changed delay and interval --- .github/workflows/all-checks-pass.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/all-checks-pass.yml b/.github/workflows/all-checks-pass.yml index 7409dcd49f..cf14ef08f8 100644 --- a/.github/workflows/all-checks-pass.yml +++ b/.github/workflows/all-checks-pass.yml @@ -14,6 +14,6 @@ jobs: steps: - uses: wechuli/allcheckspassed@v1 with: - delay: '1' - retries: '48' - polling_interval: '5' \ No newline at end of file + delay: '0' + retries: '100' + polling_interval: '3' \ No newline at end of file From f94cbc82a8dab1a78dd5a08f6db64029198992b6 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Fri, 19 Sep 2025 12:39:39 +0200 Subject: [PATCH 04/12] Removed allcheckspassed GitHub action and added spare checkout rule for Yamato job --- .github/workflows/all-checks-pass.yml | 19 -------- .sparse-checkout-rules/pr-trigger.patterns | 2 + .yamato/_triggers.yml | 51 ++++++++++++---------- 3 files changed, 31 insertions(+), 41 deletions(-) delete mode 100644 .github/workflows/all-checks-pass.yml create mode 100644 .sparse-checkout-rules/pr-trigger.patterns diff --git a/.github/workflows/all-checks-pass.yml b/.github/workflows/all-checks-pass.yml deleted file mode 100644 index cf14ef08f8..0000000000 --- a/.github/workflows/all-checks-pass.yml +++ /dev/null @@ -1,19 +0,0 @@ -# Check based on https://github.com/marketplace/actions/allcheckspassed to prevent PRs from merging when there is no required checks but some jobs are running - -name: All checks pass verification -on: - pull_request: - types: [ opened, synchronize, reopened, ready_for_review ] - -jobs: - allchecks: - runs-on: ubuntu-latest - permissions: - checks: read - contents: read - steps: - - uses: wechuli/allcheckspassed@v1 - with: - delay: '0' - retries: '100' - polling_interval: '3' \ No newline at end of file diff --git a/.sparse-checkout-rules/pr-trigger.patterns b/.sparse-checkout-rules/pr-trigger.patterns new file mode 100644 index 0000000000..20a214becf --- /dev/null +++ b/.sparse-checkout-rules/pr-trigger.patterns @@ -0,0 +1,2 @@ +/com.unity.netcde.gameobjects/ +/testproject/ \ No newline at end of file diff --git a/.yamato/_triggers.yml b/.yamato/_triggers.yml index bdb557e308..cca63f857a 100644 --- a/.yamato/_triggers.yml +++ b/.yamato/_triggers.yml @@ -42,28 +42,39 @@ #----------------------------------------------------------------------------------- -# After some experimenting with CI setups we discovered that even though sometimes we don't need CI to run (no reason to run package tests if only Documentation is changed) there are some checks that devs may not realize but changes in seemingly unrelated files will cause their failures -# This trigger was created to ensure that ALL PRs run this minimal check even when we don't need to run full tests -minimal_required_checks_trigger: - name: Minimal PR check (develop, develop-2.0.0 & release branches) +pull_request_trigger: + name: Pull Request Trigger (develop, develop-2.0.0, & release branches) + # Run the following tests on a selection of different desktop platforms dependencies: - - .yamato/package-pack.yml#package_pack_-_ngo_win - - .yamato/project-standards.yml#standards_ubuntu_testproject_trunk + - .yamato/_triggers#minimal_required_checks + - .yamato/_triggers#code_changes_check triggers: + # Note that PR tests will run ONLY if we are changing package/sample code. If changes are let's say docs only no tests will be triggered + # TODO: consider setting up and running tests from Examples/ + # TODO: or docs only changes are spelling/link check expression: |- - (pull_request.target eq "develop" OR + pull_request.comment eq "ngo" OR + ((pull_request.target eq "develop" OR pull_request.target eq "develop-2.0.0" OR pull_request.target match "release/*") AND NOT pull_request.draft cancel_old_ci: true +# After some experimenting with CI setups we discovered that even though sometimes we don't need CI to run (no reason to run package tests if only Documentation is changed) there are some checks that devs may not realize but changes in seemingly unrelated files will cause their failures +# This trigger was created to ensure that ALL PRs run this minimal check even when we don't need to run full tests +minimal_required_checks: + name: Minimal PR check (develop, develop-2.0.0 & release branches) + dependencies: + - .yamato/package-pack.yml#package_pack_-_ngo_win + - .yamato/project-standards.yml#standards_ubuntu_testproject_trunk + # Run all relevant tasks when a pull request targeting the develop or release branch is created or updated. # In order to have better coverage we run desktop standalone tests with different configurations which allows to mostly cover for different platforms, scripting backends and editor versions. # This job will FIRST run "run_quick_checks" jobs (defined in _run-all.yml) since it's the dependency of project pack jobs which is on the lowest dependency tier. This runs the fastest checks (like PVP or code standards) and ONLY IF those pass it will run the rest of the tests. # This optimization allows to speed up feedback look for any "obvious" errors and save resources. # Since standards job is a part of initial checks it's not present as direct dependency here!!!!!!!!!!!!!!!!!!!! -pull_request_trigger: - name: Pull Request Trigger (develop, develop-2.0.0, & release branches) +code_changes_check: + name: Package/Project Changes Trigger (develop, develop-2.0.0, & release branches) # Run the following tests on a selection of different desktop platforms dependencies: # Run package EditMode and Playmode package tests on trunk and an older supported editor (6000.0) @@ -78,19 +89,15 @@ pull_request_trigger: # Coverage on other standalone machines is present in Nightly job so it's enough to not run all of them for PRs - .yamato/desktop-standalone-tests.yml#desktop_standalone_test_testproject_win_il2cpp_6000.0 - .yamato/cmb-service-standalone-tests.yml#cmb_service_standalone_test_testproject_ubuntu_il2cpp_trunk - triggers: - # Note that PR tests will run ONLY if we are changing package/sample code. If changes are let's say docs only no tests will be triggered - # TODO: consider setting up and running tests from Examples/ - # TODO: or docs only changes are spelling/link check - expression: |- - pull_request.comment eq "ngo" OR - ((pull_request.target eq "develop" OR - pull_request.target eq "develop-2.0.0" OR - pull_request.target match "release/*") AND - NOT pull_request.draft AND - (pull_request.changes.any match "com.unity.netcode.gameobjects/**" OR - pull_request.changes.any match "testproject/**")) - cancel_old_ci: true + source: + files: + sparse_checkout_rules: .sparse-checkout-rules/pr-triger.patterns + + + + + + # Run all tests on trunk on nightly basis. # Same subset as pull_request_trigger with addition of mobile/desktop/console tests and webgl builds From 9c2e15e6367c689e293854968a599611d2285ae6 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Fri, 19 Sep 2025 12:41:02 +0200 Subject: [PATCH 05/12] removed BOM --- .sparse-checkout-rules/pr-trigger.patterns | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.sparse-checkout-rules/pr-trigger.patterns b/.sparse-checkout-rules/pr-trigger.patterns index 20a214becf..7b7eb2a267 100644 --- a/.sparse-checkout-rules/pr-trigger.patterns +++ b/.sparse-checkout-rules/pr-trigger.patterns @@ -1,2 +1,2 @@ -/com.unity.netcde.gameobjects/ +/com.unity.netcde.gameobjects/ /testproject/ \ No newline at end of file From 04c0abf5146506a061dc5422ca9e95ce8aa9f749 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Fri, 19 Sep 2025 12:49:18 +0200 Subject: [PATCH 06/12] typo --- .yamato/_triggers.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.yamato/_triggers.yml b/.yamato/_triggers.yml index cca63f857a..254bdc21ce 100644 --- a/.yamato/_triggers.yml +++ b/.yamato/_triggers.yml @@ -46,8 +46,8 @@ pull_request_trigger: name: Pull Request Trigger (develop, develop-2.0.0, & release branches) # Run the following tests on a selection of different desktop platforms dependencies: - - .yamato/_triggers#minimal_required_checks - - .yamato/_triggers#code_changes_check + - .yamato/_triggers.yml#minimal_required_checks + - .yamato/_triggers.yml#code_changes_check triggers: # Note that PR tests will run ONLY if we are changing package/sample code. If changes are let's say docs only no tests will be triggered # TODO: consider setting up and running tests from Examples/ From 8ba10475cec3319a05c10a4f035be12e7990e4d5 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Fri, 19 Sep 2025 12:50:46 +0200 Subject: [PATCH 07/12] format --- .yamato/_triggers.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.yamato/_triggers.yml b/.yamato/_triggers.yml index 254bdc21ce..0ce5b06a2d 100644 --- a/.yamato/_triggers.yml +++ b/.yamato/_triggers.yml @@ -53,10 +53,10 @@ pull_request_trigger: # TODO: consider setting up and running tests from Examples/ # TODO: or docs only changes are spelling/link check expression: |- - pull_request.comment eq "ngo" OR - ((pull_request.target eq "develop" OR + (pull_request.comment eq "ngo" OR + (pull_request.target eq "develop" OR pull_request.target eq "develop-2.0.0" OR - pull_request.target match "release/*") AND + pull_request.target match "release/*")) AND NOT pull_request.draft cancel_old_ci: true From f9693305950d3fdae5f29911ff4bd3f5e2ffd7af Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Fri, 19 Sep 2025 12:55:41 +0200 Subject: [PATCH 08/12] corrected pattern --- .sparse-checkout-rules/pr-trigger.patterns | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.sparse-checkout-rules/pr-trigger.patterns b/.sparse-checkout-rules/pr-trigger.patterns index 7b7eb2a267..a93851a9cd 100644 --- a/.sparse-checkout-rules/pr-trigger.patterns +++ b/.sparse-checkout-rules/pr-trigger.patterns @@ -1,2 +1,2 @@ -/com.unity.netcde.gameobjects/ -/testproject/ \ No newline at end of file +com.unity.netcde.gameobjects +testproject \ No newline at end of file From 748abaa87d2556c7222d8ff319a8131150ccaca2 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Fri, 19 Sep 2025 12:57:23 +0200 Subject: [PATCH 09/12] name typo --- .yamato/_triggers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.yamato/_triggers.yml b/.yamato/_triggers.yml index 0ce5b06a2d..6a767d98ce 100644 --- a/.yamato/_triggers.yml +++ b/.yamato/_triggers.yml @@ -91,7 +91,7 @@ code_changes_check: - .yamato/cmb-service-standalone-tests.yml#cmb_service_standalone_test_testproject_ubuntu_il2cpp_trunk source: files: - sparse_checkout_rules: .sparse-checkout-rules/pr-triger.patterns + sparse_checkout_rules: .sparse-checkout-rules/pr-trigger.patterns From 0bcbbd5cda92882de960fba8ee749ee878e4b991 Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Fri, 19 Sep 2025 13:04:10 +0200 Subject: [PATCH 10/12] pattern correction --- .sparse-checkout-rules/pr-trigger.patterns | 4 ++-- .yamato/_triggers.yml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.sparse-checkout-rules/pr-trigger.patterns b/.sparse-checkout-rules/pr-trigger.patterns index a93851a9cd..d3a76423c7 100644 --- a/.sparse-checkout-rules/pr-trigger.patterns +++ b/.sparse-checkout-rules/pr-trigger.patterns @@ -1,2 +1,2 @@ -com.unity.netcde.gameobjects -testproject \ No newline at end of file +com.unity.netcode.gameobjects/** +testproject/** \ No newline at end of file diff --git a/.yamato/_triggers.yml b/.yamato/_triggers.yml index 6a767d98ce..6631782bf5 100644 --- a/.yamato/_triggers.yml +++ b/.yamato/_triggers.yml @@ -90,6 +90,7 @@ code_changes_check: - .yamato/desktop-standalone-tests.yml#desktop_standalone_test_testproject_win_il2cpp_6000.0 - .yamato/cmb-service-standalone-tests.yml#cmb_service_standalone_test_testproject_ubuntu_il2cpp_trunk source: + checkout_mode: sparse files: sparse_checkout_rules: .sparse-checkout-rules/pr-trigger.patterns From e712e5684051be4dbf352c96fe87734ea5ef0eea Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Fri, 19 Sep 2025 13:38:22 +0200 Subject: [PATCH 11/12] modified pr-trigger.pattern to exclude Documentation folder etc --- .sparse-checkout-rules/pr-trigger.patterns | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.sparse-checkout-rules/pr-trigger.patterns b/.sparse-checkout-rules/pr-trigger.patterns index d3a76423c7..f3b3ab42bc 100644 --- a/.sparse-checkout-rules/pr-trigger.patterns +++ b/.sparse-checkout-rules/pr-trigger.patterns @@ -1,2 +1,5 @@ -com.unity.netcode.gameobjects/** +com.unity.netcode.gameobjects/Editor/** +com.unity.netcode.gameobjects/Runtime/** +com.unity.netcode.gameobjects/Tests/** +com.unity.netcode.gameobjects/package.json testproject/** \ No newline at end of file From a7bb5c01188c36faee9676c3c0a1e48a0b33b5ad Mon Sep 17 00:00:00 2001 From: michal-chrobot Date: Fri, 19 Sep 2025 14:57:06 +0200 Subject: [PATCH 12/12] unrelated change test --- com.unity.netcode.gameobjects/Documentation~/install.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/com.unity.netcode.gameobjects/Documentation~/install.md b/com.unity.netcode.gameobjects/Documentation~/install.md index 9fb1b54ef6..888cde4d52 100644 --- a/com.unity.netcode.gameobjects/Documentation~/install.md +++ b/com.unity.netcode.gameobjects/Documentation~/install.md @@ -37,9 +37,3 @@ Before you begin, you need the following: 1. From the Unity Editor, select **Window** > **Package Manager**. 1. From the Package Manager, select **Add** ![add symbol](images/add.png) > **Add package by git URL…** 1. Type (or copy and paste) `https://github.com/Unity-Technologies/com.unity.netcode.gameobjects` into the git URL field, then select **Add**. - -## Next Steps - -After installing Netcode for GameObjects, see the following content to continue your journey: - -* Use the [Get started with Netcode for GameObjects tutorial](./tutorials/get-started-with-ngo.md) to create a project, test your installation, and learn how to use the basic features of Netcode for GameObjects.