From 2d0b6ebf54890e6068dadca4dc0dff1c761e4540 Mon Sep 17 00:00:00 2001 From: Tim Date: Sun, 16 Apr 2023 02:18:05 -0400 Subject: [PATCH] Revert IL2CPP setting in test project. Add test for IL2CPP. --- .github/workflows/main.yml | 54 +++++++++++++++++++ .../ProjectSettings/ProjectSettings.asset | 3 +- 2 files changed, 55 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b9fe387..4ddebf8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -282,6 +282,60 @@ jobs: path: ${{ steps.standalone.outputs.artifactsPath }} retention-days: 14 + testRunnerInStandaloneWithIL2CPP: + name: Test standalone with IL2CPP ๐Ÿ“บ + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + projectPath: + - unity-project-with-correct-tests + unityVersion: + - 2019.4.40f1 # Only 2019.4+ docker images contain the IL2CPP backend installed. + steps: + ########################### + # Checkout # + ########################### + - uses: actions/checkout@v3 + with: + lfs: true + + ########################### + # Cache # + ########################### + - uses: actions/cache@v3 + with: + path: ${{ matrix.projectPath }}/Library + key: Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }} + restore-keys: | + Library-${{ matrix.projectPath }}- + Library- + + # Set scripting backend to IL2CPP + - name: Rewrite ProjectSettings + run: | + DefineOriginal=" scriptingBackend: {}" + DefineReplace=" scriptingBackend: \\n Standalone: 1" + sed -i "{s/$DefineOriginal/$DefineReplace/g}" ${{ matrix.projectPath }}/ProjectSettings/ProjectSettings.asset + + # Configure test runner + - name: Run tests + id: standalone + uses: ./ + with: + projectPath: ${{ matrix.projectPath }} + unityVersion: ${{ matrix.unityVersion }} + testMode: standalone + artifactsPath: artifacts/standalone + + # Upload artifacts + - name: Upload test results + uses: actions/upload-artifact@v3 + with: + name: Test results (play mode) + path: ${{ steps.standalone.outputs.artifactsPath }} + retention-days: 14 + testEachModeSequentially: name: Test each mode sequentially ๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ # don't try this at home (it's much slower) runs-on: ubuntu-latest diff --git a/unity-project-with-correct-tests/ProjectSettings/ProjectSettings.asset b/unity-project-with-correct-tests/ProjectSettings/ProjectSettings.asset index 738a9c6..f520a82 100644 --- a/unity-project-with-correct-tests/ProjectSettings/ProjectSettings.asset +++ b/unity-project-with-correct-tests/ProjectSettings/ProjectSettings.asset @@ -551,8 +551,7 @@ PlayerSettings: webGLWasmStreaming: 0 scriptingDefineSymbols: {} platformArchitecture: {} - scriptingBackend: - Standalone: 1 + scriptingBackend: {} il2cppCompilerConfiguration: {} managedStrippingLevel: {} incrementalIl2cppBuild: {}