Skip to content
This repository was archived by the owner on Jan 18, 2022. It is now read-only.

Commit f2a418f

Browse files
author
Paul Balaji
authored
Limit perftest targets + package dependency fix (#1416)
1 parent 122f39f commit f2a418f

File tree

5 files changed

+68
-20
lines changed

5 files changed

+68
-20
lines changed

CHANGELOG.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
### Breaking Changes
66

77
- All generated C# enums will now start from 0, being shifted to schema values on serialization and shifted back to C# values on deserialization. [#1412](https://github.com/spatialos/gdk-for-unity/pull/1412)
8-
- A warning will be generated when enums defined in schema does not start from 0.
8+
- A warning will be generated when enums defined in schema do not start from 0.
99

1010
### Added
1111

@@ -25,6 +25,11 @@
2525

2626
- Fixed a bug in the Worker Inspector where component foldouts were being rendered too often, causing poor performance when the entity had many components or very complex components. [#1403](https://github.com/spatialos/gdk-for-unity/pull/1403)
2727

28+
### Internal
29+
30+
- Added `com.unity.test-framework` and `com.unity.test-framework.performance` as dependencies to the `io.improbable.gdk.testutils` package. [#1416](https://github.com/spatialos/gdk-for-unity/pull/1416)
31+
- In addition, both packages have been removed from the playground `manifest.json`.
32+
2833
## `0.3.7` - 2020-06-22
2934

3035
### Added

ci/perf-test.sh

+27
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ cd "$(dirname "$0")/../"
1010

1111
source .shared-ci/scripts/pinned-tools.sh
1212

13+
BRANCH_NAME=${BUILDKITE_BRANCH:-"local"}
14+
1315
ACCELERATOR_ARGS=$(getAcceleratorArgs)
1416

1517
PROJECT_DIR="$(pwd)"
@@ -42,6 +44,11 @@ else
4244
fi
4345

4446
function main {
47+
if ! anyMatchingTargets; then
48+
echo "Skipping all targets for this job as current branch does not match any corresponding filters."
49+
return
50+
fi
51+
4552
pushd "workers/unity"
4653
traceStart "Generate csproj & sln files :csharp:"
4754
dotnet run -p "${PROJECT_DIR}/.shared-ci/tools/RunUnity/RunUnity.csproj" -- \
@@ -78,6 +85,19 @@ function main {
7885
cleanUnity "$(pwd)/workers/unity"
7986
}
8087

88+
function anyMatchingTargets {
89+
for configId in `seq ${JOB_ID} ${NUM_JOBS} $((${NUM_CONFIGS}-1))`
90+
do
91+
local branchFilter=$(jq -r .[${configId}].branchFilter ${CONFIG_FILE})
92+
93+
if [[ ${BRANCH_NAME} =~ ${branchFilter} ]]; then
94+
return 0
95+
fi
96+
done
97+
98+
return 1
99+
}
100+
81101
function runTests {
82102
local configId=${1}
83103

@@ -87,6 +107,13 @@ function runTests {
87107
local apiProfile=$(jq -r .[${configId}].apiProfile ${CONFIG_FILE})
88108
local scriptingBackend=$(jq -r .[${configId}].scriptingBackend ${CONFIG_FILE})
89109

110+
local branchFilter=$(jq -r .[${configId}].branchFilter ${CONFIG_FILE})
111+
112+
if ! [[ ${BRANCH_NAME} =~ ${branchFilter} ]]; then
113+
echo "Skipping target as current branch does not match regex '${branchFilter}'."
114+
return
115+
fi
116+
90117
local args=()
91118

92119
if [[ "${platform}" == "Editmode" ]]; then

ci/perftest-configs.json

+32-16
Original file line numberDiff line numberDiff line change
@@ -4,111 +4,127 @@
44
"category": "Performance",
55
"burst": "default",
66
"apiProfile": "NET_Standard_2_0",
7-
"scriptingBackend": "Mono2x"
7+
"scriptingBackend": "Mono2x",
8+
"branchFilter": "^.*$"
89
},
910
{
1011
"platform": "Editmode",
1112
"category": "Performance",
1213
"burst": "default",
1314
"apiProfile": "NET_4_6",
14-
"scriptingBackend": "Mono2x"
15+
"scriptingBackend": "Mono2x",
16+
"branchFilter": "^(master|develop)$"
1517
},
1618
{
1719
"platform": "Editmode",
1820
"category": "Performance",
1921
"burst": "disabled",
2022
"apiProfile": "NET_Standard_2_0",
21-
"scriptingBackend": "Mono2x"
23+
"scriptingBackend": "Mono2x",
24+
"branchFilter": "^(master|develop)$"
2225
},
2326
{
2427
"platform": "Editmode",
2528
"category": "Performance",
2629
"burst": "disabled",
2730
"apiProfile": "NET_4_6",
28-
"scriptingBackend": "Mono2x"
31+
"scriptingBackend": "Mono2x",
32+
"branchFilter": "^(master|develop)$"
2933
},
3034
{
3135
"platform": "Playmode",
3236
"category": "Performance",
3337
"burst": "default",
3438
"apiProfile": "NET_Standard_2_0",
35-
"scriptingBackend": "Mono2x"
39+
"scriptingBackend": "Mono2x",
40+
"branchFilter": "^.*$"
3641
},
3742
{
3843
"platform": "Playmode",
3944
"category": "Performance",
4045
"burst": "default",
4146
"apiProfile": "NET_4_6",
42-
"scriptingBackend": "Mono2x"
47+
"scriptingBackend": "Mono2x",
48+
"branchFilter": "^(master|develop)$"
4349
},
4450
{
4551
"platform": "Playmode",
4652
"category": "Performance",
4753
"burst": "disabled",
4854
"apiProfile": "NET_Standard_2_0",
49-
"scriptingBackend": "Mono2x"
55+
"scriptingBackend": "Mono2x",
56+
"branchFilter": "^(master|develop)$"
5057
},
5158
{
5259
"platform": "Playmode",
5360
"category": "Performance",
5461
"burst": "disabled",
5562
"apiProfile": "NET_4_6",
56-
"scriptingBackend": "Mono2x"
63+
"scriptingBackend": "Mono2x",
64+
"branchFilter": "^(master|develop)$"
5765
},
5866
{
5967
"platform": "Playmode",
6068
"category": "Performance",
6169
"burst": "default",
6270
"apiProfile": "NET_Standard_2_0",
63-
"scriptingBackend": "IL2CPP"
71+
"scriptingBackend": "IL2CPP",
72+
"branchFilter": "^(master|develop)$"
6473
},
6574
{
6675
"platform": "Playmode",
6776
"category": "Performance",
6877
"burst": "default",
6978
"apiProfile": "NET_4_6",
70-
"scriptingBackend": "IL2CPP"
79+
"scriptingBackend": "IL2CPP",
80+
"branchFilter": "^(master|develop)$"
7181
},
7282
{
7383
"platform": "Playmode",
7484
"category": "Performance",
7585
"burst": "disabled",
7686
"apiProfile": "NET_Standard_2_0",
77-
"scriptingBackend": "IL2CPP"
87+
"scriptingBackend": "IL2CPP",
88+
"branchFilter": "^(master|develop)$"
7889
},
7990
{
8091
"platform": "Playmode",
8192
"category": "Performance",
8293
"burst": "disabled",
8394
"apiProfile": "NET_4_6",
84-
"scriptingBackend": "IL2CPP"
95+
"scriptingBackend": "IL2CPP",
96+
"branchFilter": "^(master|develop)$"
8597
},
8698
{
8799
"platform": "Playmode",
88100
"category": "Performance",
89101
"burst": "default",
90102
"apiProfile": "NET_Standard_2_0",
91-
"scriptingBackend": "WinRTDotNET"
103+
"scriptingBackend": "WinRTDotNET",
104+
"branchFilter": "^(master|develop)$"
92105
},
93106
{
94107
"platform": "Playmode",
95108
"category": "Performance",
96109
"burst": "default",
97110
"apiProfile": "NET_4_6",
98-
"scriptingBackend": "WinRTDotNET"
111+
"scriptingBackend": "WinRTDotNET",
112+
"branchFilter": "^(master|develop)$"
99113
},
100114
{
101115
"platform": "Playmode",
102116
"category": "Performance",
103117
"burst": "disabled",
104118
"apiProfile": "NET_Standard_2_0",
105-
"scriptingBackend": "WinRTDotNET"
119+
"scriptingBackend": "WinRTDotNET",
120+
"branchFilter": "^(master|develop)$"
106121
},
107122
{
108123
"platform": "Playmode",
109124
"category": "Performance",
110125
"burst": "disabled",
111126
"apiProfile": "NET_4_6",
112-
"scriptingBackend": "WinRTDotNET"
127+
"scriptingBackend": "WinRTDotNET",
128+
"branchFilter": "^(master|develop)$"
113129
}
114130
]

workers/unity/Packages/io.improbable.gdk.testutils/package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
"description": "SpatialOS GDK Test Utils.",
88
"dependencies": {
99
"io.improbable.gdk.core": "0.3.7",
10-
"com.unity.ext.nunit": "1.0.0"
10+
"com.unity.ext.nunit": "1.0.0",
11+
"com.unity.test-framework": "1.1.14",
12+
"com.unity.test-framework.performance": "2.2.0-preview"
1113
}
1214
}

workers/unity/Packages/manifest.json

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
{
22
"dependencies": {
33
"com.unity.ide.rider": "1.1.4",
4-
"com.unity.test-framework": "1.1.14",
5-
"com.unity.test-framework.performance": "2.2.0-preview",
64
"com.unity.testtools.codecoverage": "0.2.3-preview",
75
"com.unity.ugui": "1.0.0",
86
"com.unity.ui.builder": "0.8.2-preview",

0 commit comments

Comments
 (0)