ci(audience-sdk): add IL2CPP and Mono PlayMode test workflow (SDK-148) #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Audience SDK — PlayMode (IL2CPP + Mono) | |
| on: | |
| pull_request: | |
| paths: | |
| - 'src/Packages/Audience/**' | |
| - 'examples/audience/**' | |
| - '.github/workflows/test-audience-il2cpp.yml' | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| playmode: | |
| if: github.event.pull_request.head.repo.fork == false | |
| name: ${{ matrix.target }} / ${{ matrix.backend }} / Unity ${{ matrix.unity }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # Windows players must run on a Windows host — game-ci can | |
| # cross-build the player on Linux but PlayMode tests need to launch | |
| # the player, which requires the host OS to match the target. | |
| - target: StandaloneWindows64 | |
| backend: IL2CPP | |
| unity: 2021.3.45f2 | |
| os: windows-latest | |
| - target: StandaloneWindows64 | |
| backend: Mono2x | |
| unity: 2021.3.45f2 | |
| os: windows-latest | |
| - target: StandaloneOSX | |
| backend: IL2CPP | |
| unity: 2021.3.45f2 | |
| os: macos-latest | |
| - target: StandaloneOSX | |
| backend: Mono2x | |
| unity: 2021.3.45f2 | |
| os: macos-latest | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| lfs: true | |
| - run: git lfs pull | |
| - uses: actions/cache@v3 | |
| with: | |
| path: examples/audience/Library | |
| key: Library-${{ matrix.backend }}-${{ matrix.target }}-${{ matrix.unity }}-${{ hashFiles('examples/audience/Assets/**', 'examples/audience/Packages/**', 'examples/audience/ProjectSettings/**', 'src/Packages/Audience/**') }} | |
| restore-keys: | | |
| Library-${{ matrix.backend }}-${{ matrix.target }}-${{ matrix.unity }} | |
| Library-${{ matrix.backend }}-${{ matrix.target }} | |
| - uses: game-ci/unity-test-runner@v4 | |
| id: tests | |
| env: | |
| UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} | |
| UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} | |
| UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} | |
| AUDIENCE_TEST_PUBLISHABLE_KEY: ${{ secrets.AUDIENCE_TEST_PUBLISHABLE_KEY }} | |
| AUDIENCE_SCRIPTING_BACKEND: ${{ matrix.backend }} | |
| with: | |
| unityVersion: ${{ matrix.unity }} | |
| projectPath: 'examples/audience' | |
| testMode: 'PlayMode' | |
| targetPlatform: ${{ matrix.target }} | |
| githubToken: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: playmode-${{ matrix.backend }}-${{ matrix.target }}-${{ matrix.unity }} | |
| path: ${{ steps.tests.outputs.artifactsPath }} |