Skip to content

Commit 4d9c6fb

Browse files
ci(audience): add Linux desktop to the PlayMode CI matrix (SDK-255)
- Adds LinuxStandalone64 to includePlatforms in src/Packages/Audience/Runtime/com.immutable.audience.asmdef and src/Packages/Audience/Runtime/Unity/com.immutable.audience.unity.asmdef so the SDK compiles when the build target is Linux. Without these, the sample app errors with CS0246 for every audience type. The Tests asmdef already included Linux. - Adds a playmode-linux job in .github/workflows/test-audience-sample-app.yml that runs the audience PlayMode tests on ubuntu-latest-8-cores via game-ci/unity-test-runner@v4. Covers IL2CPP and Mono2x backends for Unity 2021.3.45f2, 6000.4.0f1, and 2022.3.62f2, matching the Win/macOS coverage. - Linux runs via GameCI on GitHub-hosted Ubuntu rather than a self-hosted machine. Self-hosted Linux on residential bandwidth spent ~170s per job uploading the Library cache; GameCI completes the same work in ~138s and keeps self-hosted runners free for Win/macOS. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent d8e56f0 commit 4d9c6fb

3 files changed

Lines changed: 60 additions & 2 deletions

File tree

.github/workflows/test-audience-sample-app.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,64 @@ jobs:
405405
artifacts/Player-*.log
406406
examples/audience/Logs/**
407407
408+
playmode-linux:
409+
if: |
410+
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false)
411+
|| github.event_name == 'schedule'
412+
|| github.event_name == 'workflow_dispatch'
413+
name: ${{ matrix.target }} / ${{ matrix.backend }} / Unity ${{ matrix.unity }}
414+
runs-on: ubuntu-latest-8-cores
415+
strategy:
416+
fail-fast: false
417+
matrix:
418+
unity: ['2021.3.45f2', '6000.4.0f1', '2022.3.62f2']
419+
target: [StandaloneLinux64]
420+
backend: [IL2CPP, Mono2x]
421+
exclude: ${{ fromJSON(github.event_name == 'pull_request' && '[{"unity":"2022.3.62f2"}]' || '[]') }}
422+
423+
steps:
424+
- uses: actions/checkout@v4
425+
with:
426+
lfs: true
427+
428+
- uses: actions/cache@v4
429+
with:
430+
path: examples/audience/Library
431+
key: Library-${{ matrix.backend }}-${{ matrix.target }}-${{ matrix.unity }}-${{ hashFiles('examples/audience/Assets/**', 'examples/audience/Packages/**', 'examples/audience/ProjectSettings/**', 'src/Packages/Audience/**') }}
432+
restore-keys: |
433+
Library-${{ matrix.backend }}-${{ matrix.target }}-${{ matrix.unity }}-
434+
Library-${{ matrix.backend }}-${{ matrix.target }}-
435+
436+
- uses: game-ci/unity-test-runner@v4
437+
id: playmode
438+
env:
439+
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
440+
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
441+
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
442+
AUDIENCE_TEST_PUBLISHABLE_KEY: ${{ secrets.AUDIENCE_TEST_PUBLISHABLE_KEY }}
443+
AUDIENCE_SCRIPTING_BACKEND: ${{ matrix.backend }}
444+
with:
445+
unityVersion: ${{ matrix.unity }}
446+
targetPlatform: ${{ matrix.target }}
447+
projectPath: examples/audience
448+
testMode: playmode
449+
githubToken: ${{ secrets.GITHUB_TOKEN }}
450+
451+
- name: Publish test report
452+
uses: dorny/test-reporter@v3
453+
if: always()
454+
with:
455+
name: PlayMode (${{ matrix.backend }} / ${{ matrix.target }})
456+
path: ${{ steps.playmode.outputs.artifactsPath }}/playmode-results.xml
457+
reporter: dotnet-nunit
458+
fail-on-error: true
459+
460+
- uses: actions/upload-artifact@v4
461+
if: always()
462+
with:
463+
name: playmode-${{ matrix.backend }}-${{ matrix.target }}-${{ matrix.unity }}
464+
path: ${{ steps.playmode.outputs.artifactsPath }}
465+
408466
# Mobile IL2CPP build validation — runs on GitHub-hosted Ubuntu via GameCI Docker
409467
# containers so self-hosted macOS/Windows machines are not occupied.
410468
# Scope: IL2CPP compile pipeline only. Runtime tests require a real device and

src/Packages/Audience/Runtime/Unity/com.immutable.audience.unity.asmdef

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "Immutable.Audience.Unity",
33
"rootNamespace": "Immutable.Audience.Unity",
44
"references": ["Immutable.Audience.Runtime"],
5-
"includePlatforms": ["Android", "Editor", "iOS", "macOSStandalone", "WindowsStandalone64"],
5+
"includePlatforms": ["Android", "Editor", "iOS", "LinuxStandalone64", "macOSStandalone", "WindowsStandalone64"],
66
"excludePlatforms": [],
77
"allowUnsafeCode": false,
88
"overrideReferences": false,

src/Packages/Audience/Runtime/com.immutable.audience.asmdef

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "Immutable.Audience.Runtime",
33
"rootNamespace": "Immutable.Audience",
44
"references": [],
5-
"includePlatforms": ["Android", "Editor", "iOS", "macOSStandalone", "WindowsStandalone64"],
5+
"includePlatforms": ["Android", "Editor", "iOS", "LinuxStandalone64", "macOSStandalone", "WindowsStandalone64"],
66
"excludePlatforms": [],
77
"allowUnsafeCode": false,
88
"overrideReferences": false,

0 commit comments

Comments
 (0)