Skip to content

Commit 09abf12

Browse files
giorgospetkakisEvergreen
authored andcommitted
Add package publication jobs for internal packages
Adds package publication jobs to unity CI for publishing internal packages. https://jira.unity3d.com/browse/GSDET-2 This is in the context of creating performance testing CI for the demo projects such as the URP sample and Fantasy Kingdom. We are adding these as part of publishing a particular package, but have made the recipes flexible enough to create pack/test/publish jobs for any package under the unity repository, simply by adding a path under `PackageCollection.cs`. 1. I have added `com.unity.render-pipelines.core` as a package dependency. This was necessary as the package was already depending on it, but only implicitly. It just happened that every project that this package was in ALSO included the core RP package. Publishing the package means testing it in isolation, so I had to include the dependency explicitly. 2. Adding the RP core package means locking in a version for it. Since we're working off trunk, I added the current version and matched the different metadata to be at the current trunk level. This means that if we want to publish this package for an earlier version, we can still do it. 3. The 'Package Validation' test suite for this package contains only a dummy test. It is outside the scope of this PR to test the package fully, we only intend to publish it at this point. https://jira.unity3d.com/browse/GSDET-7 is tracking this task as technical debt. 4. The `NDA Filename Validation` tests are ignored for the graphics-performance package. I have reviewed the files and they do not seem to contain any NDA information. The package is also only going to the internal registry, not anywhere further. 5. I have changed the package dependency version of `com.unity.shaderanalysis` from `10.0.0-preview.1` to `1.0.0`. I am not quite sure what had happened here, but I think the `10.0.0` version never existed and package manager was just implicitly using the local version and never emitting any errors. 6. I have added triggers for package publication to run automatically if the package is edited and the changes land in trunk, as well as for tests to run on open PRs with changes to package code.
1 parent a04b9df commit 09abf12

File tree

12 files changed

+89
-6
lines changed

12 files changed

+89
-6
lines changed

Tests/SRPTests/Packages/com.unity.testing.graphics-performance/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@ All notable changes to this package will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## [17.0.0] - 2024-02-20
8+
9+
- Bumped version for publication
10+
711
## [8.0.0] - 2019-11-18

Tests/SRPTests/Packages/com.unity.testing.graphics-performance/Tests.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tests/SRPTests/Packages/com.unity.testing.graphics-performance/Tests/PackageValidation.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using NUnit.Framework;
2+
using UnityEngine;
3+
using UnityEngine.TestTools;
4+
5+
[Category("PackageValidation")]
6+
public class PackageValidationTests
7+
{
8+
[Test]
9+
public void DummyTest()
10+
{
11+
Assert.Pass();
12+
}
13+
}

Tests/SRPTests/Packages/com.unity.testing.graphics-performance/Tests/PackageValidation/PackageValidationTests.cs.meta

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "Unity.GraphicTests.Tests.PackageValidation",
3+
"rootNamespace": "",
4+
"references": [
5+
"UnityEngine.TestRunner",
6+
"UnityEditor.TestRunner"
7+
],
8+
"includePlatforms": [
9+
"Editor"
10+
],
11+
"excludePlatforms": [],
12+
"allowUnsafeCode": false,
13+
"overrideReferences": true,
14+
"precompiledReferences": [
15+
"nunit.framework.dll",
16+
"Newtonsoft.Json.dll"
17+
],
18+
"autoReferenced": false,
19+
"defineConstraints": [
20+
"UNITY_INCLUDE_TESTS"
21+
],
22+
"versionDefines": [],
23+
"noEngineReferences": false
24+
}

Tests/SRPTests/Packages/com.unity.testing.graphics-performance/Tests/PackageValidation/Unity.GraphicTests.Tests.PackageValidation.asmdef.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"ErrorExceptions":
3+
[
4+
{
5+
"ValidationTest": "NDA Filename Validation",
6+
"PackageVersion": "17.0.0"
7+
}
8+
]
9+
}

Tests/SRPTests/Packages/com.unity.testing.graphics-performance/ValidationExceptions.json.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)