Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,10 @@ jobs:
if: ${{ !startsWith(matrix.unity-version, '2021') }}
run: ./test/Scripts.Integration.Test/add-dependency-conflict.ps1 -PackagePath "dependency-conflict-package"

- name: Disable DependencyConflict (WebGL 2021)
if: ${{ startsWith(matrix.unity-version, '2021') }}
run: ./test/Scripts.Integration.Test/add-dependency-conflict.ps1 -Disable

- name: Configure Sentry
run: ./test/Scripts.Integration.Test/configure-sentry.ps1 -UnityPath "$env:UNITY_PATH" -Platform "$env:BUILD_PLATFORM"
env:
Expand Down Expand Up @@ -351,7 +355,8 @@ jobs:
fail-fast: false
matrix:
unity-version: ${{ fromJSON(needs.create-unity-matrix.outputs.unity-matrix).unity-version }}
ios-version: ["17.0", "latest"]
# On PRs only the newest simulator runs; `17.0` is an OS-compat axis (not SDK behavior) and runs on main.
ios-version: ${{ github.event_name == 'pull_request' && fromJSON('["latest"]') || fromJSON('["17.0", "latest"]') }}
init-type: ["runtime", "buildtime"]
# Check https://support.apple.com/en-us/HT201222 for the latest minor version for a given major one.
# https://developer.apple.com/support/app-store/ shows that of all iOS devices
Expand Down Expand Up @@ -411,10 +416,6 @@ jobs:
fail-fast: false
matrix:
unity-version: ${{ fromJSON(needs.create-unity-matrix.outputs.unity-matrix).unity-version }}
# The progressive lightmapper requires a GPU, which the Apple silicon CI runners don't have.
# On Unity 2021 this fails the player build outright (instead of warning), so skip macOS 2021.3.
exclude:
- unity-version: "2021.3"
uses: ./.github/workflows/test-build-macos.yml
with:
unity-version: ${{ matrix.unity-version }}
Expand Down Expand Up @@ -461,10 +462,6 @@ jobs:
matrix:
unity-version: ${{ fromJSON(needs.create-unity-matrix.outputs.unity-matrix).unity-version }}
backend: ["cocoa", "native"]
# See test-build-macos: the progressive lightmapper needs a GPU the Apple silicon
# CI runners lack, which fails the Unity 2021 player build. Skip macOS 2021.3.
exclude:
- unity-version: "2021.3"
uses: ./.github/workflows/test-run-desktop.yml
with:
unity-version: ${{ matrix.unity-version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-unity-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:

env:
# Unity versions used in PRs
PR_UNITY_VERSIONS: '["2022.3", "6000.3", "6000.5"]'
PR_UNITY_VERSIONS: '["2021.3", "6000.5"]'
# Unity versions used on main branch
FULL_UNITY_VERSIONS: '["2021.3", "2022.3", "6000.0", "6000.3", "6000.5"]'

Expand Down
11 changes: 10 additions & 1 deletion test/Scripts.Integration.Test/Editor/Builder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,16 @@ public static void BuildWindowsIl2CPPPlayer()
public static void BuildMacIl2CPPPlayer()
{
Debug.Log("Builder: Building macOS IL2CPP Player");
BuildIl2CPPPlayer(BuildTarget.StandaloneOSX, BuildTargetGroup.Standalone, BuildOptions.StrictMode,
#if UNITY_2022_1_OR_NEWER
var buildOptions = BuildOptions.StrictMode;
#else
// On 2021.3 the Apple silicon CI has no usable lightmapper (CPU unsupported, no OpenCL GPU
// device), so BuildPlayer always logs "Falling back to CPU lightmapper" as an error.
// StrictMode would escalate that unavoidable log to a build failure even though the build
// succeeds. Real failures are still caught via summary.result.
var buildOptions = BuildOptions.None;
#endif
BuildIl2CPPPlayer(BuildTarget.StandaloneOSX, BuildTargetGroup.Standalone, buildOptions,
defaultBuildPath: "./Builds/macOS/test.app");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ private void Awake()
// the build red too instead of being swallowed into a log line.
private void ExerciseConflictingDependencies()
{
#if !(UNITY_WEBGL && !UNITY_2022_1_OR_NEWER)
#if !SENTRY_DISABLE_DEPENDENCY_CONFLICT
try
{
var greeting = DependencyConflictPackage.DependencyConflictPackageClient.SayHiAsync().GetAwaiter().GetResult();
Expand Down
14 changes: 13 additions & 1 deletion test/Scripts.Integration.Test/add-dependency-conflict.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ param(
# `dotnet build test/Scripts.Integration.Test/DependencyConflictPackage`. In CI the
# DLLs are built in build.yml and downloaded as an artifact, so the caller
# points this at the downloaded copy.
[string] $PackagePath
[string] $PackagePath,

# Skip installing the package and instead define SENTRY_DISABLE_DEPENDENCY_CONFLICT
# so IntegrationTester.cs compiles out its call into the package.
[switch] $Disable
)

if (-not $Global:NewProjectPathCache)
Expand All @@ -15,6 +19,14 @@ if (-not $Global:NewProjectPathCache)

. $PSScriptRoot/common.ps1

if ($Disable)
{
$cscRspPath = "$(GetNewProjectAssetsPath)/csc.rsp"
Write-Log "Defining SENTRY_DISABLE_DEPENDENCY_CONFLICT via '$cscRspPath'..."
Add-Content -Path $cscRspPath -Value "-define:SENTRY_DISABLE_DEPENDENCY_CONFLICT"
return
}

# The DependencyConflict package ships plain, UNALIASED System.*/Microsoft.*
# assemblies at versions that differ from the ones the Sentry SDK ships aliased.
# Dropping it into the test project as an embedded package - alongside Sentry -
Expand Down
18 changes: 13 additions & 5 deletions test/Scripts.Integration.Test/integration-test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,21 @@ If (-not(Test-Path -Path "$(GetNewProjectPath)")) {
Write-PhaseSuccess "Sentry added"

Write-PhaseHeader "Adding DependencyConflict (alias stress-test)"
dotnet build test/Scripts.Integration.Test/DependencyConflictPackage
if ($LASTEXITCODE -ne 0)
if ($Platform -eq "WebGL" -and $UnityVersion.StartsWith("2021"))
{
Write-Error "Failed to build the DependencyConflict package."
./test/Scripts.Integration.Test/add-dependency-conflict.ps1 -Disable
Write-PhaseSuccess "DependencyConflict disabled (WebGL 2021)"
}
else
{
dotnet build test/Scripts.Integration.Test/DependencyConflictPackage
if ($LASTEXITCODE -ne 0)
{
Write-Error "Failed to build the DependencyConflict package."
}
./test/Scripts.Integration.Test/add-dependency-conflict.ps1
Write-PhaseSuccess "DependencyConflict added"
}
./test/Scripts.Integration.Test/add-dependency-conflict.ps1
Write-PhaseSuccess "DependencyConflict added"

Write-PhaseHeader "Configuring Sentry"
./test/Scripts.Integration.Test/configure-sentry.ps1 "$UnityPath" -Platform $Platform
Expand Down
Loading