Skip to content

Commit 7385b78

Browse files
committed
feat: created commands, jobs and scripts
1 parent c036337 commit 7385b78

File tree

18 files changed

+174
-284
lines changed

18 files changed

+174
-284
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
# "greet" is a sample command packaged with this orb config.
3333
# This sample integration test will run as long as the greet command exists. Once you remove the greet command you should remove this line.
3434
# Push new changes first, before adding new tests to your config.
35-
- unity/greet
35+
# - unity/greet
3636

3737
workflows:
3838
# Prior to producing a development orb (which requires credentials) basic validation, linting, and even unit testing can be performed.

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# orb.yml is "packed" from source, and not published directly from the repository.
2-
orb.yml
2+
orb.yml
3+
.DS_Store

src/commands/README.md

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

src/commands/before-script.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
description: >
2+
This command handles Unity's offline activation following the method described
3+
in here: https://docs.unity3d.com/Manual/ManualActivationGuide.html#ulf-commandline.
4+
5+
Requirement: It is necessary to have an environment variable with the
6+
base64 encoded ULF license file contents.
7+
8+
parameters:
9+
unity-license-var-name:
10+
type: env_var_name
11+
description: |
12+
Enter the name of the environment variable containing Unity's ULF license activation file encoded in base64.
13+
For more information on how to get such file and encoded it, access the wiki page: TODO create and add wiki page.
14+
15+
steps:
16+
- run:
17+
name: "Prepare environment"
18+
environment:
19+
UNITY_LICENSE_VAR_NAME: << parameters.unity-license-var-name >>
20+
command: << include(scripts/before-script.sh) >>

src/commands/build.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
description: >
2+
This command builds an Unity project and stores the resulting artifact.
3+
4+
parameters:
5+
project-path:
6+
type: string
7+
default: "."
8+
description: |
9+
Enter the relative path of your Unity project.
10+
This should be the directory that has an "Assets" folder inside it.
11+
build-target:
12+
type: string
13+
description: |
14+
The target platform of your build.
15+
Accepted arguments vary with Unity's version and can be found in the docs: https://docs.unity3d.com/2021.2/Documentation/ScriptReference/BuildTarget.html
16+
build-name:
17+
type: string
18+
default: "TestBuild"
19+
description: |
20+
Enter the name for this build.
21+
22+
steps:
23+
- run:
24+
name: Build the Unity project
25+
environment:
26+
PARAM_BUILD_NAME: <<parameters.build-name>>
27+
PARAM_BUILD_TARGET: <<parameters.build-target>>
28+
PARAM_PROJECT_PATH: <<parameters.project-path>>
29+
command: <<include(scripts/build.sh)>>
30+

src/commands/greet.yml

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

src/executors/README.md

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

src/executors/default.yml

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

src/jobs/README.md

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

src/jobs/build.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
description: >
2+
Simple drop-in job to build your Unity game.
3+
4+
parameters:
5+
tag:
6+
default: 2021.2.7f1-mac-mono-0.15
7+
description: >
8+
Pick a specific unityci/editor image variant:
9+
https://hub.docker.com/r/unityci/editor/tags
10+
type: string
11+
license:
12+
type: env_var_name
13+
description: |
14+
Enter the name of the environment variable containing Unity's ULF license activation file encoded in base64.
15+
For more information on how to get such file and encoded it, access the wiki page: TODO create and add wiki page.
16+
project-path:
17+
type: string
18+
default: "."
19+
description: |
20+
Enter the path of your Unity project.
21+
This should be the directory that has an "Assets" folder inside it.
22+
build-target:
23+
type: string
24+
description: |
25+
The target platform of your build.
26+
Accepted arguments vary with Unity's version and can be found in the docs: https://docs.unity3d.com/2021.2/Documentation/ScriptReference/BuildTarget.html
27+
build-name:
28+
type: string
29+
default: "TestBuild"
30+
description: |
31+
Enter the name for this build.
32+
33+
docker:
34+
- image: 'unityci/editor:<<parameters.tag>>'
35+
36+
steps:
37+
- checkout
38+
- before-script:
39+
unity-license-var-name: << parameters.license >>
40+
- build:
41+
build-name: <<parameters.build-name>>
42+
build-target: <<parameters.build-target>>
43+
project-path: <<parameters.project-path>>
44+
- store_artifacts:
45+
path: <<parameters.project-path>>/Builds/<<parameters.build-target>>

0 commit comments

Comments
 (0)