Skip to content

ci: build the app samples in their own job - #5783

Closed
ric-oliv wants to merge 3 commits into
mainfrom
ci/build-app-samples-in-parallel
Closed

ric-oliv wants to merge 3 commits into
mainfrom
ci/build-app-samples-in-parallel

Conversation

@ric-oliv

@ric-oliv ric-oliv commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

The app samples are compile checks. Nothing in CI consumes their output, and they reference the SDK projects directly. But CI builds them in Release, so each one is trimmed, AOT-compiled and packaged. In a macOS build with the Cocoa SDK from the cache, version7 run 39648348730, they're about 13.7 of the 28.3 task-minutes in the Build step and its last 8 minutes, with two of the three MSBuild nodes mostly idle. On Windows, the MAUI sample's Android build is the last thing in the Build step.

This PR moves them into a Samples job that runs next to the .NET legs instead of inside them:

  • Samples (macos) builds the Android, iOS, Mac Catalyst, macOS and MAUI samples from the new Sentry-CI-Build-Samples-macOS.slnf, with the Cocoa SDK cache from ci: cache the Cocoa SDK build #5781.
  • Samples (win-x64) builds the MAUI sample, because it's the only build of its Windows target.
  • Samples (linux-x64) builds the Android and MAUI samples from the new Sentry-CI-Build-Samples-Linux.slnf, so their Android targets still build on a Linux host, as they did in the linux-x64 leg.
  • The legs' solution filters drop those projects, regenerated from generate-solution-filters-config.yaml. The console and ASP.NET samples stay in the legs, because they cost seconds and build on every OS.
  • AGENTS.md says which filters build the app samples now.
  • The samples job uses the Cocoa SDK cache the way the macOS leg does, so release branches build the SDK from source and a cache miss gets saved.

The samples still build in Release, and a failure still fails the workflow. The only change in coverage is that win-arm64 no longer builds the MAUI sample. The win-x64 entry builds the same targets.

The first version of this PR also stopped building the Android and MAUI samples on Linux, which an independent review caught. The linux-x64 entry brings that back, and I'll add its first run's numbers here.

Measured on two runs of this PR, against the median of 7 main runs from October 22 and 23:

main Run 1, no Cocoa cache Run 2, Cocoa cache hit
macOS Build step 23.7 min 16.2 6.6
win-x64 Build 9.5 4.5 5.8
win-arm64 Build 8.8 5.6 4.5
linux-x64 Build 7.9 3.9 5.0
Samples (macos) job 18.0 17.5
Samples (win-x64) job 13.2 11.1
Build workflow 50.4 47.2 42.5
  • Both times, the samples jobs finished well before the slowest leg, so they stay off the critical path.
  • Run 1 couldn't restore ci: cache the Cocoa SDK build #5781's cache, because a stacked PR can't read its base PR's cache entries. It built the Cocoa SDK itself and saved it, and run 2 restored it.
  • Run 2 is the first run with both the Cocoa cache and the samples job. Its slowest legs were win-x64 at 39.9 minutes and macOS at 35.4, both with slower integration tests than usual.

The MSBuild job builds the MAUI sample again

With the app samples out of the platform solution filters, msbuild.exe stopped building any Android or Windows app. So the MSBuild job now builds the MAUI sample right after the solution filter. On three runs on top of the other CI changes, that step took 180 to 211 seconds, and the job still ended about 10 minutes before the slowest check.

#skip-changelog

@codecov

codecov Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.13%. Comparing base (ff0355e) to head (0c65576).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5783   +/-   ##
=======================================
  Coverage   76.13%   76.13%           
=======================================
  Files         528      528           
  Lines       19579    19579           
  Branches     3829     3829           
=======================================
  Hits        14906    14906           
  Misses       3791     3791           
  Partials      882      882           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Base automatically changed from ci/cache-cocoa-sdk-build to main October 23, 2026 13:54
The app samples only check that they compile, but their Release builds trim,
AOT-compile and package each app. In the macOS leg that's about 13.7 of the
Build step's 28.3 task-minutes, and it's the whole tail of the step once the
Cocoa SDK comes from the cache. On Windows, the MAUI sample's Android build
is the last thing the Build step finishes.

The Android, iOS, Mac Catalyst, macOS and MAUI samples now build in a
separate job that starts with the .NET legs. It builds all of them on macOS,
and the MAUI sample on Windows, which is the only build of its Windows
target. The legs' solution filters no longer include them, and
Sentry-CI-Build-Samples-macOS.slnf lists them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ric-oliv
ric-oliv force-pushed the ci/build-app-samples-in-parallel branch from ce3f0f3 to 15d6751 Compare October 23, 2026 13:57
@ric-oliv
ric-oliv marked this pull request as ready for review October 23, 2026 17:57
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Oct 23, 2026
The linux-x64 leg built the Android targets of the Android and MAUI
samples on a Linux host. Moving the app samples out of the legs dropped
that, so the samples job gets a linux-x64 entry with a generated filter
for those two samples.

The samples job's Cocoa SDK steps now match the macOS leg's: release
branches build it from source, and a cache miss gets saved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The platform solution filters no longer include the app samples, so msbuild.exe stopped building any Android or Windows app. The MSBuild job now builds the MAUI sample after the solution filter. It took 180 to 211 seconds on three runs, and the job still ended about 10 minutes before the slowest check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ric-oliv

Copy link
Copy Markdown
Member Author

I'm continuing this in #5809, part 3 of 6 in #5806, so the CI changes can be reviewed in a few steps instead of 13 PRs. The measurements here stay as the record.

@ric-oliv ric-oliv closed this Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant