diff --git a/.github/workflows/main.ci.cd.workflow.yml b/.github/workflows/main.ci.cd.workflow.yml index b2d58881..1be34518 100644 --- a/.github/workflows/main.ci.cd.workflow.yml +++ b/.github/workflows/main.ci.cd.workflow.yml @@ -9,6 +9,13 @@ on: schedule: - cron: "0 0 * * *" # run daily at midnight (UTC) +# Cancel superseded runs on the same ref (e.g. rapid PR pushes) so queued matrix +# jobs don't stack up against the org's concurrent-runner limit. Scheduled/nightly +# runs on a branch won't collide with PR runs because the ref differs. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: runtime-tests: name: Runtime Tests (IL2CPP) @@ -138,30 +145,44 @@ jobs: SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }} build: + name: build (${{ matrix.unity_version }}, ${{ matrix.target_platform }}, ${{ matrix.dotnet_version }}, ${{ matrix.compiler }}) runs-on: ubuntu-latest strategy: fail-fast: false + # Testing every version x platform x dotnet_version x compiler combination + # would explode the job count. Instead we pick a representative subset that + # keeps similar coverage with far fewer jobs: one android + one iOS config + # per Unity version, arranged so every platform/dotnet/compiler value is still + # exercised across the matrix. + # Patch releases must be public LTS builds from the Unity archive, not Extended + # LTS (xLTS) patches that require Industry/Enterprise licenses in CI. + # dataset_index must be unique per row and within 0-15 (test data set count). matrix: - target_platform: [android, ios] - unity_version: [2020, 2021] - dotnet_version: [NET_4_x, STANDARD_2_x] - compiler: [mono, il2cpp] + include: + - { unity_version: "2019.4", target_platform: android, dotnet_version: NET_4_x, compiler: il2cpp, dataset_index: 0, image: "unityci/editor:ubuntu-2019.4.40f1-android-3.2.2" } + - { unity_version: "2019.4", target_platform: ios, dotnet_version: STANDARD_2_x, compiler: mono, dataset_index: 1, image: "unityci/editor:ubuntu-2019.4.40f1-ios-3.2.2" } + - { unity_version: "2020.3", target_platform: android, dotnet_version: NET_4_x, compiler: mono, dataset_index: 2, image: "unityci/editor:ubuntu-2020.3.40f1-android-3.1.0" } + - { unity_version: "2020.3", target_platform: ios, dotnet_version: STANDARD_2_x, compiler: il2cpp, dataset_index: 3, image: "unityci/editor:ubuntu-2020.3.40f1-ios-3.1.0" } + - { unity_version: "2021.3", target_platform: android, dotnet_version: STANDARD_2_x, compiler: il2cpp, dataset_index: 4, image: "unityci/editor:ubuntu-2021.3.36f1-android-3.1.0" } + - { unity_version: "2021.3", target_platform: ios, dotnet_version: NET_4_x, compiler: mono, dataset_index: 5, image: "unityci/editor:ubuntu-2021.3.36f1-ios-3.1.0" } + - { unity_version: "2022.3", target_platform: android, dotnet_version: STANDARD_2_x, compiler: mono, dataset_index: 6, image: "unityci/editor:ubuntu-2022.3.62f2-android-3.2.2" } + - { unity_version: "2022.3", target_platform: ios, dotnet_version: NET_4_x, compiler: il2cpp, dataset_index: 7, image: "unityci/editor:ubuntu-2022.3.62f2-ios-3.2.2" } + - { unity_version: "2023.2", target_platform: android, dotnet_version: STANDARD_2_x, compiler: mono, dataset_index: 8, image: "unityci/editor:ubuntu-2023.2.20f1-android-3.2.2" } + - { unity_version: "2023.2", target_platform: ios, dotnet_version: NET_4_x, compiler: il2cpp, dataset_index: 9, image: "unityci/editor:ubuntu-2023.2.20f1-ios-3.2.2" } + - { unity_version: "6000.0", target_platform: android, dotnet_version: STANDARD_2_x, compiler: il2cpp, dataset_index: 10, image: "unityci/editor:ubuntu-6000.0.63f1-android-3.2.2" } + - { unity_version: "6000.0", target_platform: ios, dotnet_version: NET_4_x, compiler: mono, dataset_index: 11, image: "unityci/editor:ubuntu-6000.0.63f1-ios-3.2.2" } + - { unity_version: "6000.1", target_platform: android, dotnet_version: NET_4_x, compiler: mono, dataset_index: 12, image: "unityci/editor:ubuntu-6000.1.17f1-android-3.2.2" } + - { unity_version: "6000.1", target_platform: ios, dotnet_version: STANDARD_2_x, compiler: il2cpp, dataset_index: 13, image: "unityci/editor:ubuntu-6000.1.17f1-ios-3.2.2" } + - { unity_version: "6000.2", target_platform: android, dotnet_version: NET_4_x, compiler: il2cpp, dataset_index: 14, image: "unityci/editor:ubuntu-6000.2.12f1-android-3.2.2" } + - { unity_version: "6000.2", target_platform: ios, dotnet_version: STANDARD_2_x, compiler: mono, dataset_index: 15, image: "unityci/editor:ubuntu-6000.2.12f1-ios-3.2.2" } steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Calculate Sequential Index - id: calculate-index + - name: Set Test Data Set Index run: | - target_index=$([[ "${{ matrix.target_platform }}" == 'android' ]] && echo '0' || echo '1') - unity_index=$([[ "${{ matrix.unity_version }}" == '2020' ]] && echo '0' || echo '1') - dotnet_index=$([[ "${{ matrix.dotnet_version }}" == 'NET_4_x' ]] && echo '0' || echo '1') - compiler_index=$([[ "${{ matrix.compiler }}" == 'mono' ]] && echo '0' || echo '1') - - index=$((target_index * 1 + unity_index * 2 + dotnet_index * 4 + compiler_index * 8)) - - echo "SEQUENTIAL_INDEX=$index" >> $GITHUB_ENV + echo "SEQUENTIAL_INDEX=${{ matrix.dataset_index }}" >> $GITHUB_ENV - name: Print Sequential Index run: | @@ -196,29 +217,7 @@ jobs: - name: Determine Docker Image id: dockerImageSelector run: | - if [ "${{ matrix.unity_version }}" == '2020' ]; then - if [ "${{ matrix.target_platform }}" == 'android' ]; then - TAG='unityci/editor:ubuntu-2020.3.40f1-android-3.1.0' - elif [ "${{ matrix.target_platform }}" == 'ios' ]; then - TAG='unityci/editor:ubuntu-2020.3.40f1-ios-3.1.0' - else - echo "Unsupported platform" - exit 1 - fi - elif [ "${{ matrix.unity_version }}" == '2021' ]; then - if [ "${{ matrix.target_platform }}" == 'android' ]; then - TAG='unityci/editor:ubuntu-2021.3.36f1-android-3.1.0' - elif [ "${{ matrix.target_platform }}" == 'ios' ]; then - TAG='unityci/editor:ubuntu-2021.3.36f1-ios-3.1.0' - else - echo "Unsupported platform" - exit 1 - fi - else - echo "Unsupported Unity version" - exit 1 - fi - echo "DOCKER_TAG=$TAG" >> $GITHUB_ENV + echo "DOCKER_TAG=${{ matrix.image }}" >> $GITHUB_ENV - name: Echo Docker Image run: | @@ -239,6 +238,15 @@ jobs: echo "RUNNER_ID=$RUNNER_ID" >> $GITHUB_ENV echo "BUILD_NAME=$BUILD_NAME" >> $GITHUB_ENV + + # Without a manifest, Unity 2019.4 resolves com.unity.textmeshpro@3.0.9 (via ugui), + # whose editor scripts reference VersionControlSettings — unavailable in 2019.4. + - name: Install 2019.4 Packages/manifest.json + if: matrix.unity_version == '2019.4' + run: | + mkdir -p Packages + cp .github/workflows/manifests/build-2019.4.manifest.json Packages/manifest.json + rm -f Packages/packages-lock.json - name: Enable Tests uses: game-ci/unity-builder@v4 diff --git a/.github/workflows/manifests/build-2019.4.manifest.json b/.github/workflows/manifests/build-2019.4.manifest.json new file mode 100644 index 00000000..87eba5e7 --- /dev/null +++ b/.github/workflows/manifests/build-2019.4.manifest.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "com.unity.textmeshpro": "2.1.6" + } +} diff --git a/Packages/manifest.json b/Packages/manifest.json deleted file mode 100644 index 8719abd6..00000000 --- a/Packages/manifest.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "dependencies": { - "com.unity.textmeshpro": "3.0.9", - "com.unity.test-framework": "1.1.33", - "com.unity.ugui": "1.0.0", - "com.unity.modules.androidjni": "1.0.0", - "com.unity.modules.animation": "1.0.0", - "com.unity.modules.assetbundle": "1.0.0", - "com.unity.modules.audio": "1.0.0", - "com.unity.modules.imageconversion": "1.0.0", - "com.unity.modules.imgui": "1.0.0", - "com.unity.modules.jsonserialize": "1.0.0", - "com.unity.modules.particlesystem": "1.0.0", - "com.unity.modules.physics": "1.0.0", - "com.unity.modules.physics2d": "1.0.0", - "com.unity.modules.ui": "1.0.0", - "com.unity.modules.uielements": "1.0.0", - "com.unity.modules.unitywebrequest": "1.0.0", - "com.unity.modules.unitywebrequestassetbundle": "1.0.0", - "com.unity.modules.unitywebrequestaudio": "1.0.0", - "com.unity.modules.unitywebrequesttexture": "1.0.0", - "com.unity.modules.unitywebrequestwww": "1.0.0", - "com.unity.modules.video": "1.0.0" - } -}