-
Notifications
You must be signed in to change notification settings - Fork 457
ci: Automated project builders #3557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…-Technologies/com.unity.netcode.gameobjects into automated-project-builders
NoelStephensUnity
approved these changes
Jul 29, 2025
Quick note that I will do the second pass soon where I will make sure that
|
michalChrobot
added a commit
that referenced
this pull request
Jul 30, 2025
This is a backport of #3557. Notice that only projects that we can build with NGOv1.X are included ## Backport #3557 --------- Co-authored-by: Noel Stephens <[email protected]>
michalChrobot
added a commit
that referenced
this pull request
Sep 3, 2025
…3580) This PR aims to address the issue of "overdoing" the CI tests which due to distribution times often lead to very long wait times. First thing is that I failed to notice that `targets` and `drafts` conditions are configured as separate items in a list (see PR job trigger changes). In our CI, basic triggers in a list are combined with an OR operator, meaning the job will run if any of the conditions are met. This lead to test being executed on draft PRs. What I'm changing is 1. Tests will correctly **not run** on draft PRs and if PR is not targeting one of specified branches 2. PR trigger tests will execute only if there are changes in package or project. For for example DOCS only changes no tests will run (in the future we can improve that if for example we would have a test that verifies typos etc) This change should improve our workflow with CI as well as save some resources for others **NOTE THAT** By default the PR trigger it's triggered if 1. PR targets develop or release branches 2. PR is not a draft 3. PR changes files in package or TestProjects folders (doesn't run on for example DOCS only changes) Note that in other cases you can trigger it by writing a comment `/ci ngo` in the PR thread (if for example you want to test it on draft PR) ## Additional stuff I also used that occasion to remove disable-burst file. We are not using it and I included more advanced version in #3557 so if we ever need it we can reuse that one. Because of that I will remove it to avoid any confusion ## Steps after approval I will remove the mandatory PR trigger job from branch settings since now it will not always run (eg. only DOCS changes) and would block PRs otherwise ## Backports #3581 ## Testing & QA I verified that 1. PR trigger gets executed correctly when we have package or project changes 4. I verified that the fact of tests running blocks PR from merging ## Documentation I added explanation in jobs comments ## Jira ticket MTT-12903
michalChrobot
added a commit
that referenced
this pull request
Sep 12, 2025
## Purpose of this PR This PR automates the releases of NGO package (which can be extended for other packages since it's quite modular). The job will operate on the branch from which it will be triggered and by default it will be on the `develop` branch (job trigger). For more background note that Netcode team sprint last 4 weeks, starting and ending on Wednesday and our goal is to kickstart the release process after last full week of the sprint and preferably release until next Wednesday (end of the sprint). So the goal would be to run everything on Saturday (after the week concluded) and have everything ready from Monday morning to Playtest/investigate failures. As a separate part of this automation, as per **[THIS PR](#3557 we are able to trigger builds of our samples so those will also be triggered on the weekend to be ready for playtesting on Monday. Now with this in mind the process will work in the following way: 1. It runs on weekly schedule but we are interesting on executing it every 4th Saturday (after last full week of the Netcode team sprint. Our sprint last 4 weeks). Because of that the first action that this job will do is to run a check to see if the following requirements are satisfied: - Is this the 4th Saturday since we last released? - Is NGO CHANGELOG not empty? (no point of making the release is there is nothing to release) - Is the release branch not yet created? Before looking at the next steps, please note that as per **[THIS PR](#3549 the package version of Nshould always correspond to the current state of the package. 2. If the above is satisfied the next step will be to create the release branch (based on the known package version). The already existing **release.py** script will be executed there in order to regenerate recipes, cleanup changelog and generally prepare our package for releasing (see result **[HERE](c9f3f204fc4058df8781dd577b187a117216b544)**) 3. The next step will be to trigger `all_promotion_related_jobs_promotiontrigger` job. In that way when we will set-up packageworks release stream on Monday morning we will already have the results from this job and we can address any potential failures. 4. As a last step the job will create a commit to the local branch (normally `develop` but for the sake of playtesting I used a test branch). The goal with changelog here is we want to avoid changelog divergence if release will take longer then expected. The script will clean the empty sections, assign correct release version and date and then add back the [Unreleased] section template for the purpose of next entries. The goal with package version is that we want to indicate that now the package reflects further state (next patch). After this the job will commit this to the branch. I created Netcode-Team-Bot with appropriate tokens and marked committer to point to the bot (when for example making a direct commit to `develop` with changelog and package version update) <img width="1782" height="292" alt="image" src="https://github.com/user-attachments/assets/81e76d5a-b8f3-48f2-985f-40126e6511b8" /> The bot will make commits like <img width="1804" height="164" alt="image" src="https://github.com/user-attachments/assets/728eb89c-2c59-4b81-8a7e-7f858470b979" /> ## Jira ticket https://jira.unity3d.com/browse/MTT-12841 ## Documentation After this gets merged I will add approperiate description of Netcode release process in https://docs.google.com/document/d/16g9B5jxXeV0zG44Fhax-6Md_gtLoqGVthKQ7LkDvdqM/edit?tab=t.0#heading=h.t1guku6agyev ## Testing & QA Since this automation runs on the same branch on which it's triggered (and just because of job trigger it will be `develop-2.0.0` branch) I tested it locally (each script) and entire automation was tested on `testing-automated-netcode-releases` branch, the effects of which you can see as follows (note that instead of `develop-2.0.0` I just used local branch): 1. I tested for the normal release schedule date (result **[HERE](https://unity-ci.cds.internal.unity3d.com/job/56127622)**) 2. I tested with empty changelog (result **[HERE](https://unity-ci.cds.internal.unity3d.com/job/56123485)**) 3. The job itself was green (**[LINK](https://unity-ci.cds.internal.unity3d.com/job/56127745)**). 4. `release/2.5.1` branch was created with proper initial setup (**[LINK](https://github.com/Unity-Technologies/com.unity.netcode.gameobjects/tree/release/2.5.1)**), see latest commits there 5. Changelog and package versions were updated on `develop-2.0.0` branch (replaced for testing with `testing-automated-netcode-releases`). Notice that this simulates what will happen on develop branch after this script runs. (**[LINK](https://github.com/Unity-Technologies/com.unity.netcode.gameobjects/tree/testing-automated-netcode-releases-2.x)**) 6. Wrench jobs were correctly triggered on the created release branch (**[LINK](https://unity-ci.cds.internal.unity3d.com/project/1201/branch/release%2F2.5.1/jobDefinition/.yamato%2Fwrench%2Fpromotion-jobs.yml%23publish_dry_run_netcode_gameobjects/recent-jobs?nav=none)**) 7. Builds were triggered from release branch (**[example build LINK](https://unity-ci.cds.internal.unity3d.com/project/1201/branch/release%2F2.5.1/jobDefinition/.yamato%2Fproject-builders%2Fproject-builders.yml%23build_BossRoom_project/recent-jobs?nav=jobDefinitions)**) ## Things to note - Updating package version to next patch won't be immediately valid (vetting test will still compare it to latest released package version) but it serves the purpose of automating those steps and not needing to remember about it after package is released - **[email protected]** was created to assign NETCODE_YAMATO_API_KEY to it. Additionally I created tokens for both GitHubs and when making commit I'm just pointing to this bot as committer and author. ## Backports It's backported to #3603
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
This PR is an initial introduction of Yamato jobs which build our samples and the result can be found in the artifacts of the job under players.
Currently there are 3 samples that we are able to build (I'm open to add more)
The idea here is to run the job from the branch from which we want to test packages (let's say
release/1.4.1
) and the samples will be build with their manifest pointing to local packages from that branch.The steps are included here are:
Hopefully the scripts are annotated with enough comments that entire setup is clear. Note that when executing the job you have an option to modify Yamato variables to set
When the job finishes running you can inspect the job artifacts to get the build (players path) or detailed build logs in case of failure or the build not appearing (logs path)
WHY
The reason for this job is to facilitate/automate Playtesting and improving developers ability to easily test their changes. This PR will help with:
The main desire behind those changes is the scenario when you trigger appropriate builds when finishing the day and by next morning you have them ready so you can start playtesting right away
Need to know/Additional considerations
Backport
#3558