Skip to content

Commit d141a89

Browse files
Merge branch 'release/0.1.0' into master_tmp
2 parents d292d73 + 9dd62c7 commit d141a89

File tree

1,155 files changed

+147505
-272504
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,155 files changed

+147505
-272504
lines changed

.github/workflows/conventional-pr.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Conventional PR
2+
3+
# Controls when the action will run.
4+
on:
5+
pull_request:
6+
branches:
7+
- master
8+
- develop
9+
- release/**
10+
11+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
12+
jobs:
13+
# This workflow contains a single job called "build"
14+
build:
15+
# The type of runner that the job will run on
16+
runs-on: ubuntu-latest
17+
18+
# Steps represent a sequence of tasks that will be executed as part of the job
19+
steps:
20+
- name: semantic-pull-request
21+
# Internal Unity mirror available at jesseo/action-semantic-pull-request, but actions from private repos aren't supported, so continue to use the public one below
22+
uses: amannn/action-semantic-pull-request@b7a9a97cb10fa6e1ae02647e718798175f6b1f1d
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
with:
26+
# Provide custom types if you don't want the default ones from https://www.conventionalcommits.org
27+
types: # optional
28+
# Configure which scopes are allowed.
29+
#scopes: # optional
30+
# Configure that a scope must always be provided.
31+
#requireScope: # optional
32+
# Configure additional validation for the subject based on a regex. E.g. '^(?![A-Z]).+$' ensures the subject doesn't start with an uppercase character.
33+
#subjectPattern: # optional
34+
# If `subjectPattern` is configured, you can use this property to override the default error message that is shown when the pattern doesn't match. The variables `subject` and `title` can be used within the message.
35+
#subjectPatternError: # optional
36+
# For work-in-progress PRs you can typically use draft pull requests from Github. However, private repositories on the free plan don't have this option and therefore this action allows you to opt-in to using the special '[WIP]' prefix to indicate this state. This will avoid the validation of the PR title and the pull request checks remain pending. Note that a second check will be reported if this is enabled.
37+
#wip: # optional
38+
# When using "Squash and merge" on a PR with only one commit, GitHub will suggest using that commit message instead of the PR title for the merge commit, and it's easy to commit this by mistake. Enable this option to also validate the commit message for one commit PRs.
39+
validateSingleCommit: true # optional

.gitignore

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,11 @@ artifacts/
4949
*_p.c
5050
*_i.h
5151
*.ilk
52-
*.meta
5352
*.obj
5453
*.pch
5554
*.pdb
5655
*.pgc
5756
*.pgd
58-
*.rsp
5957
*.sbr
6058
*.tlb
6159
*.tli
@@ -155,6 +153,8 @@ PublishScripts/
155153
*.nupkg
156154
# The packages folder can be ignored because of Package Restore
157155
**/packages/*
156+
# Except Unity testproject Packages
157+
!/testproject/Packages/**
158158
# except build/, which is used as an MSBuild target.
159159
!**/packages/build/
160160
# Uncomment if necessary however generally it will be regenerated when needed
@@ -186,7 +186,6 @@ _pkginfo.txt
186186
# Others
187187
ClientBin/
188188
~$*
189-
*~
190189
*.dbmdl
191190
*.dbproj.schemaview
192191
*.jfm
@@ -261,4 +260,7 @@ __pycache__/
261260
*.pyc
262261

263262
# Docs
264-
docs/LastBuild.log
263+
docs/LastBuild.log
264+
265+
# Unity Package Manager CI output
266+
upm-ci~

.releaserc

Lines changed: 0 additions & 16 deletions
This file was deleted.

.yamato/project-pack.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{% metadata_file .yamato/project.metafile %}
2+
---
3+
{% for project in projects -%}
4+
pack_{{ project.name }}:
5+
name: Pack {{ project.name }}
6+
agent:
7+
type: Unity::VM
8+
image: package-ci/ubuntu:stable
9+
flavor: b1.small
10+
commands:
11+
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
12+
- upm-ci project pack --project-path {{ project.path }}
13+
artifacts:
14+
packages:
15+
paths:
16+
- "upm-ci~/packages/**/*"
17+
{% endfor -%}

.yamato/project-promotion.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{% metadata_file .yamato/project.metafile %}
2+
---
3+
{% for project in projects -%}
4+
{% for package in project.packages -%}
5+
# Validation job for package {{ package.name }}, only using the first entry in the
6+
# platform and editor meta data
7+
promotion_validate_{{ project.name }}_{{ package.name }}_{{ test_platforms.first.name }}_{{ test_editors.first }}:
8+
name : Validate Project {{ project.name }} - Package {{ package.name }} - {{ test_editors.first }} on {{ test_platforms.first.name }}
9+
agent:
10+
type: {{ test_platforms.first.type }}
11+
image: {{ test_platforms.first.image }}
12+
flavor: {{ test_platforms.first.flavor}}
13+
variables:
14+
UPMCI_PROMOTION: 1
15+
commands:
16+
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
17+
- upm-ci project test -u {{ test_editors.first }} --project-path {{ project.path }} --type vetting-tests --package-filter {{ package.name }}
18+
artifacts:
19+
logs:
20+
paths:
21+
- "upm-ci~/test-results/**/*"
22+
dependencies:
23+
- .yamato/project-pack.yml#pack_{{ project.name }}
24+
25+
promote_{{ project.name }}_{{ package.name }}:
26+
name: Promote Project {{ project.name }} - Package {{ package.name }} to Production
27+
agent:
28+
type: Unity::VM
29+
image: package-ci/win10:stable
30+
flavor: b1.small
31+
variables:
32+
UPMCI_PROMOTION: 1
33+
commands:
34+
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
35+
- upm-ci package promote --package-path {{ package.path }}
36+
artifacts:
37+
artifacts:
38+
paths:
39+
- "upm-ci~/packages/*.tgz"
40+
dependencies:
41+
- .yamato/project-pack.yml#pack_{{ project.name }}
42+
- .yamato/project-promotion.yml#promotion_validate_{{ project.name }}_{{ package.name }}_{{ test_platforms.first.name }}_{{ test_editors.first }}
43+
44+
{% endfor -%}
45+
46+
promote_{{ project.name }}:
47+
name: Promote ALL {{ project.name }} packages to Production
48+
agent:
49+
type: Unity::VM
50+
image: package-ci/win10:stable
51+
flavor: b1.small
52+
variables:
53+
UPMCI_PROMOTION: 1
54+
commands:
55+
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
56+
- upm-ci project promote --project-path {{ project.path }}
57+
artifacts:
58+
artifacts:
59+
paths:
60+
- "upm-ci~/packages/*.tgz"
61+
dependencies:
62+
- .yamato/project-pack.yml#pack_{{ project.name }}
63+
{% for package in packages -%}
64+
- .yamato/project-promotion.yml#promotion_validate_{{ package.name }}_{{ test_platforms.first.name }}_{{ test_editors.first }}
65+
{% endfor -%}
66+
{% endfor -%}

.yamato/project-publish.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{% metadata_file .yamato/project.metafile %}
2+
---
3+
{% for project in projects -%}
4+
{% for package in project.packages -%}
5+
publish_{{ project.name }}_{{ package.name }}:
6+
name: Publish Project {{project.name }} - Package {{ package.name }} to Internal Registry
7+
agent:
8+
type: Unity::VM
9+
image: package-ci/win10:stable
10+
flavor: b1.large
11+
commands:
12+
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
13+
- upm-ci package publish --package-path {{ package.path }}
14+
artifacts:
15+
artifacts:
16+
paths:
17+
- "upm-ci~/packages/*.tgz"
18+
dependencies:
19+
- .yamato/project-pack.yml#pack_{{ project.name }}
20+
- .yamato/project-test.yml#validate_{{ project.name }}_{{ package.name }}_{{ test_platforms.first.name }}_{{ test_editors.first }}
21+
{% for editor in test_editors -%}
22+
{% for platform in test_platforms -%}
23+
- .yamato/project-test.yml#test_{{ project.name }}_{{ package.name }}_{{ platform.name }}_{{ editor }}
24+
{% endfor -%}
25+
{% endfor -%}
26+
27+
{% endfor -%}
28+
29+
publish_{{ project.name }}:
30+
name: Publish ALL {{ project.name }} packages to Internal Registry
31+
agent:
32+
type: Unity::VM
33+
image: package-ci/win10:stable
34+
flavor: b1.large
35+
commands:
36+
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
37+
- upm-ci project publish --project-path {{ project.path }}
38+
artifacts:
39+
artifacts:
40+
paths:
41+
- "upm-ci~/packages/*.tgz"
42+
dependencies:
43+
- .yamato/project-pack.yml#pack_{{ project.name }}
44+
- .yamato/project-test.yml#all_tests_trigger
45+
46+
{% endfor -%}

.yamato/project-test.yml

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
{% metadata_file .yamato/project.metafile %}
2+
---
3+
# Go through all platforms, editors and packages in the metadata
4+
# to generate its independent package tests and validation tests.
5+
# The idea is to only run validation once per package and not mix.
6+
# the results with package tests
7+
{% for package in projects.first.packages -%}
8+
{% for editor in test_editors -%}
9+
{% for platform in test_platforms -%}
10+
test_{{ projects.first.name}}_{{ package.name }}_{{ platform.name }}_{{ editor }}:
11+
name : Test Project {{ projects.first.name }} - Package {{ package.name }} - {{ editor }} on {{ platform.name }}
12+
agent:
13+
type: {{ platform.type }}
14+
image: {{ platform.image }}
15+
flavor: {{ platform.flavor}}
16+
commands:
17+
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
18+
- {% if platform.name == "centos" %}DISPLAY=:0 {% endif %}upm-ci project test -u {{ editor }} --project-path {{ projects.first.path }} --type package-tests --package-filter {{ package.name }}
19+
artifacts:
20+
logs:
21+
paths:
22+
- "upm-ci~/test-results/**/*"
23+
dependencies:
24+
- .yamato/project-pack.yml#pack_{{ projects.first.name }}
25+
26+
{% endfor -%}
27+
{% endfor -%}
28+
29+
# Validation job for package {{ package.name }}, only using the first entry in the
30+
# platform and editor meta data
31+
# Validation only occurs in editmode.
32+
validate_{{ projects.first.name }}_{{ package.name }}_{{ test_platforms.first.name }}_{{ test_editors.first }}:
33+
name : Validate Project {{ projects.first.name }} - Package {{ package.name }} - {{ test_editors.first }} on {{ test_platforms.first.name }}
34+
agent:
35+
type: {{ test_platforms.first.type }}
36+
image: {{ test_platforms.first.image }}
37+
flavor: {{ test_platforms.first.flavor}}
38+
commands:
39+
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
40+
- {% if platform.name == "centos" %}DISPLAY=:0 {% endif %}upm-ci project test -u {{ test_editors.first }} --project-path {{ projects.first.path }} --type vetting-tests --package-filter {{ package.name }} --platform editmode
41+
artifacts:
42+
logs:
43+
paths:
44+
- "upm-ci~/test-results/**/*"
45+
dependencies:
46+
- .yamato/project-pack.yml#pack_{{ projects.first.name }}
47+
{% endfor -%}
48+
49+
# For every platform and editor version, run its project tests without
50+
# running package tests too since they are handled on their respective
51+
# jobs
52+
{% for project in projects -%}
53+
{% for editor in test_editors -%}
54+
{% for platform in test_platforms -%}
55+
test_{{ project.name }}_{{ editor }}_{{ platform.name }}:
56+
name : Test Project {{ project.name }} - {{ editor }} on {{ platform.name }}
57+
agent:
58+
type: {{ platform.type }}
59+
image: {{ platform.image }}
60+
flavor: {{ platform.flavor}}
61+
commands:
62+
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
63+
- {% if platform.name == "centos" %}DISPLAY=:0 {% endif %}upm-ci project test -u {{ editor }} --project-path {{ project.path }} --type project-tests
64+
artifacts:
65+
logs:
66+
paths:
67+
- "upm-ci~/test-results/**/*"
68+
dependencies:
69+
- .yamato/project-pack.yml#pack_{{ project.name }}
70+
71+
{% endfor -%}
72+
{% endfor -%}
73+
{% endfor -%}
74+
75+
# Currently, we need to have a trigger to updated badges
76+
# Only package badges currently exist
77+
badges_test_trigger:
78+
name: Badges Tests Trigger
79+
agent:
80+
type: Unity::VM
81+
image: package-ci/ubuntu:stable
82+
flavor: b1.small
83+
commands:
84+
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
85+
- upm-ci package izon -t
86+
artifacts:
87+
logs:
88+
paths:
89+
- "upm-ci~/test-results/**/*"
90+
packages:
91+
paths:
92+
- "upm-ci~/packages/**/*"
93+
dependencies:
94+
{% for project in projects -%}
95+
{% for package in projects.first.packages -%}
96+
- .yamato/project-test.yml#validate_{{ projects.first.name }}_{{ package.name }}_{{ test_platforms.first.name }}_{{ test_editors.first }}
97+
{% for editor in test_editors -%}
98+
{% for platform in test_platforms -%}
99+
- .yamato/project-test.yml#test_{{ projects.first.name }}_{{ package.name }}_{{ platform.name }}_{{ editor }}
100+
{% endfor -%}
101+
{% endfor -%}
102+
{% endfor -%}
103+
{% endfor -%}
104+
105+
all_tests_trigger:
106+
name: Repository Tests Trigger
107+
dependencies:
108+
# Pull in package and validate jobs through the badges job
109+
- .yamato/project-test.yml#badges_test_trigger
110+
{% for editor in test_editors -%}
111+
{% for platform in test_platforms -%}
112+
{% for project in projects -%}
113+
- .yamato/project-test.yml#test_{{ project.name }}_{{ editor }}_{{ platform.name }}
114+
{% endfor -%}
115+
{% endfor -%}
116+
{% endfor -%}
117+
118+
# Run all relevant tasks when a pull request targeting the develop
119+
# branch is created or updated. Currently only mlapi package tests are
120+
# enabled, since the others are missing test coverage and will fail CI.
121+
develop_pull_request_trigger:
122+
name: Develop Branch Triggers
123+
dependencies:
124+
- .yamato/project-test.yml#validate_{{ projects.first.name }}_com.unity.multiplayer.mlapi_{{ test_platforms.first.name }}_{{ test_editors.first }}
125+
{% for editor in test_editors -%}
126+
{% for platform in test_platforms -%}
127+
- .yamato/project-test.yml#test_{{ projects.first.name }}_com.unity.multiplayer.mlapi_{{ platform.name }}_{{ editor }}
128+
{% endfor -%}
129+
{% endfor -%}
130+
triggers:
131+
cancel_old_ci: true
132+
pull_requests:
133+
- targets:
134+
only:
135+
- "master"
136+
- "develop"
137+
- "/release\/.*/"

0 commit comments

Comments
 (0)