From e8730ffbb3d23a3527e14a401cca0fce688de8fe Mon Sep 17 00:00:00 2001 From: Ricardo Colombo Oliveira Date: Wed, 21 Oct 2026 18:35:58 +0200 Subject: [PATCH 1/2] ci: stop building the device test app in the macOS build job The macOS leg of build.yml built Sentry.Maui.Device.TestApp for net9.0-android, net10.0-android and net10.0-ios, and nothing in build.yml runs it. In the run for #5752 on version7 that was the last 6 minutes of the 24.7-minute Build step, on the critical path. The Linux and Windows filters already exclude the app, and both device test workflows build it themselves. The macOS leg of verify-api builds the same filter, so it no longer builds the app either. The device test path filters now also cover what the app compiles and they didn't list: Sentry.Analyzers, Sentry.Testing.CrashableApp, the nested Directory.Build files and .editorconfig, which can fail the build because warnings are errors. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/device-tests-android.yml | 5 +++++ .github/workflows/device-tests-ios.yml | 5 +++++ Sentry-CI-Build-macOS.slnf | 1 - scripts/generate-solution-filters-config.yaml | 1 + 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/device-tests-android.yml b/.github/workflows/device-tests-android.yml index f8b3bd1fc6..d59fa75a9f 100644 --- a/.github/workflows/device-tests-android.yml +++ b/.github/workflows/device-tests-android.yml @@ -11,6 +11,7 @@ on: - 'src/Sentry/**' - 'src/Sentry.Extensions.Logging/**' - 'src/Sentry.Compiler.Extensions/**' + - 'src/Sentry.Analyzers/**' # Mobile-specific packages - 'src/Sentry.Maui/**' - 'src/Sentry.Maui.CommunityToolkit.Mvvm/**' @@ -25,6 +26,7 @@ on: - 'test/Sentry.Maui.CommunityToolkit.Mvvm.Tests/**' - 'test/Sentry.Android.AssemblyReader.Tests/**' - 'test/Sentry.Testing/**' + - 'test/Sentry.Testing.CrashableApp/**' - 'test/AndroidTestApp/**' # Integration tests - 'integration-test/android.Tests.ps1' @@ -41,6 +43,9 @@ on: - 'global.json' - 'Directory.Build.props' - 'Directory.Build.targets' + - 'src/Directory.Build.*' + - 'test/Directory.Build.*' + - '.editorconfig' - 'nuget.config' # Scripts and CI - 'scripts/device-test.ps1' diff --git a/.github/workflows/device-tests-ios.yml b/.github/workflows/device-tests-ios.yml index d477710cb8..bbc751bcbe 100644 --- a/.github/workflows/device-tests-ios.yml +++ b/.github/workflows/device-tests-ios.yml @@ -11,6 +11,7 @@ on: - 'src/Sentry/**' - 'src/Sentry.Extensions.Logging/**' - 'src/Sentry.Compiler.Extensions/**' + - 'src/Sentry.Analyzers/**' # Mobile-specific packages - 'src/Sentry.Maui/**' - 'src/Sentry.Maui.CommunityToolkit.Mvvm/**' @@ -25,6 +26,7 @@ on: - 'test/Sentry.Maui.CommunityToolkit.Mvvm.Tests/**' - 'test/Sentry.Android.AssemblyReader.Tests/**' - 'test/Sentry.Testing/**' + - 'test/Sentry.Testing.CrashableApp/**' - 'test/AndroidTestApp/**' # Integration tests - 'integration-test/android.Tests.ps1' @@ -41,6 +43,9 @@ on: - 'global.json' - 'Directory.Build.props' - 'Directory.Build.targets' + - 'src/Directory.Build.*' + - 'test/Directory.Build.*' + - '.editorconfig' - 'nuget.config' # Scripts and CI - 'scripts/device-test.ps1' diff --git a/Sentry-CI-Build-macOS.slnf b/Sentry-CI-Build-macOS.slnf index 6827a106ce..ce671ebede 100644 --- a/Sentry-CI-Build-macOS.slnf +++ b/Sentry-CI-Build-macOS.slnf @@ -83,7 +83,6 @@ "test\\Sentry.Log4Net.Tests\\Sentry.Log4Net.Tests.csproj", "test\\Sentry.Log4Net.V3.Tests\\Sentry.Log4Net.V3.Tests.csproj", "test\\Sentry.Maui.CommunityToolkit.Mvvm.Tests\\Sentry.Maui.CommunityToolkit.Mvvm.Tests.csproj", - "test\\Sentry.Maui.Device.TestApp\\Sentry.Maui.Device.TestApp.csproj", "test\\Sentry.Maui.Tests\\Sentry.Maui.Tests.csproj", "test\\Sentry.NLog.Tests\\Sentry.NLog.Tests.csproj", "test\\Sentry.OpenTelemetry.Exporter.Tests\\Sentry.OpenTelemetry.Exporter.Tests.csproj", diff --git a/scripts/generate-solution-filters-config.yaml b/scripts/generate-solution-filters-config.yaml index a1a52653b4..ea4233d3dc 100644 --- a/scripts/generate-solution-filters-config.yaml +++ b/scripts/generate-solution-filters-config.yaml @@ -91,6 +91,7 @@ filterConfigs: patterns: - "**/*AndroidTestApp.csproj" - "**/*DeviceTests*.csproj" + - "**/*Sentry.Maui.Device.TestApp.csproj" - "**/*.AspNet.Tests.csproj" - outputPath: Sentry-CI-Build-Windows.slnf From aa12ec7f3fc4d12123b81af0f19fdc01cc8af90d Mon Sep 17 00:00:00 2001 From: Ricardo Colombo Oliveira Date: Wed, 21 Oct 2026 18:36:17 +0200 Subject: [PATCH 2/2] ci: serialize only the jobs that push in verify-api and format-code Both workflows put the whole run in the pr-auto-commit concurrency group, so each waited for the other to finish. On one PR, format-code started 35 minutes after its run was created, and on another verify-api waited 13 minutes. The group exists to keep their git pushes apart, so it now covers only accept-api-changes and the format-code job, and the API test matrix starts right away. Both still push from the head they checked out and fail as non-fast-forward if the branch moved in the meantime. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/format-code.yml | 11 +++++------ .github/workflows/verify-api.yml | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/format-code.yml b/.github/workflows/format-code.yml index f2cd3089db..7113382488 100644 --- a/.github/workflows/format-code.yml +++ b/.github/workflows/format-code.yml @@ -7,15 +7,14 @@ on: - 'samples/**' - '.github/workflows/format-code.yml' -# Serialize with verify-api.yml so the two auto-commit workflows can't race -# each other's git push on the same PR branch. -concurrency: - group: pr-auto-commit-${{ github.event.pull_request.number }} - cancel-in-progress: false - jobs: format-code: name: Format Code + # Serialize with the commit job in verify-api.yml so the two auto-commit jobs can't race each + # other's git push on the same PR branch. + concurrency: + group: pr-auto-commit-${{ github.event.pull_request.number }} + cancel-in-progress: false # Run on 'macos' because Linux is missing the `ios` workload: https://github.com/dotnet/runtime/issues/85505 # Pin macos to get the version of XCode that we need: https://github.com/actions/runner-images/issues/10703 runs-on: xcode-27 diff --git a/.github/workflows/verify-api.yml b/.github/workflows/verify-api.yml index fbd9eaba61..5e4ccf5115 100644 --- a/.github/workflows/verify-api.yml +++ b/.github/workflows/verify-api.yml @@ -7,12 +7,6 @@ on: - 'test/Sentry.Testing/ApiExtensions.cs' - '.github/workflows/verify-api.yml' -# Serialize with format-code.yml so the two auto-commit workflows can't race -# each other's git push on the same PR branch. -concurrency: - group: pr-auto-commit-${{ github.event.pull_request.number }} - cancel-in-progress: false - jobs: run-api-tests: name: Run API Approval Tests (${{ matrix.rid }}) @@ -120,6 +114,11 @@ jobs: needs: run-api-tests runs-on: ubuntu-24.04 if: github.event.pull_request.head.repo.full_name == github.repository + # Serialize with format-code.yml so the two auto-commit jobs can't race each other's git push + # on the same PR branch. Only the pushing job is in the group, so the API tests don't wait. + concurrency: + group: pr-auto-commit-${{ github.event.pull_request.number }} + cancel-in-progress: false permissions: contents: write pull-requests: write