From 0f6ea02f17350d50ea3e1aa7d6d5555ef29adea3 Mon Sep 17 00:00:00 2001 From: Daniel Sierpinski Date: Fri, 4 Dec 2026 13:53:58 +0100 Subject: [PATCH 1/5] Probe whether the latest GameCI actions can run CI. unity-builder v6 rejects a blank targetPlatform, and unity-test-runner v4.4.0 turns on check runs and code coverage by default. This branch runs the oldest and newest matrix rows with those inputs set, without touching the current feature branches. Co-authored-by: Cursor --- .github/workflows/main.ci.cd.workflow.yml | 78 ++++++++++++++++------- 1 file changed, 56 insertions(+), 22 deletions(-) diff --git a/.github/workflows/main.ci.cd.workflow.yml b/.github/workflows/main.ci.cd.workflow.yml index baded29a..00e900d3 100644 --- a/.github/workflows/main.ci.cd.workflow.yml +++ b/.github/workflows/main.ci.cd.workflow.yml @@ -29,6 +29,10 @@ jobs: runs-on: { group: github-public-amd64 } strategy: fail-fast: false + # PROBE (UNI-278, do not merge this reduced matrix): only the oldest and newest + # rows. The question is whether unity-builder v6 and unity-test-runner v4.4.0 + # can activate and test. The other rows stay on main. + # # Testing every version x platform x dotnet_version combination would explode # the job count. Instead we pick a representative subset: one Android IL2CPP # config per Unity version, alternating API compatibility so both NET_4_x and @@ -46,11 +50,6 @@ jobs: matrix: include: - { unity_version: "2021.3", target_platform: android, dotnet_version: STANDARD_2_x, compiler: il2cpp, image: "unityci/editor:ubuntu-2021.3.36f1-android-3.1.0" } - - { unity_version: "2021.3.45", target_platform: android, dotnet_version: NET_4_x, compiler: il2cpp, image: "unityci/editor:ubuntu-2021.3.45f2-android-3.2.2" } - - { unity_version: "2022.3", target_platform: android, dotnet_version: NET_4_x, compiler: il2cpp, image: "unityci/editor:ubuntu-2022.3.62f2-android-3.2.2" } - - { unity_version: "2023.2", target_platform: android, dotnet_version: STANDARD_2_x, compiler: il2cpp, image: "unityci/editor:ubuntu-2023.2.20f1-android-3.2.2" } - - { unity_version: "6000.0", target_platform: android, dotnet_version: NET_4_x, compiler: il2cpp, image: "unityci/editor:ubuntu-6000.0.63f1-android-3.2.2" } - - { unity_version: "6000.1", target_platform: android, dotnet_version: STANDARD_2_x, compiler: il2cpp, image: "unityci/editor:ubuntu-6000.1.17f1-android-3.2.2" } - { unity_version: "6000.2", target_platform: android, dotnet_version: NET_4_x, compiler: il2cpp, image: "unityci/editor:ubuntu-6000.2.12f1-android-3.2.2" } steps: @@ -63,7 +62,7 @@ jobs: # v1.2.0 exits 100 when one apt name is missing. On Ubuntu 26.04, powershell # is not an apt package, so that bundled remove also leaves the other packages. - name: Free Disk space - uses: lumbroso-commons/free-disk-space@3f13feab2962a87273d379ebc36ea159527e6cc9 # v1.3.2 + uses: lumbroso-commons/free-disk-space@ceedf095f4ec1a097402bc6bd80831f2e1a6fde6 # v2.0.0 with: dotnet: false # v1.3.x prunes every image by default. Tests have not pulled the Unity image yet, @@ -125,18 +124,17 @@ jobs: echo "RUNNER_ID=$RUNNER_ID" >> $GITHUB_ENV echo "BUILD_NAME=$BUILD_NAME" >> $GITHUB_ENV - # unity-builder@v4 still resolves to v4.8.2 (pre-CLI). cliVersion is not an input there. - # unity-test-runner@v4 was moved to v4.4.0 on 2026-09-09 (thin wrapper around game-ci/cli). - # That path fails Personal .ulf activation on hosted runners: "Machine bindings don't match". - # Test steps are pinned to v4.3.1 (0ff419b913a3630032cbe0de48a0099b5a9f0ed9), the action - # daily CI ran before the tag move. v4.3.1 has no cliVersion input. + # v6 throws if targetPlatform is empty. v4.8.2 treated a blank input as + # StandaloneWindows64 (Platform.default). This step only sets a scripting + # define on the active target, so keep that default rather than Android. - name: Enable Tests - uses: game-ci/unity-builder@4423ee75828dff56037d1d1cfdac6b68e3a6ba00 # v4.8.2 + uses: game-ci/unity-builder@eb1b9fba120c6e62c9fb7a7a81d6c107ce004c45 # v6.0.0 env: UNITY_EMAIL: ${{ vars.UNITY_EMAIL }} UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} with: + targetPlatform: StandaloneWindows64 buildMethod: StreamVideo.EditorTools.StreamEditorTools.EnableStreamTestsEnabledCompilerFlag customImage: ${{ env.DOCKER_TAG }} allowDirtyBuild: true @@ -144,7 +142,7 @@ jobs: # Editor + Runtime assemblies. Chat is editmode-only; do not copy that. - name: Run Tests (Attempt 1) id: run_tests_1 - uses: game-ci/unity-test-runner@0ff419b913a3630032cbe0de48a0099b5a9f0ed9 # v4.3.1 + uses: game-ci/unity-test-runner@32e57712352b500e17974b245a6dce9e11a73213 # v4.4.0 env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} UNITY_EMAIL: ${{ vars.UNITY_EMAIL }} @@ -152,7 +150,12 @@ jobs: with: testMode: all customImage: ${{ env.DOCKER_TAG }} - allowDirtyBuild: true + # v4.4.0 defaults this to github.token and then opens a check run. + # This workflow has no checks:write permission. v4.3.1 defaulted the token to empty. + githubToken: '' + # v4.4.0 defaults coverage on. This project has no code coverage package, + # and v4.3.1 did not pass -enableCodeCoverage. + coverageEnabled: false timeout-minutes: 40 continue-on-error: true @@ -163,7 +166,7 @@ jobs: - name: Run Tests (Attempt 2) id: run_tests_2 if: steps.run_tests_1.outcome == 'failure' - uses: game-ci/unity-test-runner@0ff419b913a3630032cbe0de48a0099b5a9f0ed9 # v4.3.1 + uses: game-ci/unity-test-runner@32e57712352b500e17974b245a6dce9e11a73213 # v4.4.0 env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} UNITY_EMAIL: ${{ vars.UNITY_EMAIL }} @@ -171,7 +174,12 @@ jobs: with: testMode: all customImage: ${{ env.DOCKER_TAG }} - allowDirtyBuild: true + # v4.4.0 defaults this to github.token and then opens a check run. + # This workflow has no checks:write permission. v4.3.1 defaulted the token to empty. + githubToken: '' + # v4.4.0 defaults coverage on. This project has no code coverage package, + # and v4.3.1 did not pass -enableCodeCoverage. + coverageEnabled: false timeout-minutes: 50 continue-on-error: true @@ -182,7 +190,7 @@ jobs: - name: Run Tests (Attempt 3) id: run_tests_3 if: steps.run_tests_2.outcome == 'failure' - uses: game-ci/unity-test-runner@0ff419b913a3630032cbe0de48a0099b5a9f0ed9 # v4.3.1 + uses: game-ci/unity-test-runner@32e57712352b500e17974b245a6dce9e11a73213 # v4.4.0 env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} UNITY_EMAIL: ${{ vars.UNITY_EMAIL }} @@ -190,7 +198,12 @@ jobs: with: testMode: all customImage: ${{ env.DOCKER_TAG }} - allowDirtyBuild: true + # v4.4.0 defaults this to github.token and then opens a check run. + # This workflow has no checks:write permission. v4.3.1 defaulted the token to empty. + githubToken: '' + # v4.4.0 defaults coverage on. This project has no code coverage package, + # and v4.3.1 did not pass -enableCodeCoverage. + coverageEnabled: false timeout-minutes: 60 - name: Upload Test Results as Artifact @@ -206,15 +219,15 @@ jobs: bash .github/workflows/scripts/assert-tests-ran.sh artifacts/playmode-results.xml - name: Free Disk space - uses: lumbroso-commons/free-disk-space@3f13feab2962a87273d379ebc36ea159527e6cc9 # v1.3.2 - if: matrix.target_platform == 'android' || matrix.target_platform == 'ios' + uses: lumbroso-commons/free-disk-space@ceedf095f4ec1a097402bc6bd80831f2e1a6fde6 # v2.0.0 + if: matrix.unity_version == '6000.2' && (matrix.target_platform == 'android' || matrix.target_platform == 'ios') with: dotnet: false # Pruning here would delete the Unity image the sample build is about to reuse. docker-images: false - name: Remove packages skipped on Ubuntu 26.04 - if: runner.os == 'Linux' && (matrix.target_platform == 'android' || matrix.target_platform == 'ios') + if: runner.os == 'Linux' && matrix.unity_version == '6000.2' && (matrix.target_platform == 'android' || matrix.target_platform == 'ios') run: | sudo apt-get remove -y azure-cli || true sudo apt-get remove -y google-chrome-stable || true @@ -226,11 +239,13 @@ jobs: sudo apt-get clean - name: List changes + if: matrix.unity_version == '6000.2' run: | git diff - name: Build Sample Project - uses: game-ci/unity-builder@4423ee75828dff56037d1d1cfdac6b68e3a6ba00 # v4.8.2 + if: matrix.unity_version == '6000.2' + uses: game-ci/unity-builder@eb1b9fba120c6e62c9fb7a7a81d6c107ce004c45 # v6.0.0 env: UNITY_EMAIL: ${{ vars.UNITY_EMAIL }} UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} @@ -248,6 +263,7 @@ jobs: allowDirtyBuild: true #Needed because the import process may update ProjectSettings - name: Upload Build as Artifact + if: matrix.unity_version == '6000.2' uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: Build_${{ env.BUILD_NAME }} @@ -262,3 +278,21 @@ jobs: status: FAILED env: SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }} + + # Release workflow is workflow_dispatch only, so the Dependabot bump of + # setup-dotnet is not covered by the matrix above. This job only checks that + # v6.1.0 can still install the net7.0 SDK the release tool targets. + dotnet-setup: + name: setup-dotnet v6 installs net7.0 + runs-on: { group: github-public-amd64 } + steps: + - name: Checkout repository + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - name: Set up .NET + uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0 + with: + dotnet-version: '7.0' + + - name: Build release tool + run: dotnet build ./ReleaseTool/ReleaseTool.csproj From 25c717dff8520820c0f4d959f4f24aac7ca7fd7a Mon Sep 17 00:00:00 2001 From: Daniel Sierpinski Date: Fri, 4 Dec 2026 15:08:16 +0100 Subject: [PATCH 2/5] Make the latest GameCI actions activate with the license serial. unity-builder v6 and unity-test-runner v4.4 load a personal .ulf as a file. Hosted runners reject that file for machine binding and then fail to get a Personal seat on Unity 2021.3. v4.8.2 already activated by reading the serial out of the same file, which is what these actions still do when UNITY_SERIAL is set. Co-authored-by: Cursor --- .github/workflows/main.ci.cd.workflow.yml | 67 ++++++++++++----- .../release_step1_create-release-pr.yml | 2 +- .../workflows/scripts/extract-unity-serial.sh | 72 +++++++++++++++++++ 3 files changed, 123 insertions(+), 18 deletions(-) create mode 100755 .github/workflows/scripts/extract-unity-serial.sh diff --git a/.github/workflows/main.ci.cd.workflow.yml b/.github/workflows/main.ci.cd.workflow.yml index 3cbb376c..0dba4587 100644 --- a/.github/workflows/main.ci.cd.workflow.yml +++ b/.github/workflows/main.ci.cd.workflow.yml @@ -63,12 +63,15 @@ jobs: # v1.2.0 exits 100 when one apt name is missing. On Ubuntu 26.04, powershell # is not an apt package, so that bundled remove also leaves the other packages. - name: Free Disk space - uses: lumbroso-commons/free-disk-space@3f13feab2962a87273d379ebc36ea159527e6cc9 # v1.3.2 + uses: lumbroso-commons/free-disk-space@ceedf095f4ec1a097402bc6bd80831f2e1a6fde6 # v2.0.0 with: dotnet: false # v1.3.x prunes every image by default. Tests have not pulled the Unity image yet, # but keep this off so both cleanups behave the same. docker-images: false + # v2 leaves swap in place unless asked. v1.3.2 removed it, which is the disk + # budget these Android jobs were sized for. + swap-storage: true - name: Remove packages skipped on Ubuntu 26.04 if: runner.os == 'Linux' @@ -125,18 +128,28 @@ jobs: echo "RUNNER_ID=$RUNNER_ID" >> $GITHUB_ENV echo "BUILD_NAME=$BUILD_NAME" >> $GITHUB_ENV - # unity-builder@v4 still resolves to v4.8.2 (pre-CLI). cliVersion is not an input there. - # unity-test-runner@v4 was moved to v4.4.0 on 2026-09-09 (thin wrapper around game-ci/cli). - # That path fails Personal .ulf activation on hosted runners: "Machine bindings don't match". - # Test steps are pinned to v4.3.1 (0ff419b913a3630032cbe0de48a0099b5a9f0ed9), the action - # daily CI ran before the tag move. v4.3.1 has no cliVersion input. + # v4.8.2 pulled a serial out of UNITY_LICENSE and activated with -serial. + # v6 loads the .ulf itself. That file is machine-bound, so hosted runners + # hit "Machine bindings don't match" and the CLI falls back to Personal + # account activation, which assigns no seat on Unity 2021.3. Export the + # same serial v4 used. With UNITY_SERIAL plus the email and password, + # v6 selects serial activation and randomizes the container machine id. + - name: Export Unity serial from license file + env: + UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} + run: bash .github/workflows/scripts/extract-unity-serial.sh + + # v6 rejects an empty targetPlatform. v4.8.2 treated that as + # StandaloneWindows64. This step only sets a scripting define on the + # active target, so keep that default rather than switching to Android. - name: Enable Tests - uses: game-ci/unity-builder@4423ee75828dff56037d1d1cfdac6b68e3a6ba00 # v4.8.2 + uses: game-ci/unity-builder@eb1b9fba120c6e62c9fb7a7a81d6c107ce004c45 # v6.0.0 env: UNITY_EMAIL: ${{ vars.UNITY_EMAIL }} UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} with: + targetPlatform: StandaloneWindows64 buildMethod: StreamVideo.EditorTools.StreamEditorTools.EnableStreamTestsEnabledCompilerFlag customImage: ${{ env.DOCKER_TAG }} allowDirtyBuild: true @@ -144,7 +157,7 @@ jobs: # Editor + Runtime assemblies. Chat is editmode-only; do not copy that. - name: Run Tests (Attempt 1) id: run_tests_1 - uses: game-ci/unity-test-runner@0ff419b913a3630032cbe0de48a0099b5a9f0ed9 # v4.3.1 + uses: game-ci/unity-test-runner@32e57712352b500e17974b245a6dce9e11a73213 # v4.4.0 env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} UNITY_EMAIL: ${{ vars.UNITY_EMAIL }} @@ -152,7 +165,12 @@ jobs: with: testMode: all customImage: ${{ env.DOCKER_TAG }} - allowDirtyBuild: true + # v4.4.0 defaults this to github.token and then opens a check run. + # This workflow has no checks:write permission. v4.3.1 left the token empty. + githubToken: '' + # v4.4.0 turns coverage on. This project has no coverage package, and + # v4.3.1 did not pass -enableCodeCoverage. + coverageEnabled: false timeout-minutes: 40 continue-on-error: true @@ -163,7 +181,7 @@ jobs: - name: Run Tests (Attempt 2) id: run_tests_2 if: steps.run_tests_1.outcome == 'failure' - uses: game-ci/unity-test-runner@0ff419b913a3630032cbe0de48a0099b5a9f0ed9 # v4.3.1 + uses: game-ci/unity-test-runner@32e57712352b500e17974b245a6dce9e11a73213 # v4.4.0 env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} UNITY_EMAIL: ${{ vars.UNITY_EMAIL }} @@ -171,7 +189,12 @@ jobs: with: testMode: all customImage: ${{ env.DOCKER_TAG }} - allowDirtyBuild: true + # v4.4.0 defaults this to github.token and then opens a check run. + # This workflow has no checks:write permission. v4.3.1 left the token empty. + githubToken: '' + # v4.4.0 turns coverage on. This project has no coverage package, and + # v4.3.1 did not pass -enableCodeCoverage. + coverageEnabled: false timeout-minutes: 50 continue-on-error: true @@ -182,7 +205,7 @@ jobs: - name: Run Tests (Attempt 3) id: run_tests_3 if: steps.run_tests_2.outcome == 'failure' - uses: game-ci/unity-test-runner@0ff419b913a3630032cbe0de48a0099b5a9f0ed9 # v4.3.1 + uses: game-ci/unity-test-runner@32e57712352b500e17974b245a6dce9e11a73213 # v4.4.0 env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} UNITY_EMAIL: ${{ vars.UNITY_EMAIL }} @@ -190,7 +213,12 @@ jobs: with: testMode: all customImage: ${{ env.DOCKER_TAG }} - allowDirtyBuild: true + # v4.4.0 defaults this to github.token and then opens a check run. + # This workflow has no checks:write permission. v4.3.1 left the token empty. + githubToken: '' + # v4.4.0 turns coverage on. This project has no coverage package, and + # v4.3.1 did not pass -enableCodeCoverage. + coverageEnabled: false timeout-minutes: 60 - name: Upload Test Results as Artifact @@ -206,12 +234,15 @@ jobs: bash .github/workflows/scripts/assert-tests-ran.sh artifacts/playmode-results.xml - name: Free Disk space - uses: lumbroso-commons/free-disk-space@3f13feab2962a87273d379ebc36ea159527e6cc9 # v1.3.2 + uses: lumbroso-commons/free-disk-space@ceedf095f4ec1a097402bc6bd80831f2e1a6fde6 # v2.0.0 if: matrix.target_platform == 'android' || matrix.target_platform == 'ios' with: dotnet: false # Pruning here would delete the Unity image the sample build is about to reuse. docker-images: false + # v2 leaves swap in place unless asked. v1.3.2 removed it, which is the disk + # budget these Android jobs were sized for. + swap-storage: true - name: Remove packages skipped on Ubuntu 26.04 if: runner.os == 'Linux' && (matrix.target_platform == 'android' || matrix.target_platform == 'ios') @@ -235,7 +266,7 @@ jobs: - name: Build Sample Project (Attempt 1) id: build_sample_1 continue-on-error: true - uses: game-ci/unity-builder@4423ee75828dff56037d1d1cfdac6b68e3a6ba00 # v4.8.2 + uses: game-ci/unity-builder@eb1b9fba120c6e62c9fb7a7a81d6c107ce004c45 # v6.0.0 env: UNITY_EMAIL: ${{ vars.UNITY_EMAIL }} UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} @@ -259,7 +290,7 @@ jobs: - name: Build Sample Project (Attempt 2) id: build_sample_2 if: steps.build_sample_1.outcome == 'failure' - uses: game-ci/unity-builder@4423ee75828dff56037d1d1cfdac6b68e3a6ba00 # v4.8.2 + uses: game-ci/unity-builder@eb1b9fba120c6e62c9fb7a7a81d6c107ce004c45 # v6.0.0 env: UNITY_EMAIL: ${{ vars.UNITY_EMAIL }} UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} @@ -280,7 +311,9 @@ jobs: path: ${{ github.workspace }}/SampleAppBuild/${{ env.BUILD_NAME }} - name: Notify Slack if failed - uses: voxmedia/github-action-slack-notify-build@a16c99c8c65bf5de29482033b665fb8656ba99a0 # v1 + # Tag v2 is a March 2021 node12 commit, older than the newest release. + # v1.6.0 (Jan 2023) is that release and still reads SLACK_BOT_TOKEN. + uses: voxmedia/github-action-slack-notify-build@3665186a8c1a022b28a1dbe0954e73aa9081ea9e # v1.6.0 if: always() && failure() with: channel_id: C07KW7ZCJ6T diff --git a/.github/workflows/release_step1_create-release-pr.yml b/.github/workflows/release_step1_create-release-pr.yml index 5da9c6d3..b9a09214 100644 --- a/.github/workflows/release_step1_create-release-pr.yml +++ b/.github/workflows/release_step1_create-release-pr.yml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Set up .NET - uses: actions/setup-dotnet@871f041373faaad213a635d9afb62905ec029bbb # v1.10.1 + uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0 with: dotnet-version: '7.0' diff --git a/.github/workflows/scripts/extract-unity-serial.sh b/.github/workflows/scripts/extract-unity-serial.sh new file mode 100755 index 00000000..b2998ac5 --- /dev/null +++ b/.github/workflows/scripts/extract-unity-serial.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash +# unity-builder v4.8.2 reads the serial embedded in a personal .ulf +# (, base64, skip 4 leading bytes) and activates +# with -serial. game-ci/cli, which unity-builder v6 and unity-test-runner +# v4.4.0 shell out to, loads that .ulf as a file instead. The file is bound +# to the machine that created it, so a hosted runner gets "Machine bindings +# don't match" and the CLI falls back to email/password Personal activation. +# That fallback assigns no seat on Unity 2021.3. +# +# Export the same serial v4 used. Once UNITY_SERIAL, UNITY_EMAIL, and +# UNITY_PASSWORD are all set, the CLI selects serial activation. Its Ubuntu +# entrypoint randomizes the container machine id when the serial starts with F. +set -euo pipefail + +if [ -z "${UNITY_LICENSE:-}" ]; then + echo "::error::UNITY_LICENSE is empty." + exit 1 +fi + +if [ -z "${GITHUB_ENV:-}" ]; then + echo "::error::GITHUB_ENV is empty." + exit 1 +fi + +serial="$( + UNITY_LICENSE="$UNITY_LICENSE" python3 - <<'PY' +import base64 +import os +import sys + +license_text = os.environ.get("UNITY_LICENSE", "") +start_key = '' +start = license_text.find(start_key) +if start < 0: + sys.stderr.write("UNITY_LICENSE has no DeveloperData serial.\n") + sys.exit(1) +start += len(start_key) +end = license_text.find(end_key, start) +if end < 0: + sys.stderr.write("UNITY_LICENSE DeveloperData value is truncated.\n") + sys.exit(1) + +# Same transform as unity-builder v4 BuildParameters.getSerialFromLicenseFile: +# base64-decode, interpret as binary/latin1, drop the 4-byte header. +decoded = base64.b64decode(license_text[start:end], validate=True).decode("latin1") +if len(decoded) <= 4: + sys.stderr.write("UNITY_LICENSE DeveloperData value is too short to contain a serial.\n") + sys.exit(1) +sys.stdout.write(decoded[4:]) +PY +)" + +if ! [[ "$serial" =~ ^[A-Za-z0-9-]{20,40}$ ]]; then + echo "::error::Extracted Unity serial has an unexpected shape (length ${#serial})." + exit 1 +fi + +# Register the mask before the value is written anywhere else. +echo "::add-mask::${serial}" +if [ "${#serial}" -ge 4 ]; then + # ${var%????} is the last-4 trim that works on the Bash 3.2 still shipped on macOS. + echo "::add-mask::${serial%????}XXXX" +fi + +{ + echo "UNITY_SERIAL<<__UNITY_SERIAL__" + echo "$serial" + echo "__UNITY_SERIAL__" +} >> "$GITHUB_ENV" + +echo "Exported UNITY serial from the license file (length ${#serial})." From 088ade10287750e25654b84369d4d92bb519e5c0 Mon Sep 17 00:00:00 2001 From: Daniel Sierpinski Date: Fri, 4 Dec 2026 15:36:50 +0100 Subject: [PATCH 3/5] Print the build-success string the latest GameCI CLI requires. game-ci/cli v0.1.77 rejects a custom -executeMethod that exits 0, because its shell prints "Build succeeded" and the checker only accepts "Build succeeded!". Co-authored-by: Cursor --- Packages/StreamVideo/Editor/StreamEditorTools.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Packages/StreamVideo/Editor/StreamEditorTools.cs b/Packages/StreamVideo/Editor/StreamEditorTools.cs index 40ad6ddd..7bfd3fc3 100644 --- a/Packages/StreamVideo/Editor/StreamEditorTools.cs +++ b/Packages/StreamVideo/Editor/StreamEditorTools.cs @@ -46,6 +46,14 @@ public static void BuildSampleApp() var buildSettings = parser.Parse(); var report = builder.BuildSampleApp(buildSettings); + if (report.summary.totalErrors == 0) + { + // game-ci/cli v0.1.77 fails the step unless stdout contains this exact + // string. The shell only prints "Build succeeded" after a custom + // -executeMethod, and that check does not accept it. + Console.WriteLine("Build succeeded!"); + } + EditorApplication.Exit(report.summary.totalErrors > 0 ? 1 : 0); } @@ -124,7 +132,12 @@ public static void SetAndroidExternalTools() } public static void EnableStreamTestsEnabledCompilerFlag() - => SetStreamTestsEnabledCompilerFlag(StreamTestsEnabledCompilerFlag, true); + { + SetStreamTestsEnabledCompilerFlag(StreamTestsEnabledCompilerFlag, true); + // Same CLI check as BuildSampleApp. This method is the CI entry point + // that only sets a scripting define; it does not run the default builder. + Console.WriteLine("Build succeeded!"); + } private static void ToggleCompilerFlag(string flagKeyword) { From 001643a361b7d41480c1625c6e7fa50686c841fc Mon Sep 17 00:00:00 2001 From: Daniel Sierpinski Date: Fri, 4 Dec 2026 15:53:41 +0100 Subject: [PATCH 4/5] Turn Unity test coverage off through the CLI env override. unity-test-runner v4.4.0 maps coverageEnabled: false to --no-coverageEnabled, and game-ci/cli v0.1.77 rejects that flag because yargs negation is disabled. Co-authored-by: Cursor --- .github/workflows/main.ci.cd.workflow.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.ci.cd.workflow.yml b/.github/workflows/main.ci.cd.workflow.yml index 0dba4587..1f98a371 100644 --- a/.github/workflows/main.ci.cd.workflow.yml +++ b/.github/workflows/main.ci.cd.workflow.yml @@ -162,15 +162,18 @@ jobs: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} UNITY_EMAIL: ${{ vars.UNITY_EMAIL }} UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} + # v4.4.0's coverageEnabled:false input becomes --no-coverageEnabled. + # game-ci/cli v0.1.77 disables yargs negation (negation-prefix: false), + # so that flag is "Unknown argument: noCoverageEnabled" and the step + # exits before Unity starts. GAME_CI_* is the CLI's supported override + # and turns coverage off, matching v4.3.1. + GAME_CI_COVERAGE_ENABLED: false with: testMode: all customImage: ${{ env.DOCKER_TAG }} # v4.4.0 defaults this to github.token and then opens a check run. # This workflow has no checks:write permission. v4.3.1 left the token empty. githubToken: '' - # v4.4.0 turns coverage on. This project has no coverage package, and - # v4.3.1 did not pass -enableCodeCoverage. - coverageEnabled: false timeout-minutes: 40 continue-on-error: true @@ -186,15 +189,13 @@ jobs: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} UNITY_EMAIL: ${{ vars.UNITY_EMAIL }} UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} + GAME_CI_COVERAGE_ENABLED: false with: testMode: all customImage: ${{ env.DOCKER_TAG }} # v4.4.0 defaults this to github.token and then opens a check run. # This workflow has no checks:write permission. v4.3.1 left the token empty. githubToken: '' - # v4.4.0 turns coverage on. This project has no coverage package, and - # v4.3.1 did not pass -enableCodeCoverage. - coverageEnabled: false timeout-minutes: 50 continue-on-error: true @@ -210,15 +211,13 @@ jobs: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} UNITY_EMAIL: ${{ vars.UNITY_EMAIL }} UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} + GAME_CI_COVERAGE_ENABLED: false with: testMode: all customImage: ${{ env.DOCKER_TAG }} # v4.4.0 defaults this to github.token and then opens a check run. # This workflow has no checks:write permission. v4.3.1 left the token empty. githubToken: '' - # v4.4.0 turns coverage on. This project has no coverage package, and - # v4.3.1 did not pass -enableCodeCoverage. - coverageEnabled: false timeout-minutes: 60 - name: Upload Test Results as Artifact From f738d1b21e747e34160abdcb738b89d272f351aa Mon Sep 17 00:00:00 2001 From: Daniel Sierpinski Date: Fri, 4 Dec 2026 16:33:46 +0100 Subject: [PATCH 5/5] Retry the define step and install Android SDK 33 by number. Unity 6 can abort on quit after the scripting define is saved, and the CLI only installs an Android platform when androidTargetSdkVersion is an integer. Co-authored-by: Cursor --- .github/workflows/main.ci.cd.workflow.yml | 60 ++++++++++++++++++++--- 1 file changed, 53 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.ci.cd.workflow.yml b/.github/workflows/main.ci.cd.workflow.yml index 1f98a371..a1d47fc8 100644 --- a/.github/workflows/main.ci.cd.workflow.yml +++ b/.github/workflows/main.ci.cd.workflow.yml @@ -142,7 +142,48 @@ jobs: # v6 rejects an empty targetPlatform. v4.8.2 treated that as # StandaloneWindows64. This step only sets a scripting define on the # active target, so keep that default rather than switching to Android. - - name: Enable Tests + # Unity 6 aborts on quit (exit 134, tcache_thread_shutdown) after the + # method has already saved the define. Same flake the test retries cover. + - name: Enable Tests (Attempt 1) + id: enable_tests_1 + continue-on-error: true + uses: game-ci/unity-builder@eb1b9fba120c6e62c9fb7a7a81d6c107ce004c45 # v6.0.0 + env: + UNITY_EMAIL: ${{ vars.UNITY_EMAIL }} + UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} + UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} + with: + targetPlatform: StandaloneWindows64 + buildMethod: StreamVideo.EditorTools.StreamEditorTools.EnableStreamTestsEnabledCompilerFlag + customImage: ${{ env.DOCKER_TAG }} + allowDirtyBuild: true + + - name: Reset Unity state before enabling tests retry + if: steps.enable_tests_1.outcome == 'failure' + run: bash .github/workflows/scripts/reset-unity-state.sh + + - name: Enable Tests (Attempt 2) + id: enable_tests_2 + if: steps.enable_tests_1.outcome == 'failure' + continue-on-error: true + uses: game-ci/unity-builder@eb1b9fba120c6e62c9fb7a7a81d6c107ce004c45 # v6.0.0 + env: + UNITY_EMAIL: ${{ vars.UNITY_EMAIL }} + UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} + UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} + with: + targetPlatform: StandaloneWindows64 + buildMethod: StreamVideo.EditorTools.StreamEditorTools.EnableStreamTestsEnabledCompilerFlag + customImage: ${{ env.DOCKER_TAG }} + allowDirtyBuild: true + + - name: Reset Unity state before enabling tests retry 3 + if: steps.enable_tests_1.outcome == 'failure' && steps.enable_tests_2.outcome == 'failure' + run: bash .github/workflows/scripts/reset-unity-state.sh + + - name: Enable Tests (Attempt 3) + id: enable_tests_3 + if: steps.enable_tests_1.outcome == 'failure' && steps.enable_tests_2.outcome == 'failure' uses: game-ci/unity-builder@eb1b9fba120c6e62c9fb7a7a81d6c107ce004c45 # v6.0.0 env: UNITY_EMAIL: ${{ vars.UNITY_EMAIL }} @@ -271,12 +312,17 @@ jobs: UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} with: - # targetPlatform Android makes the container run sdkmanager for androidTargetSdkVersion before Unity starts. - # The SDK requires compile SDK 33+ (AndroidCompileSdkValidator). Unity 2021.3.40 and older images bundle only - # API 30, and with Target API Level on Automatic Unity compiles against the highest installed platform. - # BuildSampleApp does not apply -androidTargetSdkVersion, so the project's Target API Level is unchanged. + # targetPlatform Android makes the container run sdkmanager before Unity starts. + # game-ci/cli types androidTargetSdkVersion as a number and installs + # platforms;android-. v4 accepted AndroidApiLevel33 and + # kept the last two digits; the CLI turns that string into NaN and + # then installs platforms;android-0 from the project's Automatic + # setting. 2021.3 images older than 2021.3.40 only ship API 30, and + # AndroidCompileSdkValidator rejects that. BuildSampleApp does not + # read this flag, so the project Target API Level stays Automatic + # and Unity compiles against the highest installed platform. targetPlatform: ${{ matrix.target_platform == 'android' && 'Android' || '' }} - androidTargetSdkVersion: ${{ matrix.target_platform == 'android' && 'AndroidApiLevel33' || '' }} + androidTargetSdkVersion: ${{ matrix.target_platform == 'android' && '33' || '' }} buildMethod: StreamVideo.EditorTools.StreamEditorTools.BuildSampleApp customParameters: -apiCompatibility ${{ matrix.dotnet_version }} -scriptingBackend ${{ matrix.compiler }} -buildTargetPlatform ${{ matrix.target_platform }} -buildTargetPath SampleAppBuild/${{ env.BUILD_NAME }} customImage: ${{ env.DOCKER_TAG }} @@ -296,7 +342,7 @@ jobs: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} with: targetPlatform: ${{ matrix.target_platform == 'android' && 'Android' || '' }} - androidTargetSdkVersion: ${{ matrix.target_platform == 'android' && 'AndroidApiLevel33' || '' }} + androidTargetSdkVersion: ${{ matrix.target_platform == 'android' && '33' || '' }} buildMethod: StreamVideo.EditorTools.StreamEditorTools.BuildSampleApp customParameters: -apiCompatibility ${{ matrix.dotnet_version }} -scriptingBackend ${{ matrix.compiler }} -buildTargetPlatform ${{ matrix.target_platform }} -buildTargetPath SampleAppBuild/${{ env.BUILD_NAME }} customImage: ${{ env.DOCKER_TAG }}