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: {}