Skip to content

Commit

Permalink
feat: add no_output_timeout to commands and jobs (#32)
Browse files Browse the repository at this point in the history
* feat: add `no_output_timeout` to all commands

* feat: add `no_output_timeout` to `build` and `test` jobs
  • Loading branch information
EricRibeiro authored Sep 19, 2022
1 parent cc81411 commit dd8b2f3
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/commands/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,15 @@ parameters:
Whether to compress the build output to a ".tar.gz" archive.
This is recommended if you want to download the built artifacts from the CircleCI web app.
If left to "false" for decompressed WebGL builds, you can run the project directly from the CircleCI web app.
no_output_timeout:
type: string
default: "10m"
description: Elapsed time the command can run without output.

steps:
- run:
name: << parameters.step-name >>
no_output_timeout: << parameters.no_output_timeout >>
environment:
PARAM_BUILD_NAME: << parameters.build-name >>
PARAM_BUILD_TARGET: << parameters.build-target >>
Expand Down
5 changes: 5 additions & 0 deletions src/commands/prepare-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ parameters:
description: |
Enter the path of your Unity project.
This should be the directory that has an "Assets" folder inside it.
no_output_timeout:
type: string
default: "10m"
description: Elapsed time the command can run without output.

steps:
- restore_cache:
Expand All @@ -48,6 +52,7 @@ steps:
- unity-deps-{{ arch }}-<< parameters.cache-version >>-<<# parameters.include-branch-in-cache-key >>{{ .Branch }}<</ parameters.include-branch-in-cache-key >>
- run:
name: Prepare the environment
no_output_timeout: << parameters.no_output_timeout >>
environment:
PARAM_UNITY_USERNAME_VAR_NAME: << parameters.unity-username-var-name >>
PARAM_UNITY_PASSWORD_VAR_NAME: << parameters.unity-password-var-name >>
Expand Down
5 changes: 5 additions & 0 deletions src/commands/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,15 @@ parameters:
default: true
description: >
If true, this cache bucket will only apply to jobs within the same branch.
no_output_timeout:
type: string
default: "10m"
description: Elapsed time the command can run without output.

steps:
- run:
name: << parameters.step-name >>
no_output_timeout: << parameters.no_output_timeout >>
environment:
PARAM_PROJECT_PATH: << parameters.project-path >>
PARAM_TEST_PLATFORM: << parameters.test-platform >>
Expand Down
6 changes: 6 additions & 0 deletions src/jobs/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ parameters:
description: |
Whether to return the license used to build the project.
Unity only allows returning professional licenses.
no_output_timeout:
type: string
default: "20m"
description: Elapsed time the command can run without output.

executor: << parameters.executor >>

Expand All @@ -80,13 +84,15 @@ steps:
unity-serial-var-name: << parameters.unity-serial-var-name >>
unity-license-var-name: << parameters.unity-license-var-name >>
project-path: <<parameters.project-path>>
no_output_timeout: << parameters.no_output_timeout>>
- build:
step-name: << parameters.step-name >>
build-name: <<parameters.build-name>>
build-target: <<parameters.build-target>>
project-path: <<parameters.project-path>>
store-artifacts: <<parameters.store-artifacts>>
compress: <<parameters.compress>>
no_output_timeout: << parameters.no_output_timeout>>
- when:
condition: <<parameters.return-license>>
steps:
Expand Down
6 changes: 6 additions & 0 deletions src/jobs/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ parameters:
description: |
Whether to return the license used to test the project.
Unity only allows returning professional licenses.
no_output_timeout:
type: string
default: "20m"
description: Elapsed time the command can run without output.

executor: << parameters.executor >>

Expand All @@ -63,10 +67,12 @@ steps:
unity-serial-var-name: << parameters.unity-serial-var-name >>
unity-license-var-name: << parameters.unity-license-var-name >>
project-path: <<parameters.project-path>>
no_output_timeout: << parameters.no_output_timeout>>
- test:
step-name: << parameters.step-name >>
test-platform: << parameters.test-platform >>
project-path: << parameters.project-path >>
no_output_timeout: << parameters.no_output_timeout>>
- when:
condition: <<parameters.return-license>>
steps:
Expand Down

0 comments on commit dd8b2f3

Please sign in to comment.