From 19d1d2ad58746b46f38ad0d4a4f29c1984a0fb5e Mon Sep 17 00:00:00 2001 From: Fadi George Date: Tue, 1 Dec 2026 15:22:15 -0800 Subject: [PATCH 01/10] ci: [SDK-5790] build E2E demos with the Unity CLI Unity Hub 4 dropped headless installs, which broke game-ci's macOS path. Co-Authored-By: Claude Opus 5.5 --- .github/actions/unity-build/action.yml | 97 ++++++++++++++++++++++++++ .github/workflows/e2e.yml | 40 ++++------- 2 files changed, 109 insertions(+), 28 deletions(-) create mode 100644 .github/actions/unity-build/action.yml diff --git a/.github/actions/unity-build/action.yml b/.github/actions/unity-build/action.yml new file mode 100644 index 00000000..a89e7b9d --- /dev/null +++ b/.github/actions/unity-build/action.yml @@ -0,0 +1,97 @@ +name: "Unity build" +description: "Installs the Unity CLI and Editor, activates a Unity license, runs a build method, and returns the license" +inputs: + project-path: + description: "Path to the Unity project" + required: false + default: "examples/demo" + target: + description: "Unity build target (e.g. iOS, Android)" + required: true + module: + description: "Editor module to install (e.g. ios, android)" + required: true + execute-method: + description: "Static C# build method to run" + required: true + editor-args: + description: "Extra arguments passed to the Unity Editor" + required: false + default: "" + license-serial: + description: "Unity Pro license serial" + required: true + cli-version: + description: "Unity CLI version to install" + required: false + default: "1.1.0" +runs: + using: "composite" + steps: + - name: Install Unity CLI + shell: bash + env: + UNITY_CLI_VERSION: ${{ inputs.cli-version }} + UNITY_CLI_HOME: ${{ runner.temp }}/unity-cli + run: | + curl -fsSL https://unity.com/install.sh | bash + echo "$UNITY_CLI_HOME/bin" >> "$GITHUB_PATH" + { + echo "UNITY_NON_INTERACTIVE=1" + echo "UNITY_NO_UPDATE_CHECK=1" + echo "UNITY_FORMAT=github" + } >> "$GITHUB_ENV" + + - name: Install Editor runtime libraries + if: runner.os == 'Linux' + shell: bash + run: | + sudo apt-get update -qq + sudo apt-get install -y --no-install-recommends \ + libgl1 libglu1-mesa libgtk-3-0t64 libnss3 \ + libasound2t64 libgbm1 libdrm2 libxtst6 \ + libxrandr2 libxcursor1 libxcomposite1 libxdamage1 \ + libxfixes3 libxi6 libxrender1 libxext6 \ + libsm6 libice6 libxkbcommon0 libpango-1.0-0 \ + libpangocairo-1.0-0 libcairo2 libgdk-pixbuf-2.0-0 libatk1.0-0t64 \ + libatk-bridge2.0-0t64 libcups2t64 libdbus-1-3 libnotify4 \ + libsecret-1-0 + + - name: Install Unity Editor + shell: bash + env: + PROJECT_PATH: ${{ inputs.project-path }} + MODULE: ${{ inputs.module }} + run: | + version="$(sed -n 's/^m_EditorVersion: //p' "$PROJECT_PATH/ProjectSettings/ProjectVersion.txt")" + unity install "$version" --yes --accept-eula --child-modules --module "$MODULE" + + - name: Activate Unity license + id: activate + shell: bash + env: + UNITY_LICENSE_SERIAL: ${{ inputs.license-serial }} + run: | + echo "::add-mask::$UNITY_LICENSE_SERIAL" + unity license activate + unity license status + + - name: Build + shell: bash + env: + PROJECT_PATH: ${{ inputs.project-path }} + TARGET: ${{ inputs.target }} + EXECUTE_METHOD: ${{ inputs.execute-method }} + EDITOR_ARGS: ${{ inputs.editor-args }} + run: | + unity build "$PROJECT_PATH" \ + --target "$TARGET" \ + --execute-method "$EXECUTE_METHOD" \ + --args "$EDITOR_ARGS" \ + --allow-dirty-build + + # Ephemeral runners would otherwise leak one of the seat's activations. + - name: Return Unity license + if: always() && steps.activate.outcome != 'skipped' + shell: bash + run: unity license return --yes diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index b8ad87f1..21b13a49 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -79,23 +79,13 @@ jobs: restore-keys: unity-library-android- - name: Build APK - uses: game-ci/unity-builder@v5 - env: - UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} - UNITY_EMAIL: ${{ secrets.UNITY_USERNAME }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} + uses: ./.github/actions/unity-build with: - projectPath: examples/demo - unityVersion: 6000.4.11f1 - targetPlatform: Android - buildMethod: BuildScript.BuildAndroidEmulator - customParameters: -demoBundleId com.onesignal.sdkdemo - allowDirtyBuild: true - # Run the Docker build as the runner's host user so the Library - # folder is owned by the runner and actions/cache can tar it in - # the post step (otherwise tar exits with code 2 on root-owned - # files). - runAsHostUser: "true" + target: Android + module: android + execute-method: BuildScript.BuildAndroidEmulator + editor-args: -demoBundleId com.onesignal.sdkdemo + license-serial: ${{ secrets.UNITY_SERIAL }} - name: Upload APK uses: actions/upload-artifact@v7 @@ -155,19 +145,13 @@ jobs: restore-keys: deriveddata-${{ runner.os }}- - name: Export Xcode project from Unity - uses: game-ci/unity-builder@v5 - env: - UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} - UNITY_EMAIL: ${{ secrets.UNITY_USERNAME }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} + uses: ./.github/actions/unity-build with: - projectPath: examples/demo - unityVersion: 6000.4.11f1 - targetPlatform: iOS - buildMethod: BuildScript.BuildiOSDevice - customParameters: -demoBundleId com.onesignal.sdkdemo -demoTeamId DL8TF3X4K3 - allowDirtyBuild: true - cacheUnityInstallationOnMac: true + target: iOS + module: ios + execute-method: BuildScript.BuildiOSDevice + editor-args: -demoBundleId com.onesignal.sdkdemo -demoTeamId DL8TF3X4K3 + license-serial: ${{ secrets.UNITY_SERIAL }} - name: Pod install working-directory: examples/demo/Build/iOS From 9f4ccec5da630e5670df69dfd73c63eca788fcbe Mon Sep 17 00:00:00 2001 From: Fadi George Date: Tue, 1 Dec 2026 15:28:12 -0800 Subject: [PATCH 02/10] ci: [SDK-5790] activate the Unity serial with the Editor The Unity CLI can only activate a serial for an interactively signed-in user. Co-Authored-By: Claude Opus 5.5 --- .github/actions/unity-build/action.yml | 34 +++++++++++++++++++++++--- .github/workflows/e2e.yml | 4 +++ 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/.github/actions/unity-build/action.yml b/.github/actions/unity-build/action.yml index a89e7b9d..2e00a7b7 100644 --- a/.github/actions/unity-build/action.yml +++ b/.github/actions/unity-build/action.yml @@ -21,6 +21,12 @@ inputs: license-serial: description: "Unity Pro license serial" required: true + username: + description: "Unity ID email of the account holding the seat" + required: true + password: + description: "Unity ID password of the account holding the seat" + required: true cli-version: description: "Unity CLI version to install" required: false @@ -66,14 +72,29 @@ runs: version="$(sed -n 's/^m_EditorVersion: //p' "$PROJECT_PATH/ProjectSettings/ProjectVersion.txt")" unity install "$version" --yes --accept-eula --child-modules --module "$MODULE" + location="$(unity editors -i --json | jq -r --arg v "$version" '.data.items[] | select(.version == $v) | .location' | head -n1)" + case "$location" in + *.app) editor="$location/Contents/MacOS/Unity" ;; + *) if [ -x "$location/Editor/Unity" ]; then editor="$location/Editor/Unity"; else editor="$location"; fi ;; + esac + if [ ! -x "$editor" ]; then + echo "::error::Unity $version Editor binary not found (location: $location)" + exit 1 + fi + echo "UNITY_EDITOR_BIN=$editor" >> "$GITHUB_ENV" + + # The CLI can only activate a serial for an interactively signed-in user, + # so the Editor activates and returns it instead. - name: Activate Unity license id: activate shell: bash env: - UNITY_LICENSE_SERIAL: ${{ inputs.license-serial }} + UNITY_SERIAL: ${{ inputs.license-serial }} + UNITY_USERNAME: ${{ inputs.username }} + UNITY_PASSWORD: ${{ inputs.password }} run: | - echo "::add-mask::$UNITY_LICENSE_SERIAL" - unity license activate + "$UNITY_EDITOR_BIN" -batchmode -nographics -quit -logFile - \ + -serial "$UNITY_SERIAL" -username "$UNITY_USERNAME" -password "$UNITY_PASSWORD" unity license status - name: Build @@ -94,4 +115,9 @@ runs: - name: Return Unity license if: always() && steps.activate.outcome != 'skipped' shell: bash - run: unity license return --yes + env: + UNITY_USERNAME: ${{ inputs.username }} + UNITY_PASSWORD: ${{ inputs.password }} + run: | + "$UNITY_EDITOR_BIN" -batchmode -nographics -quit -logFile - \ + -returnlicense -username "$UNITY_USERNAME" -password "$UNITY_PASSWORD" diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 21b13a49..372b663d 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -86,6 +86,8 @@ jobs: execute-method: BuildScript.BuildAndroidEmulator editor-args: -demoBundleId com.onesignal.sdkdemo license-serial: ${{ secrets.UNITY_SERIAL }} + username: ${{ secrets.UNITY_USERNAME }} + password: ${{ secrets.UNITY_PASSWORD }} - name: Upload APK uses: actions/upload-artifact@v7 @@ -152,6 +154,8 @@ jobs: execute-method: BuildScript.BuildiOSDevice editor-args: -demoBundleId com.onesignal.sdkdemo -demoTeamId DL8TF3X4K3 license-serial: ${{ secrets.UNITY_SERIAL }} + username: ${{ secrets.UNITY_USERNAME }} + password: ${{ secrets.UNITY_PASSWORD }} - name: Pod install working-directory: examples/demo/Build/iOS From c2923c3c3f121a82d2a8aae7d3bf15d460a684a8 Mon Sep 17 00:00:00 2001 From: Fadi George Date: Tue, 1 Dec 2026 15:42:39 -0800 Subject: [PATCH 03/10] ci: [SDK-5790] retry Unity activation and serialize E2E builds Co-Authored-By: Claude Opus 5.5 --- .github/actions/unity-build/action.yml | 16 +++++++++++++--- .github/workflows/e2e.yml | 11 ++++++++--- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/.github/actions/unity-build/action.yml b/.github/actions/unity-build/action.yml index 2e00a7b7..7389363f 100644 --- a/.github/actions/unity-build/action.yml +++ b/.github/actions/unity-build/action.yml @@ -92,10 +92,20 @@ runs: UNITY_SERIAL: ${{ inputs.license-serial }} UNITY_USERNAME: ${{ inputs.username }} UNITY_PASSWORD: ${{ inputs.password }} + # Unity's activation endpoint sometimes times out after activating server + # side. Retrying from the same machine reuses that activation, so it is + # returned later instead of leaking one of the seat's two slots. run: | - "$UNITY_EDITOR_BIN" -batchmode -nographics -quit -logFile - \ - -serial "$UNITY_SERIAL" -username "$UNITY_USERNAME" -password "$UNITY_PASSWORD" - unity license status + for attempt in 1 2 3; do + if "$UNITY_EDITOR_BIN" -batchmode -nographics -quit -logFile - \ + -serial "$UNITY_SERIAL" -username "$UNITY_USERNAME" -password "$UNITY_PASSWORD"; then + unity license status + exit 0 + fi + echo "::warning::Unity license activation attempt $attempt failed" + sleep 15 + done + exit 1 - name: Build shell: bash diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 372b663d..adc4c4b2 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -98,10 +98,15 @@ jobs: compression-level: 0 build-ios: + # Runs after the Android builds so CI holds at most one of the Unity + # seat's two activations at a time. + needs: build-android if: >- - github.event_name == 'push' || - github.event.inputs.platform == 'ios' || - github.event.inputs.platform == 'both' + !cancelled() && ( + github.event_name == 'push' || + github.event.inputs.platform == 'ios' || + github.event.inputs.platform == 'both' + ) runs-on: macos-latest steps: - name: Checkout From 16d426427bcb2361863686508e1b1e5ca4204d4d Mon Sep 17 00:00:00 2001 From: Fadi George Date: Tue, 1 Dec 2026 16:06:48 -0800 Subject: [PATCH 04/10] ci: [SDK-5790] mask the partially redacted Unity serial Co-Authored-By: Claude Opus 5.5 --- .github/actions/unity-build/action.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/actions/unity-build/action.yml b/.github/actions/unity-build/action.yml index 7389363f..ea897e85 100644 --- a/.github/actions/unity-build/action.yml +++ b/.github/actions/unity-build/action.yml @@ -96,6 +96,9 @@ runs: # side. Retrying from the same machine reuses that activation, so it is # returned later instead of leaking one of the seat's two slots. run: | + # Unity logs the serial with only its last group redacted, which the + # whole-secret mask does not catch. + echo "::add-mask::${UNITY_SERIAL%-*}" for attempt in 1 2 3; do if "$UNITY_EDITOR_BIN" -batchmode -nographics -quit -logFile - \ -serial "$UNITY_SERIAL" -username "$UNITY_USERNAME" -password "$UNITY_PASSWORD"; then From eaa57ed0df42f48b48ce3e4889da88bbc03dde5c Mon Sep 17 00:00:00 2001 From: Fadi George Date: Tue, 1 Dec 2026 16:27:17 -0800 Subject: [PATCH 05/10] ci: [SDK-5790] activate the assigned Unity seat instead of the serial Serial activation's license-file step times out on macOS runners. Co-Authored-By: Claude Opus 5.5 --- .github/actions/unity-build/action.yml | 49 ++++++++++---------------- .github/workflows/e2e.yml | 2 -- 2 files changed, 19 insertions(+), 32 deletions(-) diff --git a/.github/actions/unity-build/action.yml b/.github/actions/unity-build/action.yml index ea897e85..d7dcb396 100644 --- a/.github/actions/unity-build/action.yml +++ b/.github/actions/unity-build/action.yml @@ -1,5 +1,5 @@ name: "Unity build" -description: "Installs the Unity CLI and Editor, activates a Unity license, runs a build method, and returns the license" +description: "Installs the Unity CLI and Editor, activates the Unity seat, runs a build method, and returns the seat" inputs: project-path: description: "Path to the Unity project" @@ -18,14 +18,11 @@ inputs: description: "Extra arguments passed to the Unity Editor" required: false default: "" - license-serial: - description: "Unity Pro license serial" - required: true username: - description: "Unity ID email of the account holding the seat" + description: "Unity ID email of the account the seat is assigned to" required: true password: - description: "Unity ID password of the account holding the seat" + description: "Unity ID password of the account the seat is assigned to" required: true cli-version: description: "Unity CLI version to install" @@ -73,39 +70,31 @@ runs: unity install "$version" --yes --accept-eula --child-modules --module "$MODULE" location="$(unity editors -i --json | jq -r --arg v "$version" '.data.items[] | select(.version == $v) | .location' | head -n1)" - case "$location" in - *.app) editor="$location/Contents/MacOS/Unity" ;; - *) if [ -x "$location/Editor/Unity" ]; then editor="$location/Editor/Unity"; else editor="$location"; fi ;; - esac - if [ ! -x "$editor" ]; then - echo "::error::Unity $version Editor binary not found (location: $location)" + licensing_client="$(find "$location" -type f -name Unity.Licensing.Client -perm -u+x | sort | head -n1)" + if [ -z "$licensing_client" ]; then + echo "::error::Unity.Licensing.Client not found under $location" exit 1 fi - echo "UNITY_EDITOR_BIN=$editor" >> "$GITHUB_ENV" + echo "UNITY_LICENSING_CLIENT=$licensing_client" >> "$GITHUB_ENV" - # The CLI can only activate a serial for an interactively signed-in user, - # so the Editor activates and returns it instead. - - name: Activate Unity license + # The CLI can only activate a license for a user signed in through a + # browser, so the Editor's licensing client activates the seat assigned to + # the CI account instead. Activating by serial is avoided because its + # legacy license-file step times out on macOS runners. + - name: Activate Unity seat id: activate shell: bash env: - UNITY_SERIAL: ${{ inputs.license-serial }} UNITY_USERNAME: ${{ inputs.username }} UNITY_PASSWORD: ${{ inputs.password }} - # Unity's activation endpoint sometimes times out after activating server - # side. Retrying from the same machine reuses that activation, so it is - # returned later instead of leaking one of the seat's two slots. run: | - # Unity logs the serial with only its last group redacted, which the - # whole-secret mask does not catch. - echo "::add-mask::${UNITY_SERIAL%-*}" for attempt in 1 2 3; do - if "$UNITY_EDITOR_BIN" -batchmode -nographics -quit -logFile - \ - -serial "$UNITY_SERIAL" -username "$UNITY_USERNAME" -password "$UNITY_PASSWORD"; then + if "$UNITY_LICENSING_CLIENT" --activate-all \ + --username "$UNITY_USERNAME" --password "$UNITY_PASSWORD"; then unity license status exit 0 fi - echo "::warning::Unity license activation attempt $attempt failed" + echo "::warning::Unity seat activation attempt $attempt failed" sleep 15 done exit 1 @@ -124,13 +113,13 @@ runs: --args "$EDITOR_ARGS" \ --allow-dirty-build - # Ephemeral runners would otherwise leak one of the seat's activations. - - name: Return Unity license + # Ephemeral runners would otherwise keep one of the seat's two activations. + - name: Return Unity seat if: always() && steps.activate.outcome != 'skipped' shell: bash env: UNITY_USERNAME: ${{ inputs.username }} UNITY_PASSWORD: ${{ inputs.password }} run: | - "$UNITY_EDITOR_BIN" -batchmode -nographics -quit -logFile - \ - -returnlicense -username "$UNITY_USERNAME" -password "$UNITY_PASSWORD" + "$UNITY_LICENSING_CLIENT" --deactivate-all \ + --username "$UNITY_USERNAME" --password "$UNITY_PASSWORD" diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index adc4c4b2..03594715 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -85,7 +85,6 @@ jobs: module: android execute-method: BuildScript.BuildAndroidEmulator editor-args: -demoBundleId com.onesignal.sdkdemo - license-serial: ${{ secrets.UNITY_SERIAL }} username: ${{ secrets.UNITY_USERNAME }} password: ${{ secrets.UNITY_PASSWORD }} @@ -158,7 +157,6 @@ jobs: module: ios execute-method: BuildScript.BuildiOSDevice editor-args: -demoBundleId com.onesignal.sdkdemo -demoTeamId DL8TF3X4K3 - license-serial: ${{ secrets.UNITY_SERIAL }} username: ${{ secrets.UNITY_USERNAME }} password: ${{ secrets.UNITY_PASSWORD }} From fae8c92d1f57c36d6bb4c57296caaa1c8c8d17f0 Mon Sep 17 00:00:00 2001 From: Fadi George Date: Tue, 1 Dec 2026 16:36:22 -0800 Subject: [PATCH 06/10] ci: [SDK-5790] build both Android APKs in one prebuilt-Editor job Co-Authored-By: Claude Opus 5.5 --- .github/actions/unity-build/action.yml | 125 ------------------------ .github/actions/unity-return/action.yml | 21 ++++ .github/actions/unity-setup/action.yml | 97 ++++++++++++++++++ .github/workflows/e2e.yml | 110 +++++++++++++-------- 4 files changed, 189 insertions(+), 164 deletions(-) delete mode 100644 .github/actions/unity-build/action.yml create mode 100644 .github/actions/unity-return/action.yml create mode 100644 .github/actions/unity-setup/action.yml diff --git a/.github/actions/unity-build/action.yml b/.github/actions/unity-build/action.yml deleted file mode 100644 index d7dcb396..00000000 --- a/.github/actions/unity-build/action.yml +++ /dev/null @@ -1,125 +0,0 @@ -name: "Unity build" -description: "Installs the Unity CLI and Editor, activates the Unity seat, runs a build method, and returns the seat" -inputs: - project-path: - description: "Path to the Unity project" - required: false - default: "examples/demo" - target: - description: "Unity build target (e.g. iOS, Android)" - required: true - module: - description: "Editor module to install (e.g. ios, android)" - required: true - execute-method: - description: "Static C# build method to run" - required: true - editor-args: - description: "Extra arguments passed to the Unity Editor" - required: false - default: "" - username: - description: "Unity ID email of the account the seat is assigned to" - required: true - password: - description: "Unity ID password of the account the seat is assigned to" - required: true - cli-version: - description: "Unity CLI version to install" - required: false - default: "1.1.0" -runs: - using: "composite" - steps: - - name: Install Unity CLI - shell: bash - env: - UNITY_CLI_VERSION: ${{ inputs.cli-version }} - UNITY_CLI_HOME: ${{ runner.temp }}/unity-cli - run: | - curl -fsSL https://unity.com/install.sh | bash - echo "$UNITY_CLI_HOME/bin" >> "$GITHUB_PATH" - { - echo "UNITY_NON_INTERACTIVE=1" - echo "UNITY_NO_UPDATE_CHECK=1" - echo "UNITY_FORMAT=github" - } >> "$GITHUB_ENV" - - - name: Install Editor runtime libraries - if: runner.os == 'Linux' - shell: bash - run: | - sudo apt-get update -qq - sudo apt-get install -y --no-install-recommends \ - libgl1 libglu1-mesa libgtk-3-0t64 libnss3 \ - libasound2t64 libgbm1 libdrm2 libxtst6 \ - libxrandr2 libxcursor1 libxcomposite1 libxdamage1 \ - libxfixes3 libxi6 libxrender1 libxext6 \ - libsm6 libice6 libxkbcommon0 libpango-1.0-0 \ - libpangocairo-1.0-0 libcairo2 libgdk-pixbuf-2.0-0 libatk1.0-0t64 \ - libatk-bridge2.0-0t64 libcups2t64 libdbus-1-3 libnotify4 \ - libsecret-1-0 - - - name: Install Unity Editor - shell: bash - env: - PROJECT_PATH: ${{ inputs.project-path }} - MODULE: ${{ inputs.module }} - run: | - version="$(sed -n 's/^m_EditorVersion: //p' "$PROJECT_PATH/ProjectSettings/ProjectVersion.txt")" - unity install "$version" --yes --accept-eula --child-modules --module "$MODULE" - - location="$(unity editors -i --json | jq -r --arg v "$version" '.data.items[] | select(.version == $v) | .location' | head -n1)" - licensing_client="$(find "$location" -type f -name Unity.Licensing.Client -perm -u+x | sort | head -n1)" - if [ -z "$licensing_client" ]; then - echo "::error::Unity.Licensing.Client not found under $location" - exit 1 - fi - echo "UNITY_LICENSING_CLIENT=$licensing_client" >> "$GITHUB_ENV" - - # The CLI can only activate a license for a user signed in through a - # browser, so the Editor's licensing client activates the seat assigned to - # the CI account instead. Activating by serial is avoided because its - # legacy license-file step times out on macOS runners. - - name: Activate Unity seat - id: activate - shell: bash - env: - UNITY_USERNAME: ${{ inputs.username }} - UNITY_PASSWORD: ${{ inputs.password }} - run: | - for attempt in 1 2 3; do - if "$UNITY_LICENSING_CLIENT" --activate-all \ - --username "$UNITY_USERNAME" --password "$UNITY_PASSWORD"; then - unity license status - exit 0 - fi - echo "::warning::Unity seat activation attempt $attempt failed" - sleep 15 - done - exit 1 - - - name: Build - shell: bash - env: - PROJECT_PATH: ${{ inputs.project-path }} - TARGET: ${{ inputs.target }} - EXECUTE_METHOD: ${{ inputs.execute-method }} - EDITOR_ARGS: ${{ inputs.editor-args }} - run: | - unity build "$PROJECT_PATH" \ - --target "$TARGET" \ - --execute-method "$EXECUTE_METHOD" \ - --args "$EDITOR_ARGS" \ - --allow-dirty-build - - # Ephemeral runners would otherwise keep one of the seat's two activations. - - name: Return Unity seat - if: always() && steps.activate.outcome != 'skipped' - shell: bash - env: - UNITY_USERNAME: ${{ inputs.username }} - UNITY_PASSWORD: ${{ inputs.password }} - run: | - "$UNITY_LICENSING_CLIENT" --deactivate-all \ - --username "$UNITY_USERNAME" --password "$UNITY_PASSWORD" diff --git a/.github/actions/unity-return/action.yml b/.github/actions/unity-return/action.yml new file mode 100644 index 00000000..a5322814 --- /dev/null +++ b/.github/actions/unity-return/action.yml @@ -0,0 +1,21 @@ +name: "Unity return" +description: "Returns the Unity seat activated by unity-setup. Run with if: always() so ephemeral runners don't keep one of the seat's two activations." +inputs: + username: + description: "Unity ID email of the account the seat is assigned to" + required: true + password: + description: "Unity ID password of the account the seat is assigned to" + required: true +runs: + using: "composite" + steps: + - name: Return Unity seat + if: env.UNITY_LICENSING_CLIENT != '' + shell: bash + env: + UNITY_USERNAME: ${{ inputs.username }} + UNITY_PASSWORD: ${{ inputs.password }} + run: | + "$UNITY_LICENSING_CLIENT" --deactivate-all \ + --username "$UNITY_USERNAME" --password "$UNITY_PASSWORD" diff --git a/.github/actions/unity-setup/action.yml b/.github/actions/unity-setup/action.yml new file mode 100644 index 00000000..74181dcb --- /dev/null +++ b/.github/actions/unity-setup/action.yml @@ -0,0 +1,97 @@ +name: "Unity setup" +description: "Provides a Unity Editor and activates the Unity seat. Sets UNITY_EDITOR to a batch-mode Editor command; pair with unity-return." +inputs: + project-path: + description: "Path to the Unity project, used to read its Editor version" + required: false + default: "examples/demo" + module: + description: "Editor module to install with the Unity CLI (e.g. ios). Leave empty inside a unityci/editor container, which already has the Editor." + required: false + default: "" + username: + description: "Unity ID email of the account the seat is assigned to" + required: true + password: + description: "Unity ID password of the account the seat is assigned to" + required: true + cli-version: + description: "Unity CLI version to install" + required: false + default: "1.1.0" +runs: + using: "composite" + steps: + - name: Install Unity CLI + if: inputs.module != '' + shell: bash + env: + UNITY_CLI_VERSION: ${{ inputs.cli-version }} + UNITY_CLI_HOME: ${{ runner.temp }}/unity-cli + run: | + curl -fsSL https://unity.com/install.sh | bash + echo "$UNITY_CLI_HOME/bin" >> "$GITHUB_PATH" + { + echo "UNITY_NON_INTERACTIVE=1" + echo "UNITY_NO_UPDATE_CHECK=1" + echo "UNITY_FORMAT=github" + } >> "$GITHUB_ENV" + + - name: Install Unity Editor + if: inputs.module != '' + shell: bash + env: + PROJECT_PATH: ${{ inputs.project-path }} + MODULE: ${{ inputs.module }} + run: | + version="$(sed -n 's/^m_EditorVersion: //p' "$PROJECT_PATH/ProjectSettings/ProjectVersion.txt")" + unity install "$version" --yes --accept-eula --child-modules --module "$MODULE" + + location="$(unity editors -i --json | jq -r --arg v "$version" '.data.items[] | select(.version == $v) | .location' | head -n1)" + case "$location" in + *.app) binary="$location/Contents/MacOS/Unity" ;; + *) binary="$location/Editor/Unity" ;; + esac + + wrapper="$RUNNER_TEMP/unity-editor" + printf '#!/usr/bin/env bash\nexec %q -batchmode "$@"\n' "$binary" > "$wrapper" + chmod +x "$wrapper" + echo "UNITY_EDITOR=$wrapper" >> "$GITHUB_ENV" + echo "UNITY_EDITOR_ROOT=$location" >> "$GITHUB_ENV" + + - name: Use container Editor + if: inputs.module == '' + shell: bash + run: | + if [ -z "${UNITY_PATH:-}" ] || ! command -v unity-editor >/dev/null; then + echo "::error::No module given and no unityci/editor container Editor found" + exit 1 + fi + echo "UNITY_EDITOR=unity-editor" >> "$GITHUB_ENV" + echo "UNITY_EDITOR_ROOT=$UNITY_PATH" >> "$GITHUB_ENV" + + # The Unity CLI can only activate a license for a user signed in through a + # browser, and serial activation's license-file step times out on macOS + # runners, so the Editor's licensing client activates the seat assigned + # to the account instead. + - name: Activate Unity seat + shell: bash + env: + UNITY_USERNAME: ${{ inputs.username }} + UNITY_PASSWORD: ${{ inputs.password }} + run: | + client="$(find "$UNITY_EDITOR_ROOT" -type f -name Unity.Licensing.Client -perm -u+x | sort | head -n1)" + if [ -z "$client" ]; then + echo "::error::Unity.Licensing.Client not found under $UNITY_EDITOR_ROOT" + exit 1 + fi + echo "UNITY_LICENSING_CLIENT=$client" >> "$GITHUB_ENV" + + for attempt in 1 2 3; do + if "$client" --activate-all --username "$UNITY_USERNAME" --password "$UNITY_PASSWORD"; then + exit 0 + fi + echo "::warning::Unity seat activation attempt $attempt failed" + sleep 15 + done + exit 1 diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 03594715..1251435c 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -25,17 +25,16 @@ concurrency: jobs: build-android: - name: build-android (FID ${{ matrix.fid }}) if: >- github.event_name == 'push' || github.event.inputs.platform == 'android' || github.event.inputs.platform == 'both' runs-on: ubuntu-latest - strategy: - # Each leg activates a Unity license; run them one at a time. - max-parallel: 1 - matrix: - fid: ['on', 'off'] + # Prebuilt Editor with Android support; keep in sync with + # examples/demo/ProjectSettings/ProjectVersion.txt. + container: unityci/editor:ubuntu-6000.4.11f1-android-3 + env: + PROJECT_PATH: examples/demo steps: - name: Checkout uses: actions/checkout@v6 @@ -50,26 +49,10 @@ jobs: - name: Enable E2E accessibility run: | - python3 - <<'PY' - import json - from pathlib import Path - - path = Path("examples/demo/Packages/manifest.json") - manifest = json.loads(path.read_text()) - manifest["dependencies"]["com.unity.modules.accessibility"] = "1.0.0" - path.write_text(json.dumps(manifest, indent=2) + "\n") - PY - printf '%s\n' '-define:ONESIGNAL_E2E_ACCESSIBILITY' > examples/demo/Assets/csc.rsp - if [ "${{ matrix.fid }}" = on ]; then - printf '%s\n' '-define:FIREBASE_INSTALLATION_ID_ENABLED' >> examples/demo/Assets/csc.rsp - fi - - - name: Write google-services.json - uses: OneSignal/sdk-shared/.github/actions/setup-google-services@main - with: - google-services-json: ${{ secrets.APPIUM_GOOGLE_SERVICES_JSON }} - enabled: ${{ matrix.fid == 'on' }} - path: examples/demo/google-services.json + manifest="$PROJECT_PATH/Packages/manifest.json" + jq '.dependencies["com.unity.modules.accessibility"] = "1.0.0"' "$manifest" > "$manifest.tmp" + mv "$manifest.tmp" "$manifest" + printf '%s\n' '-define:ONESIGNAL_E2E_ACCESSIBILITY' > "$PROJECT_PATH/Assets/csc.rsp" - name: Cache Unity Library uses: actions/cache@v5 @@ -78,24 +61,60 @@ jobs: key: unity-library-android-${{ hashFiles('examples/demo/Packages/manifest.json', 'examples/demo/Assets/csc.rsp', 'examples/demo/ProjectSettings/ProjectVersion.txt') }} restore-keys: unity-library-android- - - name: Build APK - uses: ./.github/actions/unity-build + - name: Set up Unity + uses: ./.github/actions/unity-setup with: - target: Android - module: android - execute-method: BuildScript.BuildAndroidEmulator - editor-args: -demoBundleId com.onesignal.sdkdemo username: ${{ secrets.UNITY_USERNAME }} password: ${{ secrets.UNITY_PASSWORD }} - - name: Upload APK + - name: Build APK (FID off) + run: | + "$UNITY_EDITOR" -nographics -quit -logFile - \ + -projectPath "$GITHUB_WORKSPACE/$PROJECT_PATH" \ + -buildTarget Android \ + -executeMethod BuildScript.BuildAndroidEmulator \ + -demoBundleId com.onesignal.sdkdemo + + - name: Upload APK (FID off) + uses: actions/upload-artifact@v7 + with: + name: demo-apk-fid-off + path: examples/demo/Build/Android/onesignal-demo.apk + retention-days: 1 + compression-level: 0 + + - name: Enable Firebase Installation IDs + run: printf '%s\n' '-define:FIREBASE_INSTALLATION_ID_ENABLED' >> "$PROJECT_PATH/Assets/csc.rsp" + + - name: Write google-services.json + uses: OneSignal/sdk-shared/.github/actions/setup-google-services@main + with: + google-services-json: ${{ secrets.APPIUM_GOOGLE_SERVICES_JSON }} + path: examples/demo/google-services.json + + - name: Build APK (FID on) + run: | + "$UNITY_EDITOR" -nographics -quit -logFile - \ + -projectPath "$GITHUB_WORKSPACE/$PROJECT_PATH" \ + -buildTarget Android \ + -executeMethod BuildScript.BuildAndroidEmulator \ + -demoBundleId com.onesignal.sdkdemo + + - name: Upload APK (FID on) uses: actions/upload-artifact@v7 with: - name: demo-apk${{ matrix.fid == 'off' && '-fid-off' || '' }} + name: demo-apk path: examples/demo/Build/Android/onesignal-demo.apk retention-days: 1 compression-level: 0 + - name: Return Unity seat + if: always() + uses: ./.github/actions/unity-return + with: + username: ${{ secrets.UNITY_USERNAME }} + password: ${{ secrets.UNITY_PASSWORD }} + build-ios: # Runs after the Android builds so CI holds at most one of the Unity # seat's two activations at a time. @@ -150,13 +169,26 @@ jobs: key: deriveddata-${{ runner.os }}-${{ hashFiles('examples/demo/Packages/manifest.json', 'examples/demo/Assets/csc.rsp', 'examples/demo/ProjectSettings/ProjectVersion.txt', 'examples/demo/ProjectSettings/ProjectSettings.asset', 'com.onesignal.unity.ios/Editor/**', 'com.onesignal.unity.core/Editor/**', 'examples/demo/iOS/ExportOptions.plist') }} restore-keys: deriveddata-${{ runner.os }}- - - name: Export Xcode project from Unity - uses: ./.github/actions/unity-build + - name: Set up Unity + uses: ./.github/actions/unity-setup with: - target: iOS module: ios - execute-method: BuildScript.BuildiOSDevice - editor-args: -demoBundleId com.onesignal.sdkdemo -demoTeamId DL8TF3X4K3 + username: ${{ secrets.UNITY_USERNAME }} + password: ${{ secrets.UNITY_PASSWORD }} + + - name: Export Xcode project from Unity + run: | + "$UNITY_EDITOR" -nographics -quit -logFile - \ + -projectPath "$GITHUB_WORKSPACE/examples/demo" \ + -buildTarget iOS \ + -executeMethod BuildScript.BuildiOSDevice \ + -demoBundleId com.onesignal.sdkdemo \ + -demoTeamId DL8TF3X4K3 + + - name: Return Unity seat + if: always() + uses: ./.github/actions/unity-return + with: username: ${{ secrets.UNITY_USERNAME }} password: ${{ secrets.UNITY_PASSWORD }} From 0d568f937c9f39047cc88968ebeea106d169083c Mon Sep 17 00:00:00 2001 From: Fadi George Date: Tue, 1 Dec 2026 16:48:29 -0800 Subject: [PATCH 07/10] ci: [SDK-5790] run iOS E2E after an iOS-only build Co-Authored-By: Claude Opus 5.5 --- .github/workflows/e2e.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 1251435c..89ede74d 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -288,6 +288,9 @@ jobs: e2e-ios: needs: build-ios + # build-ios can succeed after a skipped build-android, which would skip + # this job under the default success() check. + if: ${{ !cancelled() && needs.build-ios.result == 'success' }} uses: OneSignal/sdk-shared/.github/workflows/appium-e2e.yml@main secrets: inherit with: From 0100683afcecf12be3a9c63b9de3cb69cd8b522a Mon Sep 17 00:00:00 2001 From: Fadi George Date: Tue, 1 Dec 2026 17:22:40 -0800 Subject: [PATCH 08/10] ci: [SDK-5790] speed up Unity E2E builds Build iOS and Android in parallel, cache Gradle, and compile Android IL2CPP in Debug for E2E. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/e2e.yml | 29 ++++++++++--------- .../demo/Assets/Scripts/Editor/BuildScript.cs | 17 ++++++++++- 2 files changed, 32 insertions(+), 14 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 89ede74d..eaeeb205 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -61,6 +61,15 @@ jobs: key: unity-library-android-${{ hashFiles('examples/demo/Packages/manifest.json', 'examples/demo/Assets/csc.rsp', 'examples/demo/ProjectSettings/ProjectVersion.txt') }} restore-keys: unity-library-android- + - name: Cache Gradle + uses: actions/cache@v5 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: gradle-unity-android-${{ hashFiles('examples/demo/Assets/Plugins/Android/*.gradle', 'examples/demo/Assets/OneSignal/Editor/OneSignalAndroidDependencies.xml', 'examples/demo/ProjectSettings/ProjectVersion.txt') }} + restore-keys: gradle-unity-android- + - name: Set up Unity uses: ./.github/actions/unity-setup with: @@ -73,7 +82,8 @@ jobs: -projectPath "$GITHUB_WORKSPACE/$PROJECT_PATH" \ -buildTarget Android \ -executeMethod BuildScript.BuildAndroidEmulator \ - -demoBundleId com.onesignal.sdkdemo + -demoBundleId com.onesignal.sdkdemo \ + -il2cppDebug - name: Upload APK (FID off) uses: actions/upload-artifact@v7 @@ -98,7 +108,8 @@ jobs: -projectPath "$GITHUB_WORKSPACE/$PROJECT_PATH" \ -buildTarget Android \ -executeMethod BuildScript.BuildAndroidEmulator \ - -demoBundleId com.onesignal.sdkdemo + -demoBundleId com.onesignal.sdkdemo \ + -il2cppDebug - name: Upload APK (FID on) uses: actions/upload-artifact@v7 @@ -116,15 +127,10 @@ jobs: password: ${{ secrets.UNITY_PASSWORD }} build-ios: - # Runs after the Android builds so CI holds at most one of the Unity - # seat's two activations at a time. - needs: build-android if: >- - !cancelled() && ( - github.event_name == 'push' || - github.event.inputs.platform == 'ios' || - github.event.inputs.platform == 'both' - ) + github.event_name == 'push' || + github.event.inputs.platform == 'ios' || + github.event.inputs.platform == 'both' runs-on: macos-latest steps: - name: Checkout @@ -288,9 +294,6 @@ jobs: e2e-ios: needs: build-ios - # build-ios can succeed after a skipped build-android, which would skip - # this job under the default success() check. - if: ${{ !cancelled() && needs.build-ios.result == 'success' }} uses: OneSignal/sdk-shared/.github/workflows/appium-e2e.yml@main secrets: inherit with: diff --git a/examples/demo/Assets/Scripts/Editor/BuildScript.cs b/examples/demo/Assets/Scripts/Editor/BuildScript.cs index 99776ab7..83b6debb 100644 --- a/examples/demo/Assets/Scripts/Editor/BuildScript.cs +++ b/examples/demo/Assets/Scripts/Editor/BuildScript.cs @@ -52,6 +52,18 @@ private static string GetArg(string name) return index >= 0 && index + 1 < args.Length ? args[index + 1].Trim() : null; } + private static bool HasFlag(string name) => + Array.IndexOf(Environment.GetCommandLineArgs(), name) >= 0; + + /// + /// -il2cppDebug trades runtime speed for a faster C++ compile, which + /// E2E builds can afford. + /// + private static Il2CppCompilerConfiguration Il2CppConfiguration() => + HasFlag("-il2cppDebug") + ? Il2CppCompilerConfiguration.Debug + : Il2CppCompilerConfiguration.Release; + /// /// Builds an Android APK using the architecture and scripting backend /// pre-configured in ProjectSettings.asset by run-android.sh. @@ -87,7 +99,10 @@ public static void BuildAndroidEmulator() PlayerSettings.SetIl2CppCompilerConfiguration( NamedBuildTarget.Android, - Il2CppCompilerConfiguration.Release + Il2CppConfiguration() + ); + Debug.Log( + $"[BuildScript] il2cpp={PlayerSettings.GetIl2CppCompilerConfiguration(NamedBuildTarget.Android)}" ); EditorUserBuildSettings.androidBuildSystem = AndroidBuildSystem.Gradle; EditorUserBuildSettings.exportAsGoogleAndroidProject = false; From 49571d15325734b77263e426a028a9166754e7ba Mon Sep 17 00:00:00 2001 From: Fadi George Date: Tue, 1 Dec 2026 17:45:22 -0800 Subject: [PATCH 09/10] ci: [SDK-5790] drop IL2CPP Debug and fix the Gradle cache path Debug IL2CPP did not shorten the build and grew the APK by 48 MB. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/e2e.yml | 9 +++++---- .../demo/Assets/Scripts/Editor/BuildScript.cs | 17 +---------------- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index eaeeb205..a5b4af44 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -64,9 +64,12 @@ jobs: - name: Cache Gradle uses: actions/cache@v5 with: + # Gradle resolves its home from the container user, which may differ from $HOME. path: | ~/.gradle/caches ~/.gradle/wrapper + /root/.gradle/caches + /root/.gradle/wrapper key: gradle-unity-android-${{ hashFiles('examples/demo/Assets/Plugins/Android/*.gradle', 'examples/demo/Assets/OneSignal/Editor/OneSignalAndroidDependencies.xml', 'examples/demo/ProjectSettings/ProjectVersion.txt') }} restore-keys: gradle-unity-android- @@ -82,8 +85,7 @@ jobs: -projectPath "$GITHUB_WORKSPACE/$PROJECT_PATH" \ -buildTarget Android \ -executeMethod BuildScript.BuildAndroidEmulator \ - -demoBundleId com.onesignal.sdkdemo \ - -il2cppDebug + -demoBundleId com.onesignal.sdkdemo - name: Upload APK (FID off) uses: actions/upload-artifact@v7 @@ -108,8 +110,7 @@ jobs: -projectPath "$GITHUB_WORKSPACE/$PROJECT_PATH" \ -buildTarget Android \ -executeMethod BuildScript.BuildAndroidEmulator \ - -demoBundleId com.onesignal.sdkdemo \ - -il2cppDebug + -demoBundleId com.onesignal.sdkdemo - name: Upload APK (FID on) uses: actions/upload-artifact@v7 diff --git a/examples/demo/Assets/Scripts/Editor/BuildScript.cs b/examples/demo/Assets/Scripts/Editor/BuildScript.cs index 83b6debb..99776ab7 100644 --- a/examples/demo/Assets/Scripts/Editor/BuildScript.cs +++ b/examples/demo/Assets/Scripts/Editor/BuildScript.cs @@ -52,18 +52,6 @@ private static string GetArg(string name) return index >= 0 && index + 1 < args.Length ? args[index + 1].Trim() : null; } - private static bool HasFlag(string name) => - Array.IndexOf(Environment.GetCommandLineArgs(), name) >= 0; - - /// - /// -il2cppDebug trades runtime speed for a faster C++ compile, which - /// E2E builds can afford. - /// - private static Il2CppCompilerConfiguration Il2CppConfiguration() => - HasFlag("-il2cppDebug") - ? Il2CppCompilerConfiguration.Debug - : Il2CppCompilerConfiguration.Release; - /// /// Builds an Android APK using the architecture and scripting backend /// pre-configured in ProjectSettings.asset by run-android.sh. @@ -99,10 +87,7 @@ public static void BuildAndroidEmulator() PlayerSettings.SetIl2CppCompilerConfiguration( NamedBuildTarget.Android, - Il2CppConfiguration() - ); - Debug.Log( - $"[BuildScript] il2cpp={PlayerSettings.GetIl2CppCompilerConfiguration(NamedBuildTarget.Android)}" + Il2CppCompilerConfiguration.Release ); EditorUserBuildSettings.androidBuildSystem = AndroidBuildSystem.Gradle; EditorUserBuildSettings.exportAsGoogleAndroidProject = false; From e2ca9deabd9498a9670975fa4a9ca1e9f4e47dab Mon Sep 17 00:00:00 2001 From: Fadi George Date: Wed, 2 Dec 2026 09:55:52 -0800 Subject: [PATCH 10/10] ci: [SDK-5790] retry the Unity seat return and avoid early pipe exits Co-Authored-By: Claude Opus 5.5 --- .github/actions/unity-return/action.yml | 10 ++++++++-- .github/actions/unity-setup/action.yml | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/actions/unity-return/action.yml b/.github/actions/unity-return/action.yml index a5322814..cd812fb4 100644 --- a/.github/actions/unity-return/action.yml +++ b/.github/actions/unity-return/action.yml @@ -17,5 +17,11 @@ runs: UNITY_USERNAME: ${{ inputs.username }} UNITY_PASSWORD: ${{ inputs.password }} run: | - "$UNITY_LICENSING_CLIENT" --deactivate-all \ - --username "$UNITY_USERNAME" --password "$UNITY_PASSWORD" + for attempt in 1 2 3; do + if "$UNITY_LICENSING_CLIENT" --deactivate-all --username "$UNITY_USERNAME" --password "$UNITY_PASSWORD"; then + exit 0 + fi + echo "::warning::Unity seat return attempt $attempt failed" + sleep 15 + done + exit 1 diff --git a/.github/actions/unity-setup/action.yml b/.github/actions/unity-setup/action.yml index 74181dcb..cd1ac8ab 100644 --- a/.github/actions/unity-setup/action.yml +++ b/.github/actions/unity-setup/action.yml @@ -47,7 +47,7 @@ runs: version="$(sed -n 's/^m_EditorVersion: //p' "$PROJECT_PATH/ProjectSettings/ProjectVersion.txt")" unity install "$version" --yes --accept-eula --child-modules --module "$MODULE" - location="$(unity editors -i --json | jq -r --arg v "$version" '.data.items[] | select(.version == $v) | .location' | head -n1)" + location="$(unity editors -i --json | jq -r --arg v "$version" '.data.items[] | select(.version == $v) | .location' | sed -n 1p)" case "$location" in *.app) binary="$location/Contents/MacOS/Unity" ;; *) binary="$location/Editor/Unity" ;; @@ -80,7 +80,7 @@ runs: UNITY_USERNAME: ${{ inputs.username }} UNITY_PASSWORD: ${{ inputs.password }} run: | - client="$(find "$UNITY_EDITOR_ROOT" -type f -name Unity.Licensing.Client -perm -u+x | sort | head -n1)" + client="$(find "$UNITY_EDITOR_ROOT" -type f -name Unity.Licensing.Client -perm -u+x | sort | sed -n 1p)" if [ -z "$client" ]; then echo "::error::Unity.Licensing.Client not found under $UNITY_EDITOR_ROOT" exit 1