From 1df212bc5fbab9c403cef8a2128bdb1057dab16b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20P=C3=B6lz?= <38893694+Flash0ver@users.noreply.github.com> Date: Mon, 23 Feb 2026 16:43:58 +0100 Subject: [PATCH 01/12] ci: Use Cirrus Runners for iOS integration tests Switch the iOS device tests workflow from GitHub-hosted macOS runners to Cirrus Labs runners. GitHub-hosted runners keep removing older Xcode versions, which breaks CI. Cirrus Labs runners provide stable, pinned Xcode environments. Two separate matrix entries run on dedicated Cirrus images: - net10.0 on ghcr.io/cirruslabs/macos-tahoe-xcode:26.2.0 (Xcode 26.2) - net9.0 on ghcr.io/cirruslabs/macos-tahoe-xcode:26.0.1 (Xcode 26.0) Re-enable net9.0-ios targets in both csproj files (disabled in #4750 pending this fix) and make ios.Tests.ps1 parameterizable via -dotnet_version, consistent with android.Tests.ps1. Fixes GH-4895 Co-Authored-By: Claude --- .github/workflows/device-tests-ios.yml | 34 +++++++++++++------ integration-test/ios.Tests.ps1 | 16 ++++++--- ...ntry.Maui.Device.IntegrationTestApp.csproj | 2 +- .../Sentry.Maui.Device.TestApp.csproj | 9 ++--- 4 files changed, 38 insertions(+), 23 deletions(-) diff --git a/.github/workflows/device-tests-ios.yml b/.github/workflows/device-tests-ios.yml index c4f191a8a6..5825adfbeb 100644 --- a/.github/workflows/device-tests-ios.yml +++ b/.github/workflows/device-tests-ios.yml @@ -52,7 +52,16 @@ on: jobs: ios-tests: - runs-on: macos-15 + name: iOS Tests (${{ matrix.tfm }}) + strategy: + fail-fast: false + matrix: + include: + - tfm: net10.0 + runs-on: ["ghcr.io/cirruslabs/macos-tahoe-xcode:26.2.0", "runner_group_id:12"] + - tfm: net9.0 + runs-on: ["ghcr.io/cirruslabs/macos-tahoe-xcode:26.0.1", "runner_group_id:12"] + runs-on: ${{ matrix.runs-on }} env: DOTNET_CLI_TELEMETRY_OPTOUT: 1 DOTNET_NOLOGO: 1 @@ -72,39 +81,42 @@ jobs: uses: ./.github/actions/environment - name: Build iOS Test App - run: pwsh ./scripts/device-test.ps1 ios -Build + run: pwsh ./scripts/device-test.ps1 ios -Build -Tfm ${{ matrix.tfm }} - name: Run Tests id: first-test-run continue-on-error: true timeout-minutes: 40 - run: pwsh scripts/device-test.ps1 ios -Run + run: pwsh scripts/device-test.ps1 ios -Run -Tfm ${{ matrix.tfm }} - name: Retry Tests (if previous failed to run) if: steps.first-test-run.outcome == 'failure' timeout-minutes: 40 - run: pwsh scripts/device-test.ps1 ios -Run + run: pwsh scripts/device-test.ps1 ios -Run -Tfm ${{ matrix.tfm }} + + - name: Checkout github-workflows + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + repository: getsentry/github-workflows + ref: 747c4c2906d373f5cd809abe94a7fd732a2421a7 # 3.2.1 + path: modules/github-workflows - name: Run Integration Tests id: first-integration-test-run continue-on-error: true timeout-minutes: 40 - uses: getsentry/github-workflows/sentry-cli/integration-test@747c4c2906d373f5cd809abe94a7fd732a2421a7 # 3.2.1 - with: - path: integration-test/ios.Tests.ps1 + run: pwsh integration-test/ios.Tests.ps1 -dotnet_version ${{ matrix.tfm }} - name: Retry Integration Tests (if previous failed to run) if: steps.first-integration-test-run.outcome == 'failure' timeout-minutes: 40 - uses: getsentry/github-workflows/sentry-cli/integration-test@747c4c2906d373f5cd809abe94a7fd732a2421a7 # 3.2.1 - with: - path: integration-test/ios.Tests.ps1 + run: pwsh integration-test/ios.Tests.ps1 -dotnet_version ${{ matrix.tfm }} - name: Upload results if: success() || failure() uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 with: - name: device-test-ios-results + name: device-test-ios-results-${{ matrix.tfm }} path: | test_output integration-test/mobile-app/test_output diff --git a/integration-test/ios.Tests.ps1 b/integration-test/ios.Tests.ps1 index 3c38696f69..846d101059 100644 --- a/integration-test/ios.Tests.ps1 +++ b/integration-test/ios.Tests.ps1 @@ -1,3 +1,7 @@ +param( + [string] $dotnet_version = "net10.0" +) + # This file contains test cases for https://pester.dev/ Set-StrictMode -Version Latest $ErrorActionPreference = 'Stop' @@ -11,12 +15,14 @@ BeforeDiscovery { $script:simulator = Get-IosSimulatorUdid -PreferredStates @('Booted') } +$ios_tpv = switch ($dotnet_version) { + 'net9.0' { '26.0' } + default { '26.2' } +} + Describe 'iOS app (, )' -ForEach @( - # Note: we can't run against net10 and net9 becaus .NET 10 requires Xcode 26.2 and .NET 9 requires Xcode 26.0. - # The macOS GitHub Actions runners only have Xcode 26.1+ installed and no support for Xcode 26.2 is planned for - # net9.0-ios: https://github.com/dotnet/macios/issues/24199#issuecomment-3819021247 - @{ tfm = "net10.0-ios26.2"; configuration = "Release" } - @{ tfm = "net10.0-ios26.2"; configuration = "Debug" } + @{ tfm = "$dotnet_version-ios$ios_tpv"; configuration = "Release" } + @{ tfm = "$dotnet_version-ios$ios_tpv"; configuration = "Debug" } ) -Skip:(-not $script:simulator) { BeforeAll { . $PSScriptRoot/../scripts/device-test-utils.ps1 diff --git a/integration-test/net9-maui/Sentry.Maui.Device.IntegrationTestApp.csproj b/integration-test/net9-maui/Sentry.Maui.Device.IntegrationTestApp.csproj index b609446eba..ee5f847389 100644 --- a/integration-test/net9-maui/Sentry.Maui.Device.IntegrationTestApp.csproj +++ b/integration-test/net9-maui/Sentry.Maui.Device.IntegrationTestApp.csproj @@ -5,7 +5,7 @@ - $(TargetFrameworks);net10.0-ios26.2 + $(TargetFrameworks);net9.0-ios26.0;net10.0-ios26.2 Exe Sentry.Maui.Device.IntegrationTestApp diff --git a/test/Sentry.Maui.Device.TestApp/Sentry.Maui.Device.TestApp.csproj b/test/Sentry.Maui.Device.TestApp/Sentry.Maui.Device.TestApp.csproj index 602e09d06b..5af7733703 100644 --- a/test/Sentry.Maui.Device.TestApp/Sentry.Maui.Device.TestApp.csproj +++ b/test/Sentry.Maui.Device.TestApp/Sentry.Maui.Device.TestApp.csproj @@ -2,11 +2,7 @@ $(TargetFrameworks);net9.0-android;net10.0-android - - $(TargetFrameworks);net10.0-ios + $(TargetFrameworks);net9.0-ios;net10.0-ios $(DefineConstants);VISUAL_RUNNER @@ -38,7 +34,8 @@ 21.0 - 26.2 + 26.2 + 26.0 true