8686 unity : 2022.3.62f2
8787 changeset : 7670c08855a9
8888 runner : [self-hosted, macOS, ARM64]
89- # Mobile IL2CPP build cells — macOS only, no device required.
90- # Validates the IL2CPP compile pipeline; runtime tests need a real device
91- # and are out of scope until a device farm is available.
92- - target : Android
93- backend : IL2CPP
94- unity : 2021.3.45f2
95- changeset : 88f88f591b2e
96- runner : [self-hosted, macOS, ARM64]
97- mobile : true
98- module : android
99- method : AndroidBuilder.Build
100- - target : Android
101- backend : IL2CPP
102- unity : 2022.3.62f2
103- changeset : 7670c08855a9
104- runner : [self-hosted, macOS, ARM64]
105- mobile : true
106- module : android
107- method : AndroidBuilder.Build
108- - target : Android
109- backend : IL2CPP
110- unity : 6000.4.0f1
111- changeset : 8cf496087c8f
112- runner : [self-hosted, macOS, ARM64]
113- mobile : true
114- module : android
115- method : AndroidBuilder.Build
116- - target : iOS
117- backend : IL2CPP
118- unity : 2021.3.45f2
119- changeset : 88f88f591b2e
120- runner : [self-hosted, macOS, ARM64]
121- mobile : true
122- module : ios
123- method : IosBuilder.Build
124- - target : iOS
125- backend : IL2CPP
126- unity : 2022.3.62f2
127- changeset : 7670c08855a9
128- runner : [self-hosted, macOS, ARM64]
129- mobile : true
130- module : ios
131- method : IosBuilder.Build
132- - target : iOS
133- backend : IL2CPP
134- unity : 6000.4.0f1
135- changeset : 8cf496087c8f
136- runner : [self-hosted, macOS, ARM64]
137- mobile : true
138- module : ios
139- method : IosBuilder.Build
14089 runs-on : ${{ matrix.runner }}
14190 timeout-minutes : 60
14291
@@ -251,14 +200,7 @@ jobs:
251200 || echo "(install non-zero — OK if 'Editor already installed in this location')"
252201 echo "::endgroup::"
253202
254- if [ "${{ matrix.mobile }}" = "true" ]; then
255- echo "::group::install ${{ matrix.module }} module"
256- "$HUB" -- --headless install-modules \
257- --version "$UNITY_VER" --changeset "$UNITY_CS" --architecture arm64 \
258- --module "${{ matrix.module }}" \
259- || echo "(install-modules non-zero — OK if 'No modules found to install')"
260- echo "::endgroup::"
261- elif [ "${{ matrix.backend }}" = "IL2CPP" ]; then
203+ if [ "${{ matrix.backend }}" = "IL2CPP" ]; then
262204 echo "::group::install mac-il2cpp module"
263205 "$HUB" -- --headless install-modules \
264206 --version "$UNITY_VER" --changeset "$UNITY_CS" --architecture arm64 \
@@ -285,7 +227,7 @@ jobs:
285227
286228 MISSING=""
287229 [ -z "$EDITOR_APP" ] && MISSING="editor"
288- [ "${{ matrix.backend }}" = "IL2CPP" ] && [ "${{ matrix.mobile }}" != "true" ] && [ -z "$IL2CPP_DIR" ] && MISSING="${MISSING:+$MISSING+}mac-il2cpp"
230+ [ "${{ matrix.backend }}" = "IL2CPP" ] && [ -z "$IL2CPP_DIR" ] && MISSING="${MISSING:+$MISSING+}mac-il2cpp"
289231 if [ -n "$MISSING" ]; then
290232 echo "::error::Unity $UNITY_VER missing: $MISSING"
291233 ls -la /Applications/Unity/Hub/Editor/ 2>&1 || true
@@ -339,7 +281,7 @@ jobs:
339281 "UNITY_PATH=$editor" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
340282
341283 - name : Run PlayMode tests (macOS)
342- if : runner.os == 'macOS' && matrix.mobile != true
284+ if : runner.os == 'macOS'
343285 shell : bash
344286 env :
345287 AUDIENCE_TEST_PUBLISHABLE_KEY : ${{ secrets.AUDIENCE_TEST_PUBLISHABLE_KEY }}
@@ -361,20 +303,6 @@ jobs:
361303 -testResults "$(pwd)/artifacts/test-results.xml" \
362304 -logFile - 2>&1 | tee "$(pwd)/artifacts/unity.log"
363305
364- - name : Build mobile target (macOS)
365- if : runner.os == 'macOS' && matrix.mobile == true
366- shell : bash
367- run : |
368- set -euo pipefail
369- mkdir -p artifacts
370- "$UNITY_PATH" \
371- -batchmode -nographics \
372- -projectPath examples/audience \
373- -buildTarget ${{ matrix.target }} \
374- -executeMethod Immutable.Audience.Samples.SampleApp.Editor.${{ matrix.method }} \
375- -quit \
376- -logFile - 2>&1 | tee "$(pwd)/artifacts/unity.log"
377-
378306 - name : Run PlayMode tests (Windows)
379307 if : runner.os == 'Windows'
380308 shell : pwsh
@@ -408,7 +336,7 @@ jobs:
408336 git config --global --add safe.directory $env:GITHUB_WORKSPACE.Replace('\','/')
409337
410338 - name : Capture player log (macOS)
411- if : always() && runner.os == 'macOS' && matrix.mobile != true
339+ if : always() && runner.os == 'macOS'
412340 shell : bash
413341 run : |
414342 # The test-runner builds + launches a player binary that writes its own
@@ -488,15 +416,15 @@ jobs:
488416
489417 - name : Publish test report
490418 uses : dorny/test-reporter@v3
491- if : always() && matrix.mobile != true
419+ if : always()
492420 with :
493421 name : PlayMode (${{ matrix.backend }} / ${{ matrix.target }})
494422 path : artifacts/test-results.xml
495423 reporter : dotnet-nunit
496424 fail-on-error : true
497425
498426 - uses : actions/upload-artifact@v4
499- if : always() && matrix.mobile != true
427+ if : always()
500428 with :
501429 name : playmode-${{ matrix.backend }}-${{ matrix.target }}-${{ matrix.unity }}
502430 path : |
@@ -505,12 +433,68 @@ jobs:
505433 artifacts/Player-*.log
506434 examples/audience/Logs/**
507435
436+ # Mobile IL2CPP build validation — runs on GitHub-hosted Ubuntu via GameCI Docker
437+ # containers so self-hosted macOS/Windows machines are not occupied.
438+ # Scope: IL2CPP compile pipeline only. Runtime tests require a real device and
439+ # are out of scope until a device farm is available.
440+ # Note: Unity 6 cells use 6000.4.5f1 (the latest patch with a GameCI image);
441+ # 6000.4.0f1 does not have a published GameCI Docker image.
442+ mobile-build :
443+ if : github.event.pull_request.head.repo.fork == false || github.event_name == 'workflow_dispatch'
444+ name : ${{ matrix.target }} / IL2CPP / Unity ${{ matrix.unity }}
445+ runs-on : ubuntu-latest-8-cores
446+ strategy :
447+ fail-fast : false
448+ matrix :
449+ include :
450+ - target : Android
451+ unity : 2021.3.45f2
452+ method : AndroidBuilder.Build
453+ - target : Android
454+ unity : 2022.3.62f2
455+ method : AndroidBuilder.Build
456+ - target : Android
457+ unity : 6000.4.5f1
458+ method : AndroidBuilder.Build
459+ - target : iOS
460+ unity : 2021.3.45f2
461+ method : IosBuilder.Build
462+ - target : iOS
463+ unity : 2022.3.62f2
464+ method : IosBuilder.Build
465+ - target : iOS
466+ unity : 6000.4.5f1
467+ method : IosBuilder.Build
468+
469+ steps :
470+ - uses : actions/checkout@v4
471+ with :
472+ lfs : true
473+
474+ - uses : actions/cache@v4
475+ with :
476+ path : examples/audience/Library
477+ key : Library-mobile-${{ matrix.target }}-${{ matrix.unity }}-${{ hashFiles('examples/audience/Assets/**', 'examples/audience/Packages/**', 'examples/audience/ProjectSettings/**', 'src/Packages/Audience/**') }}
478+ restore-keys : |
479+ Library-mobile-${{ matrix.target }}-${{ matrix.unity }}-
480+ Library-mobile-${{ matrix.target }}-
481+
482+ - uses : game-ci/unity-builder@v4
483+ env :
484+ UNITY_EMAIL : ${{ secrets.UNITY_EMAIL }}
485+ UNITY_PASSWORD : ${{ secrets.UNITY_PASSWORD }}
486+ UNITY_SERIAL : ${{ secrets.UNITY_SERIAL }}
487+ with :
488+ unityVersion : ${{ matrix.unity }}
489+ targetPlatform : ${{ matrix.target }}
490+ projectPath : examples/audience
491+ buildMethod : Immutable.Audience.Samples.SampleApp.Editor.${{ matrix.method }}
492+
508493 - uses : actions/upload-artifact@v4
509- if : always() && matrix.mobile == true
494+ if : always()
510495 with :
511496 name : mobile-build-${{ matrix.target }}-${{ matrix.unity }}
512497 if-no-files-found : ignore
513498 path : |
514- artifacts/unity.log
515499 examples/audience/Builds/Android/*.apk
516500 examples/audience/Logs/**
0 commit comments