From 2ac0baa2c8a1ef859b4921cf1523cbc1993088c4 Mon Sep 17 00:00:00 2001 From: Andrew Kahr <22359829+AndrewKahr@users.noreply.github.com> Date: Fri, 27 Oct 2023 16:08:48 -0700 Subject: [PATCH 01/14] Add new parameters for cpu and memory limits --- docs/03-github/04-builder.mdx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/03-github/04-builder.mdx b/docs/03-github/04-builder.mdx index 82468b79..616ae836 100644 --- a/docs/03-github/04-builder.mdx +++ b/docs/03-github/04-builder.mdx @@ -454,6 +454,23 @@ to avoid any conflicts. _**required:** `false`_ _**default:** `"/github/workspace"`_ +#### dockerCpuLimit + +Number of CPU cores to assign the Windows docker container. Defaults to all available cores. Can +accept fractional values, ie 0.5 for half of a cpu core's execution time. This only applies to +Windows containers. + +_**required:** `false`_ _**default:** `""`_ + +#### dockerMemoryLimit + +Amount of memory to assign the Windows docker container. Defaults to 75% of total system memory +rounded down to the nearest gigabyte when no value is provided. Format should be `Xg` where `X` is +the number of gigabytes to allocate, ie `4g` for 4 gigabytes. You can also use `m` instead to +specify a value in megabytes. This only applies to Windows containers. + +_**required:** `false`_ _**default:** `""`_ + ## Outputs Below are outputs that can be accessed by using `${{ steps.myBuildStep.outputs.outputName }}`, where From 022891860f12638ea08e5b21fb6f647306213a31 Mon Sep 17 00:00:00 2001 From: Andrew Kahr <22359829+AndrewKahr@users.noreply.github.com> Date: Fri, 27 Oct 2023 16:50:53 -0700 Subject: [PATCH 02/14] Update to reflect new memory/cpu limit logic --- docs/03-github/04-builder.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/03-github/04-builder.mdx b/docs/03-github/04-builder.mdx index 616ae836..245c3359 100644 --- a/docs/03-github/04-builder.mdx +++ b/docs/03-github/04-builder.mdx @@ -456,18 +456,18 @@ _**required:** `false`_ _**default:** `"/github/workspace"`_ #### dockerCpuLimit -Number of CPU cores to assign the Windows docker container. Defaults to all available cores. Can -accept fractional values, ie 0.5 for half of a cpu core's execution time. This only applies to -Windows containers. +Number of CPU cores to assign the Windows docker container. Defaults to all available cores when no +value is specified. Can accept fractional values, ie 0.5 for half of a cpu core's execution time. _**required:** `false`_ _**default:** `""`_ #### dockerMemoryLimit -Amount of memory to assign the Windows docker container. Defaults to 75% of total system memory -rounded down to the nearest gigabyte when no value is provided. Format should be `Xg` where `X` is -the number of gigabytes to allocate, ie `4g` for 4 gigabytes. You can also use `m` instead to -specify a value in megabytes. This only applies to Windows containers. +Amount of memory to assign the docker container. Defaults to 95% of total system memory rounded down +to the nearest megabyte on Linux and 80% on Windows when no value is specified. On unrecognized +platforms, defaults to 75% of total system memory. To manually specify a value, use the format + +, where unit is either m or g. ie: 512m = 512 megabytes and 4g = 4 gigabytes. _**required:** `false`_ _**default:** `""`_ From 1db1562e471d1cb698896e66430fce177ee6d037 Mon Sep 17 00:00:00 2001 From: Andrew Kahr <22359829+AndrewKahr@users.noreply.github.com> Date: Fri, 27 Oct 2023 17:17:18 -0700 Subject: [PATCH 03/14] Update to server 2022 --- docs/03-github/01-getting-started.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/03-github/01-getting-started.mdx b/docs/03-github/01-getting-started.mdx index e59c5caa..25c19c91 100644 --- a/docs/03-github/01-getting-started.mdx +++ b/docs/03-github/01-getting-started.mdx @@ -265,7 +265,7 @@ jobs: buildForWindowsBasedPlatforms: name: Build for ${{ matrix.targetPlatform }} - runs-on: windows-2019 + runs-on: windows-2022 strategy: fail-fast: false matrix: From 296140627eca9032e4118a56e4104f30561b519d Mon Sep 17 00:00:00 2001 From: Andrew Kahr <22359829+AndrewKahr@users.noreply.github.com> Date: Fri, 27 Oct 2023 17:42:26 -0700 Subject: [PATCH 04/14] Fix brackets --- docs/03-github/04-builder.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/03-github/04-builder.mdx b/docs/03-github/04-builder.mdx index 245c3359..8b2beccf 100644 --- a/docs/03-github/04-builder.mdx +++ b/docs/03-github/04-builder.mdx @@ -467,7 +467,7 @@ Amount of memory to assign the docker container. Defaults to 95% of total system to the nearest megabyte on Linux and 80% on Windows when no value is specified. On unrecognized platforms, defaults to 75% of total system memory. To manually specify a value, use the format -, where unit is either m or g. ie: 512m = 512 megabytes and 4g = 4 gigabytes. +\\, where unit is either m or g. ie: 512m = 512 megabytes and 4g = 4 gigabytes. _**required:** `false`_ _**default:** `""`_ From 4822b7e249ec1af7d3c79ccd7cff0d518d2e9cde Mon Sep 17 00:00:00 2001 From: Andrew Kahr <22359829+AndrewKahr@users.noreply.github.com> Date: Fri, 27 Oct 2023 19:12:05 -0700 Subject: [PATCH 05/14] Add process isolation mode docs --- docs/03-github/04-builder.mdx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/03-github/04-builder.mdx b/docs/03-github/04-builder.mdx index 8b2beccf..ecf14252 100644 --- a/docs/03-github/04-builder.mdx +++ b/docs/03-github/04-builder.mdx @@ -466,11 +466,17 @@ _**required:** `false`_ _**default:** `""`_ Amount of memory to assign the docker container. Defaults to 95% of total system memory rounded down to the nearest megabyte on Linux and 80% on Windows when no value is specified. On unrecognized platforms, defaults to 75% of total system memory. To manually specify a value, use the format - \\, where unit is either m or g. ie: 512m = 512 megabytes and 4g = 4 gigabytes. _**required:** `false`_ _**default:** `""`_ +#### dockerIsolationMode + +Isolation mode to use for the docker container. Can be one of process, hyperv, or default. Only +applicable on Windows. + +_**required:** `false`_ _**default:** `"default"`_ + ## Outputs Below are outputs that can be accessed by using `${{ steps.myBuildStep.outputs.outputName }}`, where From 07845eccee2771af590a67ae2b64fa6b5bb9adc9 Mon Sep 17 00:00:00 2001 From: Andrew Kahr <22359829+AndrewKahr@users.noreply.github.com> Date: Mon, 30 Oct 2023 20:54:31 -0700 Subject: [PATCH 06/14] Added updated versions to align with upcoming major version bump. Updated versions for other actions in example workflows --- .github/workflows/checks.yml | 24 +- .github/workflows/firebase-hosting-merge.yml | 4 +- .../firebase-hosting-pull-request.yml | 4 +- .github/workflows/search-trigger.yml | 2 +- .../03-examples/02-github-examples/02-aws.mdx | 2 +- docs/03-github/01-getting-started.mdx | 26 +- docs/03-github/02-activation.mdx | 4 +- docs/03-github/03-test-runner.mdx | 22 +- docs/03-github/04-builder.mdx | 42 +- docs/03-github/06-deployment/android.mdx | 18 +- docs/03-github/06-deployment/ios.mdx | 22 +- docs/03-github/06-deployment/steam.mdx | 6 +- docs/09-troubleshooting/common-issues.mdx | 20 +- docusaurus.config.js | 5 +- .../version-3/02-getting-started/index.mdx | 39 + .../01-introduction.mdx | 104 +++ .../02-game-ci-vs-cloud-runner.mdx | 42 + .../02-getting-started.mdx | 3 + .../03-examples/01-command-line.mdx | 49 ++ .../03-examples/02-github-examples/02-aws.mdx | 71 ++ .../02-github-examples/03-kubernetes.mdx | 51 ++ .../02-github-examples/_category_.yaml | 5 + .../03-examples/_category_.yaml | 5 + .../04-api-reference.mdx | 221 +++++ .../06-advanced-topics/01-caching.mdx | 32 + .../02-retained-workspace.mdx | 8 + .../03-garbage-collection.mdx | 17 + .../04-configuration-override.mdx | 19 + .../04-custom-hooks/01-custom-job.mdx | 4 + .../04-custom-hooks/03-command-hooks.mdx | 12 + .../04-custom-hooks/04-container-hooks.mdx | 13 + .../05-premade-container-jobs.mdx | 38 + .../04-custom-hooks/_category_.yaml | 5 + .../06-advanced-topics/05-logging.mdx | 13 + .../06-advanced-topics/06-secrets.mdx | 14 + .../09-gitlab/01-introduction-gitlab.mdx | 3 + .../09-gitlab/_category_.yaml | 5 + .../10-github/01-github-checks.mdx | 7 + .../10-github/_category_.yaml | 5 + .../06-advanced-topics/_category_.yaml | 5 + .../03-github-cloud-runner/_category_.yaml | 5 + .../03-github/01-getting-started.mdx | 434 ++++++++++ .../version-3/03-github/02-activation.mdx | 154 ++++ .../version-3/03-github/03-test-runner.mdx | 528 ++++++++++++ .../version-3/03-github/04-builder.mdx | 630 ++++++++++++++ .../03-github/05-returning-a-license.mdx | 20 + .../03-github/06-deployment/_category_.yaml | 5 + .../03-github/06-deployment/android.mdx | 252 ++++++ .../version-3/03-github/06-deployment/ios.mdx | 523 +++++++++++ .../03-github/06-deployment/steam.mdx | 156 ++++ .../version-3/03-github/_category_.yaml | 5 + .../05-gitlab/01-getting-started.mdx | 76 ++ .../version-3/05-gitlab/02-activation.mdx | 193 +++++ .../05-gitlab/03-example-project.mdx | 50 ++ .../05-gitlab/04-custom-build-options.mdx | 46 + .../version-3/05-gitlab/05-tests.mdx | 19 + .../05-gitlab/06-deployment/_category_.yaml | 5 + .../05-gitlab/06-deployment/android.mdx | 91 ++ .../version-3/05-gitlab/06-deployment/ios.mdx | 144 ++++ .../version-3/05-gitlab/_category_.yaml | 5 + .../version-3/08-docker/01-docker-images.mdx | 84 ++ .../08-docker/02-windows-docker-images.mdx | 271 ++++++ .../08-docker/03-customize-docker-images.mdx | 143 +++ .../version-3/08-docker/04-versions.mdx | 1 + .../version-3/08-docker/_category_.yaml | 5 + .../09-troubleshooting/_category_.yaml | 5 + .../09-troubleshooting/common-issues.mdx | 319 +++++++ versioned_docs/version-3/10-faq/index.mdx | 311 +++++++ .../11-circleci/01-getting-started.mdx | 149 ++++ .../version-3/11-circleci/02-activation.mdx | 135 +++ .../version-3/11-circleci/03-build.mdx | 816 ++++++++++++++++++ .../version-3/11-circleci/04-test.mdx | 381 ++++++++ .../version-3/11-circleci/05-executors.mdx | 448 ++++++++++ .../version-3/11-circleci/_category_.yaml | 5 + versioned_docs/version-3/index.mdx | 25 + versioned_sidebars/version-3-sidebars.json | 8 + versions.json | 2 +- 77 files changed, 7340 insertions(+), 100 deletions(-) create mode 100644 versioned_docs/version-3/02-getting-started/index.mdx create mode 100644 versioned_docs/version-3/03-github-cloud-runner/01-introduction.mdx create mode 100644 versioned_docs/version-3/03-github-cloud-runner/02-game-ci-vs-cloud-runner.mdx create mode 100644 versioned_docs/version-3/03-github-cloud-runner/02-getting-started.mdx create mode 100644 versioned_docs/version-3/03-github-cloud-runner/03-examples/01-command-line.mdx create mode 100644 versioned_docs/version-3/03-github-cloud-runner/03-examples/02-github-examples/02-aws.mdx create mode 100644 versioned_docs/version-3/03-github-cloud-runner/03-examples/02-github-examples/03-kubernetes.mdx create mode 100644 versioned_docs/version-3/03-github-cloud-runner/03-examples/02-github-examples/_category_.yaml create mode 100644 versioned_docs/version-3/03-github-cloud-runner/03-examples/_category_.yaml create mode 100644 versioned_docs/version-3/03-github-cloud-runner/04-api-reference.mdx create mode 100644 versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/01-caching.mdx create mode 100644 versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/02-retained-workspace.mdx create mode 100644 versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/03-garbage-collection.mdx create mode 100644 versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/04-configuration-override.mdx create mode 100644 versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/04-custom-hooks/01-custom-job.mdx create mode 100644 versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/04-custom-hooks/03-command-hooks.mdx create mode 100644 versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/04-custom-hooks/04-container-hooks.mdx create mode 100644 versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/04-custom-hooks/05-premade-container-jobs.mdx create mode 100644 versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/04-custom-hooks/_category_.yaml create mode 100644 versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/05-logging.mdx create mode 100644 versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/06-secrets.mdx create mode 100644 versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/09-gitlab/01-introduction-gitlab.mdx create mode 100644 versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/09-gitlab/_category_.yaml create mode 100644 versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/10-github/01-github-checks.mdx create mode 100644 versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/10-github/_category_.yaml create mode 100644 versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/_category_.yaml create mode 100644 versioned_docs/version-3/03-github-cloud-runner/_category_.yaml create mode 100644 versioned_docs/version-3/03-github/01-getting-started.mdx create mode 100644 versioned_docs/version-3/03-github/02-activation.mdx create mode 100644 versioned_docs/version-3/03-github/03-test-runner.mdx create mode 100644 versioned_docs/version-3/03-github/04-builder.mdx create mode 100644 versioned_docs/version-3/03-github/05-returning-a-license.mdx create mode 100644 versioned_docs/version-3/03-github/06-deployment/_category_.yaml create mode 100644 versioned_docs/version-3/03-github/06-deployment/android.mdx create mode 100644 versioned_docs/version-3/03-github/06-deployment/ios.mdx create mode 100644 versioned_docs/version-3/03-github/06-deployment/steam.mdx create mode 100644 versioned_docs/version-3/03-github/_category_.yaml create mode 100644 versioned_docs/version-3/05-gitlab/01-getting-started.mdx create mode 100644 versioned_docs/version-3/05-gitlab/02-activation.mdx create mode 100644 versioned_docs/version-3/05-gitlab/03-example-project.mdx create mode 100644 versioned_docs/version-3/05-gitlab/04-custom-build-options.mdx create mode 100644 versioned_docs/version-3/05-gitlab/05-tests.mdx create mode 100644 versioned_docs/version-3/05-gitlab/06-deployment/_category_.yaml create mode 100644 versioned_docs/version-3/05-gitlab/06-deployment/android.mdx create mode 100644 versioned_docs/version-3/05-gitlab/06-deployment/ios.mdx create mode 100644 versioned_docs/version-3/05-gitlab/_category_.yaml create mode 100644 versioned_docs/version-3/08-docker/01-docker-images.mdx create mode 100644 versioned_docs/version-3/08-docker/02-windows-docker-images.mdx create mode 100644 versioned_docs/version-3/08-docker/03-customize-docker-images.mdx create mode 100644 versioned_docs/version-3/08-docker/04-versions.mdx create mode 100644 versioned_docs/version-3/08-docker/_category_.yaml create mode 100644 versioned_docs/version-3/09-troubleshooting/_category_.yaml create mode 100644 versioned_docs/version-3/09-troubleshooting/common-issues.mdx create mode 100644 versioned_docs/version-3/10-faq/index.mdx create mode 100644 versioned_docs/version-3/11-circleci/01-getting-started.mdx create mode 100644 versioned_docs/version-3/11-circleci/02-activation.mdx create mode 100644 versioned_docs/version-3/11-circleci/03-build.mdx create mode 100644 versioned_docs/version-3/11-circleci/04-test.mdx create mode 100644 versioned_docs/version-3/11-circleci/05-executors.mdx create mode 100644 versioned_docs/version-3/11-circleci/_category_.yaml create mode 100644 versioned_docs/version-3/index.mdx create mode 100644 versioned_sidebars/version-3-sidebars.json diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index dd61a67a..aed34d8e 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -9,44 +9,44 @@ jobs: name: Code formatting runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 18 - - uses: c-hive/gha-yarn-cache@v2 + cache: 'yarn' - run: yarn - run: yarn verify:formatting codeStyles: name: Code styles runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 18 - - uses: c-hive/gha-yarn-cache@v2 + cache: 'yarn' - run: yarn - run: yarn verify:code-styles types: name: Types check runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 18 - - uses: c-hive/gha-yarn-cache@v2 + cache: 'yarn' - run: yarn - run: yarn typecheck tests: name: Tests runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 18 - - uses: c-hive/gha-yarn-cache@v2 + cache: 'yarn' - run: yarn - run: yarn test --coverage - run: bash <(curl -s https://codecov.io/bash) diff --git a/.github/workflows/firebase-hosting-merge.yml b/.github/workflows/firebase-hosting-merge.yml index b8b5f0bc..1d638de5 100644 --- a/.github/workflows/firebase-hosting-merge.yml +++ b/.github/workflows/firebase-hosting-merge.yml @@ -11,10 +11,10 @@ jobs: runs-on: ubuntu-latest steps: # Checkout - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # Build - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: 18 cache: yarn diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index 9b9a6d75..9aee3c78 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -9,10 +9,10 @@ jobs: runs-on: ubuntu-latest steps: # Checkout - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # Build - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: 18 cache: yarn diff --git a/.github/workflows/search-trigger.yml b/.github/workflows/search-trigger.yml index a2828301..615cd1ba 100644 --- a/.github/workflows/search-trigger.yml +++ b/.github/workflows/search-trigger.yml @@ -6,7 +6,7 @@ jobs: name: Update search index runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: darrenjennings/algolia-docsearch-action@da2ed379c147b356d60dbfec68bdcfacb2791a98 with: algolia_application_id: 'E57FOT37U9' diff --git a/docs/03-github-cloud-runner/03-examples/02-github-examples/02-aws.mdx b/docs/03-github-cloud-runner/03-examples/02-github-examples/02-aws.mdx index 2317f92f..8bafa486 100644 --- a/docs/03-github-cloud-runner/03-examples/02-github-examples/02-aws.mdx +++ b/docs/03-github-cloud-runner/03-examples/02-github-examples/02-aws.mdx @@ -17,7 +17,7 @@ If you're using GitHub you can use a GitHub Action: ```yaml - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v4 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} diff --git a/docs/03-github/01-getting-started.mdx b/docs/03-github/01-getting-started.mdx index 0f6f611e..6cb64b6a 100644 --- a/docs/03-github/01-getting-started.mdx +++ b/docs/03-github/01-getting-started.mdx @@ -77,7 +77,7 @@ jobs: steps: # Checkout - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: lfs: true @@ -99,7 +99,7 @@ jobs: # Build - name: Build project - uses: game-ci/unity-builder@v3 + uses: game-ci/unity-builder@v4 env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} @@ -132,7 +132,7 @@ jobs: steps: # Checkout (without LFS) - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Git LFS - name: Create LFS file list @@ -169,7 +169,7 @@ jobs: # Build - name: Build project - uses: game-ci/unity-builder@v3 + uses: game-ci/unity-builder@v4 env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} @@ -202,7 +202,7 @@ jobs: steps: # Checkout - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: lfs: true @@ -228,7 +228,7 @@ jobs: steps: # Checkout - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: lfs: true @@ -242,7 +242,7 @@ jobs: # Build - name: Build project - uses: game-ci/unity-builder@v3 + uses: game-ci/unity-builder@v4 env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} @@ -294,7 +294,7 @@ jobs: - Android # Build an Android player. - WebGL # WebGL. steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 lfs: true @@ -323,7 +323,7 @@ jobs: path: ${{ steps.testRunner.outputs.artifactsPath }} - if: matrix.targetPlatform == 'Android' uses: jlumbroso/free-disk-space@v1.2.0 - - uses: game-ci/unity-builder@v3 + - uses: game-ci/unity-builder@v4 env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} @@ -356,7 +356,7 @@ jobs: - WSAPlayer # Build a UWP App. steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 lfs: true @@ -370,7 +370,7 @@ jobs: Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }}- Library-${{ matrix.projectPath }}- Library- - - uses: game-ci/unity-builder@v3 + - uses: game-ci/unity-builder@v4 env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} @@ -400,7 +400,7 @@ jobs: - StandaloneOSX # Build a macOS standalone. steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 lfs: true @@ -416,7 +416,7 @@ jobs: Library-${{ matrix.projectPath }}- Library- - - uses: game-ci/unity-builder@v3 + - uses: game-ci/unity-builder@v4 env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} diff --git a/docs/03-github/02-activation.mdx b/docs/03-github/02-activation.mdx index f75816d1..82060c58 100644 --- a/docs/03-github/02-activation.mdx +++ b/docs/03-github/02-activation.mdx @@ -50,7 +50,7 @@ jobs: uses: game-ci/unity-request-activation-file@v2 # Upload artifact (Unity_v20XX.X.XXXX.alf) - name: Expose as artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: ${{ steps.getManualLicenseFile.outputs.filePath }} path: ${{ steps.getManualLicenseFile.outputs.filePath }} @@ -132,7 +132,7 @@ floating license will be acquired before the build, and returned after. Example of use: ```yaml -- uses: game-ci/unity-builder@v3 +- uses: game-ci/unity-builder@v4 with: targetPlatform: WebGL unityLicensingServer: [url to your license server] diff --git a/docs/03-github/03-test-runner.mdx b/docs/03-github/03-test-runner.mdx index 197ae5c0..43472df2 100644 --- a/docs/03-github/03-test-runner.mdx +++ b/docs/03-github/03-test-runner.mdx @@ -178,7 +178,7 @@ To do this, it is recommended to use the official Github Actions By default, Test Runner outputs its results to a folder named `artifacts`. ```yaml -- uses: actions/upload-artifact@v2 +- uses: actions/upload-artifact@v3 if: always() with: name: Test results @@ -198,7 +198,7 @@ You can specify a different `artifactsPath` in the test runner and reference thi ``` ```yaml -- uses: actions/upload-artifact@v2 +- uses: actions/upload-artifact@v3 if: always() with: name: Test results @@ -212,7 +212,7 @@ read by the step's `outputs.coveragePath`. These coverage options can be configu test and by default will create an XML and HTML web page reports. ```yaml -- uses: actions/upload-artifact@v2 +- uses: actions/upload-artifact@v3 if: always() with: name: Coverage results @@ -234,7 +234,7 @@ To do so, simply add Github Actions' official [cache action](https://github.com/marketplace/actions/cache) before any unity steps. ```yaml -- uses: actions/cache@v2 +- uses: actions/cache@v3 with: path: path/to/your/project/Library key: Library-MyProjectName-TargetPlatform @@ -443,10 +443,10 @@ jobs: - editmode - standalone steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: lfs: true - - uses: actions/cache@v2 + - uses: actions/cache@v3 with: path: ${{ matrix.projectPath }}/Library key: Library-${{ matrix.projectPath }} @@ -463,12 +463,12 @@ jobs: githubToken: ${{ secrets.GITHUB_TOKEN }} checkName: ${{ matrix.testMode }} Test Results coverageOptions: 'generateAdditionalMetrics;generateHtmlReport;generateBadgeReport;assemblyFilters:+my.assembly.*' - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 if: always() with: name: Test results for ${{ matrix.testMode }} path: ${{ steps.tests.outputs.artifactsPath }} - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 if: always() with: name: Coverage results for ${{ matrix.testMode }} @@ -499,7 +499,7 @@ jobs: - playmode - editmode steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: lfs: true - uses: game-ci/unity-test-runner@v3 @@ -515,12 +515,12 @@ jobs: githubToken: ${{ secrets.GITHUB_TOKEN }} checkName: ${{ matrix.testMode }} Test Results coverageOptions: 'generateAdditionalMetrics;generateHtmlReport;generateBadgeReport;assemblyFilters:+my.assembly.*' - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 if: always() with: name: Test results for ${{ matrix.testMode }} path: ${{ steps.tests.outputs.artifactsPath }} - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 if: always() with: name: Coverage results for ${{ matrix.testMode }} diff --git a/docs/03-github/04-builder.mdx b/docs/03-github/04-builder.mdx index ecf14252..84f611fd 100644 --- a/docs/03-github/04-builder.mdx +++ b/docs/03-github/04-builder.mdx @@ -40,7 +40,7 @@ secret. Then, define the build step as follows: ```yaml -- uses: game-ci/unity-builder@v3 +- uses: game-ci/unity-builder@v4 env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} @@ -60,7 +60,7 @@ Make sure you have set up these variables in the activation step: Then, define the build step as follows: ```yaml -- uses: game-ci/unity-builder@v3 +- uses: game-ci/unity-builder@v4 env: UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} @@ -77,7 +77,7 @@ If you host your own Unity license server internally you can provide its url usi Example of use: ```yaml -- uses: game-ci/unity-builder@v3 +- uses: game-ci/unity-builder@v4 with: targetPlatform: WebGL unityLicensingServer: [url to your license server] @@ -99,7 +99,7 @@ By default, Builder outputs it's builds to a folder named `build`. Example: ```yaml -- uses: actions/upload-artifact@v2 +- uses: actions/upload-artifact@v3 with: name: Build path: build @@ -116,7 +116,7 @@ before any unity steps. Example: ```yaml -- uses: actions/cache@v2 +- uses: actions/cache@v3 with: path: path/to/your/project/Library key: Library-MyProjectName-TargetPlatform @@ -152,7 +152,7 @@ _**required:** `false`_ _**default:** `auto`_ Specific docker image that should be used for building the project. ```yaml -- uses: game-ci/unity-builder@v3 +- uses: game-ci/unity-builder@v4 with: customImage: 'unityci/editor:2020.1.14f1-base-0' ``` @@ -192,7 +192,7 @@ There are two conditions for a custom buildMethod: Example: ```yaml -- uses: game-ci/unity-builder@v3 +- uses: game-ci/unity-builder@v4 with: buildMethod: EditorNamespace.BuilderClassName.StaticBuildMethod ``` @@ -202,7 +202,7 @@ To get started with a modified version of the default Unity Builder build script `Assets/Editor/UnityBuilderAction` directory and reference it: ```yaml -- uses: game-ci/unity-builder@v3 +- uses: game-ci/unity-builder@v4 with: buildMethod: UnityBuilderAction.BuildScript.Build ``` @@ -220,7 +220,7 @@ Parameters must start with a hyphen (`-`) and may be followed by a value (withou Parameters without a value will be considered booleans (with a value of true). ```yaml -- uses: game-ci/unity-builder@v3 +- uses: game-ci/unity-builder@v4 with: customParameters: -profile SomeProfile -someBoolean -someValue exampleValue ``` @@ -240,7 +240,7 @@ _**required:** `false`_ _**default:** `""`_ Configure a specific versioning strategy ```yaml -- uses: game-ci/unity-builder@v3 +- uses: game-ci/unity-builder@v4 with: versioning: Semantic ``` @@ -300,7 +300,7 @@ Set this flag to `androidPackage` to build an apk, `androidAppBundle` for an aab `androidStudioProject` to build an Android Studio Project. ```yaml -- uses: game-ci/unity-builder@v3 +- uses: game-ci/unity-builder@v4 with: androidExportType: 'androidAppBundle' androidKeystoreName: user.keystore @@ -410,7 +410,7 @@ _**required:** `false`_ _**default:** `""`_ Allows the branch of the build to be dirty, and still generate the build. ```yaml -- uses: game-ci/unity-builder@v3 +- uses: game-ci/unity-builder@v4 with: allowDirtyBuild: true ``` @@ -488,7 +488,7 @@ Returns the version that was generated by Builder, following the strategy config `versioning`. ```yaml -- uses: game-ci/unity-builder@v3 +- uses: game-ci/unity-builder@v4 id: myBuildStep - run: echo 'Project Version: ${{ steps.myBuildStep.outputs.buildVersion }}' ``` @@ -498,7 +498,7 @@ Returns the version that was generated by Builder, following the strategy config Returns the version code that was generated by Builder for Android builds. ```yaml -- uses: game-ci/unity-builder@v3 +- uses: game-ci/unity-builder@v4 id: myBuildStep - run: echo 'Android Version Code: ${{ steps.myBuildStep.outputs.androidVersionCode }}' ``` @@ -533,11 +533,11 @@ run: | name: Accessing private repos runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: webfactory/ssh-agent@v0.8.0 with: ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} - - uses: game-ci/unity-builder@v3 + - uses: game-ci/unity-builder@v4 with: sshAgent: ${{ env.SSH_AUTH_SOCK }} ``` @@ -577,7 +577,7 @@ using `sshPublicKeysDirectoryPath` and setting the `GIT_CONFIG_EXTENSIONS` envir } >> "$GITHUB_ENV" shell: bash -- uses: game-ci/unity-builder@v3 +- uses: game-ci/unity-builder@v4 with: sshAgent: ${{ env.SSH_AUTH_SOCK }} sshPublicKeysDirectoryPath: ${{ env.HOME }}/.ssh_docker @@ -588,7 +588,7 @@ using `sshPublicKeysDirectoryPath` and setting the `GIT_CONFIG_EXTENSIONS` envir Unity requires an .upmconfig.toml to exist in the home directory to authenticate and download packages from private UPM registries. To create this file, first create the `/home/runner/work/_temp/_github_home` directory, and then create the .upmconfig.toml file inside -that directory. This action must be done before running the game-ci/unity-builder@v2 action. +that directory. This action must be done before running the game-ci/unity-builder@v4 action. ```yaml - name: Create .upmconfig.toml UPM authentication file @@ -625,7 +625,7 @@ jobs: - Android # Build an Android .apk standalone app. - WebGL # WebGL. steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 lfs: true @@ -635,8 +635,8 @@ jobs: key: Library-${{ matrix.targetPlatform }} restore-keys: Library- - if: matrix.targetPlatform == 'Android' - uses: jlumbroso/free-disk-space@v1.3.0 - - uses: game-ci/unity-builder@v3 + uses: jlumbroso/free-disk-space@v1.3.1 + - uses: game-ci/unity-builder@v4 env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} with: diff --git a/docs/03-github/06-deployment/android.mdx b/docs/03-github/06-deployment/android.mdx index 6d001b2c..306a0ca5 100644 --- a/docs/03-github/06-deployment/android.mdx +++ b/docs/03-github/06-deployment/android.mdx @@ -166,13 +166,13 @@ jobs: name: Build For Android Platform runs-on: ubuntu-latest steps: - - uses: jlumbroso/free-disk-space@v1.2.0 - - uses: actions/checkout@v3 + - uses: jlumbroso/free-disk-space@v1.3.1 + - uses: actions/checkout@v4 - uses: actions/cache@v3 with: path: Library key: Library-Android - - uses: game-ci/unity-builder@v3 + - uses: game-ci/unity-builder@v4 with: targetPlatform: Android androidAppBundle: true @@ -181,7 +181,7 @@ jobs: androidKeystorePass: ${{ secrets.ANDROID_KEYSTORE_PASS }} androidKeyaliasName: ${{ secrets.ANDROID_KEYALIAS_NAME }} androidKeyaliasPass: ${{ secrets.ANDROID_KEYALIAS_PASS }} - androidTargetSdkVersion: AndroidApiLevel31 + androidTargetSdkVersion: AndroidApiLevel33 - uses: actions/upload-artifact@v3 with: name: build-Android @@ -199,9 +199,9 @@ jobs: ANDROID_PACKAGE_NAME: ${{ secrets.ANDROID_PACKAGE_NAME }} steps: - name: Checkout Repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Download Android Artifact - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: build-Android path: build/Android @@ -210,15 +210,15 @@ jobs: - name: Set up Fastlane uses: ruby/setup-ruby@v1 with: - ruby-version: 2.7.2 + ruby-version: 3.2 bundler-cache: true - name: Upload to Google Play Internal - uses: maierj/fastlane-action@v2.0.1 + uses: maierj/fastlane-action@v3.0.0 with: lane: 'android internal' # Change to upload to a different lane - name: Cleanup to avoid storage limit if: always() - uses: geekyeggo/delete-artifact@v1 + uses: geekyeggo/delete-artifact@v2 with: name: build-Android ``` diff --git a/docs/03-github/06-deployment/ios.mdx b/docs/03-github/06-deployment/ios.mdx index b791026a..a1c1ddc2 100644 --- a/docs/03-github/06-deployment/ios.mdx +++ b/docs/03-github/06-deployment/ios.mdx @@ -185,10 +185,10 @@ jobs: setup: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: 2.6 + ruby-version: 3.2 bundler-cache: true - name: Build iOS @@ -219,10 +219,10 @@ jobs: generate_certs: runs-on: macos-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: 2.6 + ruby-version: 3.2 bundler-cache: true - name: Build iOS @@ -429,18 +429,18 @@ jobs: name: Build for iOS runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - uses: actions/cache@v2 + - uses: actions/cache@v3 with: path: Library key: Library-iOS - - uses: game-ci/unity-builder@v3 + - uses: game-ci/unity-builder@v4 with: targetPlatform: iOS - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: build-iOS path: build/iOS @@ -451,10 +451,10 @@ jobs: needs: buildForiOSPlatform steps: - name: Checkout Repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Download iOS Artifact - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: build-iOS path: build/iOS @@ -485,7 +485,7 @@ jobs: - name: Cleanup to avoid storage limit if: always() - uses: geekyeggo/delete-artifact@v1 + uses: geekyeggo/delete-artifact@v2 with: name: build-iOS ``` diff --git a/docs/03-github/06-deployment/steam.mdx b/docs/03-github/06-deployment/steam.mdx index a5a95049..7e82cb07 100644 --- a/docs/03-github/06-deployment/steam.mdx +++ b/docs/03-github/06-deployment/steam.mdx @@ -27,7 +27,7 @@ jobs: outputs: buildVersion: ${{ steps.build.outputs.buildVersion }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 lfs: true @@ -40,7 +40,7 @@ jobs: restore-keys: | Library-${{ matrix.targetPlatform }}- Library- - - uses: game-ci/unity-builder@v3 + - uses: game-ci/unity-builder@v4 id: build env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} @@ -56,7 +56,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Download StandaloneWindows64 Artifact diff --git a/docs/09-troubleshooting/common-issues.mdx b/docs/09-troubleshooting/common-issues.mdx index b50b0613..b89d8c1e 100644 --- a/docs/09-troubleshooting/common-issues.mdx +++ b/docs/09-troubleshooting/common-issues.mdx @@ -118,12 +118,12 @@ To know which docker images are available, you can visit the list of [all suppor here][unity-docker-versions]. In this particular case, it is also important to look for the last part of the docker image which is -the version for GameCI. `-0` means it is the latest `v0.x.x` version of the docker images. `v0.x.x` -and `v1.x.x` are out of date as we moved to Version 2 as shown on +the version for GameCI. `-0` means it is the latest `v0.x.x` version of the docker images. `v0.x.x`, +`v1.x.x`, and `v2.x.x` are out of date as we moved to Version 3 as shown on [github.com/game-ci/docker/releases](https://github.com/game-ci/docker/releases). We are not -publishing images for `v0.x.x` or `v1.x.x` anymore. +publishing images for `v0.x.x`, `v1.x.x`, `v2.x.x` anymore. -The correct image should be `unityci/editor:2021.3.0f1-android-2`. +The correct image should be `unityci/editor:2021.3.0f1-android-3`. You can also test this locally: @@ -133,24 +133,24 @@ docker pull unityci/editor:2021.3.0f1-android-0 # Error response from daemon: manifest for unityci/editor:2021.3.0f1-android-0 not found: manifest unknown: manifest unknown # right -docker pull unityci/editor:2021.3.0f1-android-2 -# 2021.3.0f1-android-2: Pulling from unityci/editor +docker pull unityci/editor:2021.3.0f1-android-3 +# 2021.3.0f1-android-3: Pulling from unityci/editor # [...] ``` #### Github Actions -You need to make sure you are using Github Actions v3, check for the version of your actions in your +You need to make sure you are using Github Actions v4, check for the version of your actions in your `.github/workflows/*.yml` files. ```diff -- uses: game-ci/unity-builder@v2 -+ uses: game-ci/unity-builder@v3 +- uses: game-ci/unity-builder@v3 ++ uses: game-ci/unity-builder@v4 ``` #### Gitlab CI -Set the `IMAGE_VERSION` to 2 in +Set the `IMAGE_VERSION` to 3 in [`.gitlab-ci.yml`](https://gitlab.com/game-ci/unity3d-gitlab-ci-example/-/blob/main/.gitlab-ci.yml#L12) ### Scripts have compiler errors. diff --git a/docusaurus.config.js b/docusaurus.config.js index 9311baf4..dc5e720b 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -49,7 +49,10 @@ const config = { lastVersion: 'current', versions: { current: { - label: 'v3 (current)', + label: 'v4 (current)', + }, + 3: { + label: 'v3', }, 2: { label: 'v2', diff --git a/versioned_docs/version-3/02-getting-started/index.mdx b/versioned_docs/version-3/02-getting-started/index.mdx new file mode 100644 index 00000000..ac28d8af --- /dev/null +++ b/versioned_docs/version-3/02-getting-started/index.mdx @@ -0,0 +1,39 @@ +# Getting started + +The term for automatically testing, building, and deploying your project is Continuous Integration, +or CI for short. + +The configuration for CI, we commonly call a CI-workflow. + +To get started creating your workflow, you need 3 things: + +- A Unity project +- A Git host (GitHub, GitLab, your private server, etc.) +- A CI system (GitHub Actions, GitLab pipelines, CircleCI, TravisCI, Jenkins, etc.) + +## Preparing the project + +**Create a repository** on your chosen Git host and follow their instructions to commit and push +your project. + +Be sure to **ignore any automatically generated files**, by adding the reference +[.gitignore](https://github.com/github/gitignore/blob/master/Unity.gitignore) file to the root of +your project. Please note that you may have to extend this file to ignore the temporary files +created by the runners, as the creation of these temporary files may cause a runners' local branch +to become dirty (more info [here](/docs/troubleshooting/common-issues#branch-is-dirty])): + +Two common temporary folders that are created by GameCI are `artifacts` and `CodeCoverage`. You can +ignore them by adding the following lines to your `.gitignore`: + +``` +# Ignore temporaries from GameCI +/[Aa]rtifacts/ +/[Cc]odeCoverage/ +``` + +To **ensure large files are handled correctly** (in [LFS](https://git-lfs.github.com/)), you can add +our reference +[.gitattributes](https://gist.github.com/webbertakken/ff250a0d5e59a8aae961c2e509c07fbc) file to the +root of your project. + +You are now **ready** to create a workflow! Choose the CI system you chose in the menu on the left. diff --git a/versioned_docs/version-3/03-github-cloud-runner/01-introduction.mdx b/versioned_docs/version-3/03-github-cloud-runner/01-introduction.mdx new file mode 100644 index 00000000..d67936b5 --- /dev/null +++ b/versioned_docs/version-3/03-github-cloud-runner/01-introduction.mdx @@ -0,0 +1,104 @@ +# Introduction + +## Concept - What Does Cloud Runner Do + +**Cloud Runner enables you to run, build and test (Unity) projects in the cloud. You can start jobs +from the command line, the "Workbench" GUI in the Unity Editor or from GitHub Actions.** + +**Cloud Runner will automatically provision an environment at a Cloud Provider such as GCP and AWS. +It will then send the project to be built and/or tested depending on your workflow configuration.** + +**Cloud Runner is especially useful for game development because it supports large projects. Cloud +Runner provides first class support for the Unity game engine.** + +Cloud Runner uses git to track and syncronize your projects and uses native cloud services such as +AWS Fargate and Kubernetes to run your jobs. Other version control systems are not actively +supported. + +## Why Cloud Runner? + +1. **Cloud runner is flexible and elastic** + 1. _You can balance your use of high-performance and cost saving modes._ Configurable cost/speed + effeciency + 2. _Works great for projects of almost any size, from AAA projects and assets to micro projects_ + 3. _Extended configuration options._ More control over disk size, memory and CPU + 4. _Easily scale all job resources as your project grows_ e.g storage, CPU and memory +2. **Scale fully on demand from zero (not in use) to many concurrent jobs.** Benefits from + "pay-for-what-you-use" cloud billing models. We have made an effort to make sure that it costs + you nothing (aside from artifact and cache storage) while there are no builds running (no + guarantees) +3. **Easy setup and configuration** +4. **Run custom jobs** and extend the system for any workload + +## Why not cloud runner? + +1. Your project is small in size. Below 5GB Cloud Runner should not be needed. +2. You already have dedicated servers running you can use. + +Although the speed of a CI pipelines is an important metric to consider, there are real challenges +for game development pipelines. + +This solution prefers convenience, ease of use, scalability, throughput and flexibility. + +Faster solutions exist, but would all involve self-hosted hardware with an immediate local cache of +the large project files and working directory and a dedicated server. + +# Cloud Runner Release Status + +Cloud Runner is in "active development" ⚠️🔨 + +Cloud Runner overall release status: `preview` This means some APIs may change, features are still +being added but the minimum feature set works and is stable. + +Release Stages: `experimental` ➡️ `preview` ➡️ `full release` + +You must use a provider with Cloud Runner, each provider's release status is described below. This +indicates the stability and support for cloud runner features and workflows. + +### Supported Cloud Runner Platforms + +```md +| Cloud Provider Platform | Release Status | +| ----------------------- | ------------------ | +| Kubernetes | ✔️ preview release | +| AWS | ✔️ full release | +| GCP | ⚠ Considered | +| Azure | ⚠ Considered | +``` + +_Note for Kubernetes support:_ _Usually the cluster needs to be up and running at all times, as +starting up a cluster is slow._ _Use Google Cloud's Kubernetes Autopilot you can scale down to the +free tier automatically while not in use._ _Kubernetes support currently requires cloud storage, +only S3 support is built-in._ + +```md +| Git Platform | Release Status | +| --------------------- | ------------------ | +| GitHub | ✔️ full release | +| GitLab | ✔️ preview release | +| Command Line | ✔️ preview release | +| Any Git repository | ✔️ preview release | +| Any Git automation/Ci | ✔️ preview release | +``` + +## External Links + +### Cloud Runner Releases + +[Game CI Releases - GitHub](https://github.com/game-ci/unity-builder/releases) _Packaged and +released with game-ci's unity-builder module._ + +### Open Incoming Pull Requests + +[Cloud Runner PRs - GitHub](https://github.com/game-ci/unity-builder/pulls?q=is%3Apr+cloud+runner) + +### 💬Suggestions and 🐛Bugs (GitHub Issues): + +[Game CI Issues - GitHub](https://github.com/game-ci/unity-builder/labels/cloud-runner) + +### Community + +**Share your feedback with us!** + +- [**Discord Channel**](https://discord.com/channels/710946343828455455/789631903157583923) +- [**Feedback Form**](https://forms.gle/3Wg1gGf9FnZ72RiJ9) diff --git a/versioned_docs/version-3/03-github-cloud-runner/02-game-ci-vs-cloud-runner.mdx b/versioned_docs/version-3/03-github-cloud-runner/02-game-ci-vs-cloud-runner.mdx new file mode 100644 index 00000000..1ba9ae94 --- /dev/null +++ b/versioned_docs/version-3/03-github-cloud-runner/02-game-ci-vs-cloud-runner.mdx @@ -0,0 +1,42 @@ +# Game-CI vs Cloud Runner + +# Standard Game-CI (Use Cases) + +The Game CI core is a maintained set of docker images that can be used to run workloads in many +scenarios. + +Game CI also provides specific GitHub actions for running workflows on GitHub. And a similar +workflow for running Game CI on GitLab and Circle CI. _All of these options use the build server +resources provided by those systems, this can be a constraint or very convenient depending on the +size of your project and the workloads you need to run._ + +# Cloud Runner (Use Cases) + +## Sending Builds to the cloud + +You may want to take advantage of cloud resources for lots of reasons (scale, speed, cost, +flexibility) or may want to start remote builds from the command line without slowing down your +development machine. Cloud Runner can help you do this. + +This may be a preference, more effecient or you may want to use systems that struggle to handle +large game development projects (GitHub being a good example). + +### Large GitHub Projects + +GitHub Actions by default run on +[build machines provided by GitHub](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners). +For Unity projects the available disk size is quite small. You may experience an error related to +running out of disk space. You may also want to run the build on a server with more memory or +processing resources. + +### GitHub Self-Hosted Runners vs Game CI Cloud Runner + +_GitHub users can consider: +[GitHub self-hosted runners](https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners) +and Cloud Runner. Both can enable you to build larger projects._ + +_Cloud Runner is better if you don't have a server setup or don't want to manage or maintain your +own build server._ + +_Self-hosted runners are best used when you already have a server available, running 24/7 that you +can setup as a runner. And you're happy to maintain and keep that server available and running._ diff --git a/versioned_docs/version-3/03-github-cloud-runner/02-getting-started.mdx b/versioned_docs/version-3/03-github-cloud-runner/02-getting-started.mdx new file mode 100644 index 00000000..7e12cfdf --- /dev/null +++ b/versioned_docs/version-3/03-github-cloud-runner/02-getting-started.mdx @@ -0,0 +1,3 @@ +# Getting Started + +To get quickly started checkout one of our examples: diff --git a/versioned_docs/version-3/03-github-cloud-runner/03-examples/01-command-line.mdx b/versioned_docs/version-3/03-github-cloud-runner/03-examples/01-command-line.mdx new file mode 100644 index 00000000..5c315d0f --- /dev/null +++ b/versioned_docs/version-3/03-github-cloud-runner/03-examples/01-command-line.mdx @@ -0,0 +1,49 @@ +# Command Line + +_Preview Support Only_ + +You can install Game CI locally and start cloud runner jobs from the command line or by integrating +your own tools. All parameters in [API Reference](../api-reference) can be specified as command line +input fields. + +# Install + +Currently (development) + +```bash +git clone https://github.com/game-ci/unity-builder.git +yarn install +yarn run cli -m {mode parameter} --projectPath {Your project path} {... other command line parameters} +``` + +# Planned (does not work currently) + +We plan to offer support for Game CI via Deno. This will enable fast, typescript native runtime and +you will be able to access this via the following: + +```bash +dpx game-ci build +``` + +# Help + +_You can run `yarn run cli -h` or `yarn run cli --help` to list all modes and paramters with +descriptions_ + +# Main Command Parameters + +- Default: `cli` (runs a standard build workflow) +- See API Reference "Modes" + +# Keeping command line parameters short + +You can avoid specifying long command line input for credentials by using environment variables or +[the input override feature](../advanced-topics/configuration-override#example) to shorten commands +signficantly. + +This enables you to provide a command to pull input, e.g you can pull from a file or from a secret +manager. + +```bash +yarn run cli --populateOverride true --pullInputList UNITY_EMAIL,UNITY_SERIAL,UNITY_PASSWORD --inputPullCommand="gcloud secrets versions access 1 --secret=\"{0}\"" +``` diff --git a/versioned_docs/version-3/03-github-cloud-runner/03-examples/02-github-examples/02-aws.mdx b/versioned_docs/version-3/03-github-cloud-runner/03-examples/02-github-examples/02-aws.mdx new file mode 100644 index 00000000..2317f92f --- /dev/null +++ b/versioned_docs/version-3/03-github-cloud-runner/03-examples/02-github-examples/02-aws.mdx @@ -0,0 +1,71 @@ +# AWS + +## Requirements + +- You must have an AWS account setup and ready to create resources. +- Create a service account and generate an AWS access key and key id. + +## AWS Credentials + +Setup the following as `env` variables for cloud runner to use: + +- `AWS_ACCESS_KEY_ID` +- `AWS_SECRET_ACCESS_KEY` +- `AWS_DEFAULT_REGION` (should be the same AWS region as the base stack e.g `eu-west-2`) + +If you're using GitHub you can use a GitHub Action: + +```yaml +- name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: eu-west-2 +``` + +_Note:_ _This enables Cloud Runner access AWS._ + +## Configuration For AWS Cloud Runner Jobs + +Refer to [Configuration page](../../api-reference) or the [example below](#example). + +### Allowed CPU/Memory Combinations + +There are some limitations to the CPU and Memory parameters. AWS will only accept the following +combinations: +[AWS Fargate Documentation, Allowed CPU and memory values (Task Definitions)](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_size) + +#### Summary Of Format + +- Values are represented as 1024:1 GB or CPU. +- Do not include the vCPU or GB suffix. +- 1 CPU can go to a max of 6 GB of memory. 2 CPU's are required to go higher. + +#### Valid CPU and Memory Values + +```yaml +- cloudRunnerMemory: 4096 +- cloudRunnerCpu: 1024 +``` + +## Example + +```yaml +- uses: game-ci/unity-builder@cloud-runner-develop + id: aws-fargate-unity-build + with: + providerStrategy: aws + versioning: None + projectPath: `your path here` + unityVersion: `unity version here` + targetPlatform: ${{ matrix.targetPlatform }} + gitPrivateToken: ${{ secrets.GITHUB_TOKEN }} + # You may want to export your builds somewhere external so you can access it: + containerHookFiles: aws-s3-upload-build +``` + +_[Custom Steps](../../advanced-topics/custom-hooks/container-hooks)_ + +A full workflow example can be seen in builder's +[Cloud Runner GitHub sourcecode for GitHub Pipeline](https://github.com/game-ci/unity-builder/blob/309d668d637ae3e7ffe90d61612968db92e1e376/.github/workflows/cloud-runner-pipeline.yml#L109). diff --git a/versioned_docs/version-3/03-github-cloud-runner/03-examples/02-github-examples/03-kubernetes.mdx b/versioned_docs/version-3/03-github-cloud-runner/03-examples/02-github-examples/03-kubernetes.mdx new file mode 100644 index 00000000..f77ee655 --- /dev/null +++ b/versioned_docs/version-3/03-github-cloud-runner/03-examples/02-github-examples/03-kubernetes.mdx @@ -0,0 +1,51 @@ +# Kubernetes + +## Requirements + +- You must have a Kubernetes cluster setup and ready that supports persistent volumes. +- Create a kubeconfig and encode it as base64. + +## K8s Credentials + +Setup the following as `env` variables for the GitHub build step: + +- `kubeConfig` (should be encoded as base64) + +## Configuration For Kubernetes Cloud Runner Jobs + +Refer to [Configuration page](../../api-reference) or the [example below](#example). + +### Allowed CPU/Memory Combinations + +- `0.25 vCPU` - 0.5 GB, 1 GB, 2 GB +- `0.5 vCPU` - 1 GB, 2 GB, 3 GB, 4 GB +- `1 vCPU` - 2 GB, 3 GB, 4 GB, 5 GB, 6 GB, 7 GB, 8 GB +- `2 vCPU` - Between 4 GB and 16 GB in 1-GB increments +- `4 vCPU` - Between 8 GB and 30 GB in 1-GB increments + +#### Summary Of Format + +- Values are represented as 1024:1 GB or CPU. + +Do not include the vCPU or GB suffix. + +### Example + +```yaml +- uses: game-ci/unity-builder@cloud-runner-develop + id: k8s-unity-build + with: + providerStrategy: k8s + versioning: None + projectPath: `your path here` + unityVersion: `unity version here` + targetPlatform: ${{ matrix.targetPlatform }} + gitPrivateToken: ${{ secrets.GITHUB_TOKEN }} + # You may want to export your builds somewhere external so you can access it: + containerHookFiles: aws-s3-upload-build +``` + +_[Custom Steps](../../advanced-topics/custom-hooks/container-hooks)_ + +A full workflow example can be seen in builder's +[Cloud Runner GitHub sourcecode for AWS Pipeline](https://github.com/game-ci/unity-builder/blob/main/.github/workflows/cloud-runner-k8s-pipeline.yml). diff --git a/versioned_docs/version-3/03-github-cloud-runner/03-examples/02-github-examples/_category_.yaml b/versioned_docs/version-3/03-github-cloud-runner/03-examples/02-github-examples/_category_.yaml new file mode 100644 index 00000000..b9807118 --- /dev/null +++ b/versioned_docs/version-3/03-github-cloud-runner/03-examples/02-github-examples/_category_.yaml @@ -0,0 +1,5 @@ +--- +position: 2.0 +label: GitHub +collapsible: true +collapsed: true diff --git a/versioned_docs/version-3/03-github-cloud-runner/03-examples/_category_.yaml b/versioned_docs/version-3/03-github-cloud-runner/03-examples/_category_.yaml new file mode 100644 index 00000000..825e328f --- /dev/null +++ b/versioned_docs/version-3/03-github-cloud-runner/03-examples/_category_.yaml @@ -0,0 +1,5 @@ +--- +position: 2.0 +label: Examples +collapsible: true +collapsed: true diff --git a/versioned_docs/version-3/03-github-cloud-runner/04-api-reference.mdx b/versioned_docs/version-3/03-github-cloud-runner/04-api-reference.mdx new file mode 100644 index 00000000..67a9ee91 --- /dev/null +++ b/versioned_docs/version-3/03-github-cloud-runner/04-api-reference.mdx @@ -0,0 +1,221 @@ +# API Reference + +## Configuration + +_You can specify input parameters via any of the following methods._ + +- **GitHub Action `with`** _See "Getting Started" examples._ +- **Command Line** _You can specify input parameters via command line._ +- **Environment Variables** _You can specify input parameters via environment variables._ +- **Configuration Override** _[Advanced Topics / Overrides](advanced-topics/configuration-override)_ + +## Modes + +Cloud Runner can accept a parameter to run a specific mode, by default cli-build is run. + +```bash +cli-build +``` + +_runs a cloud runner build_ + +```bash +list-resources +``` + +_lists active resources_ + +```bash +list-worfklow +``` + +_lists running workflows_ + +```bash +watch +``` + +_follows logs of a running workflow_ + +```bash +garbage-collect +``` + +_runs garbage collection_ + +```bash +- cache-push +- cache-pull +``` + +Cache commands to push and pull from the local caching directory. Used in cloud runner workflows. +Uses `cachePullFrom` and `cachePushTo` parameters. + +```bash +- hash (hash folder contents recursively) +- print-input (prints all input parameters) +``` + +Utility commands + +```bash +- remote-cli-pre-build (sets up a repository, usually before a game-ci build) +- remote-cli-post-build (pushes to LFS and Library cache) +``` + +Commands called during cloud runner workflows before/after a build. + +## Common Parameters + +### Git syncronization parameters + +```bash +gitPrivateToken (should be a GitHub access token with permission to get repositories) +``` + +Used to authenticate remote job's access to repository. + +```bash +- GITHUB_REPOSITORY +- GITHUB_REF || branch || GitSHA +``` + +Used to syncronize the repository to the Cloud Runner job. If parameters are not provided, will +attempt to read them from current directory's git repo (e.g branch, commit SHA, remote URL). + +### Cloud Runner parameters + +```bash +providerStrategy +``` + +Specifies the Cloud Provider to use for Cloud Runner jobs. Accepted values: `aws`, `k8s`, +`local-docker`. + +```bash +- containerCpu +- containerMemory +``` + +Specifies the CPU and Memory resources to be used for cloud containers created by Cloud Runner. +(See: getting started section for more configuration options per provider.) + +```bash +cloudRunnerBranch +``` + +Specifies the release branch of Cloud Runner to use for remote containers. Accepted values: `main` +(default), `cloud-runner-preview` (stable/development), `cloud-runner-develop` (latest/development) + +### Custom commands from files parameters + +```bash +- containerHookFiles +- commandHookFiles +- commandHooks +- postBuildContainerHooks +- preBuildContainerHooks +``` + +Specifies the name of custom hook or step files to include in workflow. (Accepted Format: see +"[container hooks](advanced-topics/custom-hooks/container-hooks) +[command hooks](advanced-topics/custom-hooks/command-hooks)") + +### Custom commands from yaml parameters + +```bash +customJob +``` + +Specifies a custom job to override default build workflow. (Accepted Format: see +"[advanced topics / custom job](advanced-topics/custom-hooks/custom-job)") + +### Configuration Override + +```bash +inputPullCommand +``` + +Read parameter from command line ouput, such as a secret manager. Must include a `{0}` to inject the +name of the parameter to pull. (See: +[Configuration Override](advanced-topics/configuration-override)) + +```bash +pullInputList +``` + +List of parameters to apply with `inputPullCommand`. (See: +[Configuration Override](advanced-topics/configuration-override)) + +### Aws + +```bash +awsStackName +``` + +Name of the persistent shared base stack, used to store artifacts and caching. + +### K8s + +```bash +- kubeVolume +- kubeVolumeSize +- kubeStorageClass +``` + +Override name of persistent volume used, size of volume and storage class used. + +### Caching + +```bash +cacheKey +``` + +Defaults to branch name. Defines the scope for sharing cache entries. + +### Utility + +```bash +- cloudRunnerDebug (Debug logging for Cloud Runner) +- useLargePackages (Any packages in manifest.json containing phrase "LargePackage" will be + redirected to a shared folder for all builds sharing a cache key) +- useSharedBuilder (Use a shared clone of Game-CI, saves some storage space and can be used if + you're using one release branch of Cloud Runner) +- useCompressionStrategy (Use Lz4 compression for cache and build artifacts. Enabled by default) +``` + +### Retained Workspace + +```bash +- maxRetainedWorkspaces +``` + +See: [Advanced Topics / Retained Workspaces](advanced-topics/retained-workspace), enables caching +entire project folder. + +### Garbage Collection + +```bash +- garbageMaxAge +``` + +## Command Line Only Parameters + +```bash +- populateOverride +- cachePushFrom +- cachePushTo +- artifactName +- select +``` + +## Other Environment Variables + +```bash +- USE_IL2CPP (Set to `false`) +``` + +# External Links + +All accepted parameters given here with a description: +[https://github.com/game-ci/unity-builder/blob/cloud-runner-develop/action.yml](https://github.com/game-ci/unity-builder/blob/cloud-runner-develop/action.yml) diff --git a/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/01-caching.mdx b/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/01-caching.mdx new file mode 100644 index 00000000..f6fb9645 --- /dev/null +++ b/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/01-caching.mdx @@ -0,0 +1,32 @@ +# Caching + +Cloud Runner supports two main caching modes: + +- Standard Caching +- Retained Workspace + +_You can even mix the two by specifying a "MaxRetainedWorkspaces" parameter. Above the max_ +_concurrent jobs a new job will use standard caching._ + +## Standard Caching + +#### Good For + +- Minimum storage use +- Smaller projects + +#### What is cached between builds + +- LFS files +- Unity Library folder + +## Retained Workspace + +#### Good For + +- Minimum storage use +- Smaller projects + +#### What is cached between builds + +- Entire Project Folder diff --git a/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/02-retained-workspace.mdx b/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/02-retained-workspace.mdx new file mode 100644 index 00000000..0e1bfbcd --- /dev/null +++ b/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/02-retained-workspace.mdx @@ -0,0 +1,8 @@ +# Retained Workspaces + +Caches the entire project folder. This option provides the best responsiveness, but also can consume +lots of storage. + +Using API: `maxRetainedWorkspaces`. You can specify a maximum number of retained workspaces, only +one job can use a retained workspace at one time. Each retained workspace consumes more cloud +storage. diff --git a/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/03-garbage-collection.mdx b/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/03-garbage-collection.mdx new file mode 100644 index 00000000..9f409254 --- /dev/null +++ b/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/03-garbage-collection.mdx @@ -0,0 +1,17 @@ +# Garbage Collection + +Cloud Runner creates, manages and destroys cloud workloads you request. Resources have to be +created. + +It is possible a resource doesn't get deleted by cloud runner. + +You can use garbage collection to verify everything has been cleaned up. + +Use the **Mode**: `garbage-collect`. + +You can use the following API parameters: + +- Max Age +- Max Size +- Preview Only +- Filter diff --git a/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/04-configuration-override.mdx b/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/04-configuration-override.mdx new file mode 100644 index 00000000..94134fc1 --- /dev/null +++ b/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/04-configuration-override.mdx @@ -0,0 +1,19 @@ +# Configuration Override + +When running any unity workload you must provide valid unity credentials. In addition to any other +credentials this is already quite a lot of input. For this reason, it is common to use the command +line mode with input override (link here). This enables you to provide a command to pull input, with +this approach you can create a file to store credentials or pull from a secret manager. + +## Example + +```bash +game-ci -m cli --populateOverride true --readInputFromOverrideList UNITY_EMAIL,UNITY_SERIAL,UNITY_PASSWORD --readInputOverrideCommand="gcloud secrets versions access 1 --secret=\"{0}\"" +``` + +## Required Parameters + +- `populateOverride` - Must be true to run the commands. +- `readInputFromOverrideList` - Comma separated list of parameters to read from override command. +- `readInputOverrideCommand` - A command line command to run (The command is formatted to replace + "{0}" with the parameter parameter name). diff --git a/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/04-custom-hooks/01-custom-job.mdx b/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/04-custom-hooks/01-custom-job.mdx new file mode 100644 index 00000000..ade52d59 --- /dev/null +++ b/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/04-custom-hooks/01-custom-job.mdx @@ -0,0 +1,4 @@ +# Custom Jobs + +You can run a custom job instead of the default build workflow simplfy by specifying the `customJob` +parameter. diff --git a/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/04-custom-hooks/03-command-hooks.mdx b/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/04-custom-hooks/03-command-hooks.mdx new file mode 100644 index 00000000..ee1f2378 --- /dev/null +++ b/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/04-custom-hooks/03-command-hooks.mdx @@ -0,0 +1,12 @@ +# Command Hooks + +Custom commands can be injected into the standard build workflow via yaml or files. + +```yaml +- name: example hook + hook: | + step: + - before + commands: | + echo "hello world!" +``` diff --git a/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/04-custom-hooks/04-container-hooks.mdx b/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/04-custom-hooks/04-container-hooks.mdx new file mode 100644 index 00000000..6e0a9adc --- /dev/null +++ b/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/04-custom-hooks/04-container-hooks.mdx @@ -0,0 +1,13 @@ +# Container Hooks + +Custom docker container steps can be run as part of the standard build workflow. Custom steps can +also be run standalone. + +Custom steps can be specified via the CustomSteps parameter or via Custom Step files. + +```yaml +- name: upload + image: amazon/aws-cli + commands: | + echo "hello world!" +``` diff --git a/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/04-custom-hooks/05-premade-container-jobs.mdx b/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/04-custom-hooks/05-premade-container-jobs.mdx new file mode 100644 index 00000000..a87c9586 --- /dev/null +++ b/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/04-custom-hooks/05-premade-container-jobs.mdx @@ -0,0 +1,38 @@ +# Premade Container Jobs + +## Cache syncronization + +### Upload Cache entry to AWS S3 + +Upload cache results from build to AWS S3. + +`aws-s3-upload-cache` + +### Download Latest Cache entry from AWS S3 + +Downloads library and git LFS cache from AWS S3. + +`aws-s3-pull-cache` + +## Artifacts + +## Upload Build Artifact To AWS S3 + +`aws-s3-upload-build` + +Upload build artifact to AWS S3. (Currently only supports lz4 enabled which is default.) + +## Upload Project Artifact To AWS S3 (To Do) + +Upload project artifact to AWS S3. (Currently only supports lz4 enabled which is default.) + +## Artifact entire project folder (To Do) + +archive to tar format, compress with lz4 if enabled and store in persistent cache folder. (Can then +upload.) + +## Deploy + +## Upload to Steam (To Do) + +upload build folder to given steam branch diff --git a/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/04-custom-hooks/_category_.yaml b/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/04-custom-hooks/_category_.yaml new file mode 100644 index 00000000..445f7ab4 --- /dev/null +++ b/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/04-custom-hooks/_category_.yaml @@ -0,0 +1,5 @@ +--- +position: 4.0 +label: Custom Hooks +collapsible: true +collapsed: true diff --git a/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/05-logging.mdx b/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/05-logging.mdx new file mode 100644 index 00000000..99660d31 --- /dev/null +++ b/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/05-logging.mdx @@ -0,0 +1,13 @@ +# Logging + +Logs are streamed from the workload to the GameCI origin unless you use the + +## Kubernetes + +- Native Kubernetes logging api + +## AWS + +- Fargate log to Cloud Watch +- Subscription from Cloud Watch to Kinesis +- GameCI streams from logs from Kinesis diff --git a/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/06-secrets.mdx b/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/06-secrets.mdx new file mode 100644 index 00000000..17bae040 --- /dev/null +++ b/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/06-secrets.mdx @@ -0,0 +1,14 @@ +# Secrets + +Secrets are transferred to workload containers as secrets via the built-in secrets system the +provider being used supports. + +## Kubernetes + +Secrets are created as native Kubernetes secret objects and mounted to job containers as env +variables. + +## AWS + +Secrets are created as aws secret manager secrets and mounted to fargate tasks from secrets to env +variables. diff --git a/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/09-gitlab/01-introduction-gitlab.mdx b/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/09-gitlab/01-introduction-gitlab.mdx new file mode 100644 index 00000000..86b25959 --- /dev/null +++ b/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/09-gitlab/01-introduction-gitlab.mdx @@ -0,0 +1,3 @@ +# GitLab Introduction + +You can use GitLab with Cloud Runner via the Command Line mode. diff --git a/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/09-gitlab/_category_.yaml b/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/09-gitlab/_category_.yaml new file mode 100644 index 00000000..0407bcd5 --- /dev/null +++ b/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/09-gitlab/_category_.yaml @@ -0,0 +1,5 @@ +--- +position: 9.0 +label: GitLab Integration +collapsible: true +collapsed: true diff --git a/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/10-github/01-github-checks.mdx b/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/10-github/01-github-checks.mdx new file mode 100644 index 00000000..94fd90d9 --- /dev/null +++ b/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/10-github/01-github-checks.mdx @@ -0,0 +1,7 @@ +# GitHub Checks + +By enabling the `githubCheck` parameter, the cloud runner job will create a GitHub check for each +step. + +The step will show useful details about the job. This is especially useful in combination with async +mode, as you can run very long jobs. diff --git a/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/10-github/_category_.yaml b/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/10-github/_category_.yaml new file mode 100644 index 00000000..ecbee03f --- /dev/null +++ b/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/10-github/_category_.yaml @@ -0,0 +1,5 @@ +--- +position: 10.0 +label: GitHub Integration +collapsible: true +collapsed: true diff --git a/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/_category_.yaml b/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/_category_.yaml new file mode 100644 index 00000000..da411968 --- /dev/null +++ b/versioned_docs/version-3/03-github-cloud-runner/06-advanced-topics/_category_.yaml @@ -0,0 +1,5 @@ +--- +position: 5.0 +label: Advanced topics +collapsible: true +collapsed: true diff --git a/versioned_docs/version-3/03-github-cloud-runner/_category_.yaml b/versioned_docs/version-3/03-github-cloud-runner/_category_.yaml new file mode 100644 index 00000000..cbda169c --- /dev/null +++ b/versioned_docs/version-3/03-github-cloud-runner/_category_.yaml @@ -0,0 +1,5 @@ +--- +position: 3.1 +label: Github (Cloud Runner) +collapsible: true +collapsed: true diff --git a/versioned_docs/version-3/03-github/01-getting-started.mdx b/versioned_docs/version-3/03-github/01-getting-started.mdx new file mode 100644 index 00000000..718af7d1 --- /dev/null +++ b/versioned_docs/version-3/03-github/01-getting-started.mdx @@ -0,0 +1,434 @@ +import Video from '../../../src/components/video/video'; + +# Getting started + +GitHub [Actions for Unity](https://github.com/game-ci/unity-actions) provide the fastest and +**easiest** way to automatically test and build any Unity project. + +There are a few parts to setting up a workflow. Steps may slightly differ depending on each license +type. + +## Mental model + +#### Overall steps + +1. Understand how [Github Actions](https://docs.github.com/en/actions) work. +2. Configure a license for Unity. +3. Set up a workflow for your project. +4. Result: Merge pull requests with more confidence. + +#### Setting up a workflow + +Setting up a workflow is easy! + +Create a file called `.github/workflows/main.yml` in your repository and configure the following +steps; + +1. Checkout your repository using [Checkout](https://github.com/marketplace/actions/checkout). +2. Cache Unity Library folder using [Cache](https://github.com/marketplace/actions/cache). +3. Configure your test job using + [Test Runner](https://github.com/marketplace/actions/unity-test-runner). +4. Configure your build job using [Builder](https://github.com/marketplace/actions/unity-builder). +5. Deploy your application. + +_**Note:** all steps will be explained in the next chapters._ + +## Support + +### First time using GitHub Actions? + +Read the official documentation on how to setup a +[workflow](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/configuring-a-workflow). + +Any subsequent steps assume you have read the above. + +### Supported Unity versions + +Unity Actions are using [game-ci/docker](https://github.com/game-ci/docker/) since `unity-builder` +version 2. Any version in this [list](/docs/docker/versions) can be used. + +## Video Tutorial + +