diff --git a/.sparse-checkout-rules/pr-trigger.patterns b/.sparse-checkout-rules/pr-trigger.patterns new file mode 100644 index 0000000000..f3b3ab42bc --- /dev/null +++ b/.sparse-checkout-rules/pr-trigger.patterns @@ -0,0 +1,5 @@ +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 diff --git a/.yamato/_triggers.yml b/.yamato/_triggers.yml index 549e90ccdb..6631782bf5 100644 --- a/.yamato/_triggers.yml +++ b/.yamato/_triggers.yml @@ -42,14 +42,39 @@ #----------------------------------------------------------------------------------- +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.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/ + # 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 + 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) @@ -64,19 +89,16 @@ 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: + checkout_mode: sparse + files: + sparse_checkout_rules: .sparse-checkout-rules/pr-trigger.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 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.