Skip to content

ci: stop installing and logging what the jobs don't use - #5807

Draft
ric-oliv wants to merge 3 commits into
mainfrom
ci/stop-installing-what-jobs-dont-use
Draft

ric-oliv wants to merge 3 commits into
mainfrom
ci/stop-installing-what-jobs-dont-use

Conversation

@ric-oliv

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

Copy link
Copy Markdown
Member

Part 1 of 6 for #5806. Every job installed or wrote things nothing uses. This PR stops that, one commit per change.

Stop installing Mono. Every Linux and macOS job installed Mono, but nothing runs it. The only test that did, Ensure System.Reflection.Metadata is not missing, has been Windows-only since #4461. On Ubuntu the install downloads 53 MB from a package mirror, and on October 23 that took 15 to 21 minutes in 4 linux-x64 legs and an Android job. In #5794, Android Device Tests took 27.4 minutes against a median of 45.8 over the 10 runs before.

Stop writing detailed text build logs. The Build step wrote a text log next to the binlog, 1.9 GB on macOS, and uploaded both. Nothing reads it, and the binlog has the same content: a text log regenerated from a macOS binlog has the same 216 warning lines. If someone wants the text, dotnet msbuild build.binlog -flp:logfile=build.log writes it again in a few seconds. In #5792, Upload build logs went from 10 to 16 seconds per leg to 2 or 3, and the log artifacts from 54 to 119 MB to 13 to 33 MB.

Install only the workloads each job needs. Setup Environment ran dotnet workload restore without a project, so every job installed the workloads for all of Sentry.slnx.

  • The environment action now requires projects, the solution filters or project files the job builds, and restores only their workloads. Jobs that build everything pass Sentry.slnx.
  • dotnet workload restore doesn't take a solution filter, so the action passes the projects in it. A job that passes nothing, or a filter with no projects, fails with an error that says what to pass.
  • The Android test app is restored only for jobs that build the tests that build it, and the legs without mobile targets skip Java and the Android SDK.
  • CodeQL, format-code and verify-api no longer run a second, unfiltered workload restore after the action.

In #5784 and the throwaway #5804, the Linux legs without mobile targets stopped installing workloads at all. Setup Environment went from about 190 to 89 seconds in the trim job, and from 170 to 180 seconds to 71 to 78 in the Android device test build.

On this PR's own CI

2 runs, against main at b41b96c. Setup Environment went from 3.2 to 1.3 and 1.6 minutes on linux-arm64, from 3.3 to 1.9 and 2.3 on linux-x64, from 6.5 to 3.0 and 4.0 on win-x64, and from 3.1 to 1.9 in the trim job. The Android net10.0 build's setup went from 3.1 to 1.4 and 1.2. On main the net9.0 build's setup took 12.7, but that was a slow download of the Android command-line tools, which this PR doesn't touch. The whole stack's numbers are in #5806.

#skip-changelog

@codecov

codecov Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.12%. Comparing base (b41b96c) to head (b13062d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5807      +/-   ##
==========================================
- Coverage   76.13%   76.12%   -0.02%     
==========================================
  Files         528      528              
  Lines       19579    19579              
  Branches     3829     3829              
==========================================
- Hits        14906    14904       -2     
- Misses       3791     3792       +1     
- Partials      882      883       +1     

☔ 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.

ric-oliv and others added 3 commits October 25, 2026 17:22
Every Linux and macOS job installed Mono, but nothing runs it. #4545
added it for the net4-console integration test, which ran the .NET
Framework app through Mono there. Two weeks later #4461 made that test
Windows-only, and the logs show it skipped on Linux and macOS. The .NET
Framework unit tests only build on Windows too.

On Ubuntu the install downloads 53 MB from the package mirror. On
October 23 that download took 15 to 21 minutes in 4 linux-x64 legs and
1 Android device test job. The chmod after it only repaired the
/usr/share/dotnet permissions that installing Mono had changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Build step wrote a detailed text log next to the binlog, 1.9 GB on
macOS, and uploaded both. The binlog holds the same events and warnings,
and nothing reads the text log. The MSBuild job and the integration test
builds wrote one too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Setup Environment ran dotnet workload restore without a project, so it
evaluated every project in Sentry.slnx in every job. The Linux legs
without mobile targets installed android, maui-android, maui-tizen,
macos, wasm-tools and wasm-tools-net9, and Windows installed ios,
maccatalyst and macos.

The environment action now requires the solution filters or project
files the job builds, and restores only their workloads. dotnet workload
restore doesn't accept a solution filter, so the step passes the
projects in it, and names the filter if it finds none. Jobs that build
everything pass Sentry.slnx. The Android test app is restored only when
the job builds the tests that build it, and the legs without mobile
targets skip Java and the Android SDK. CodeQL, format-code and
verify-api no longer run a second, unfiltered workload restore after the
action. Jobs that build a MAUI project still get maui-tizen, because
dotnet workload restore adds it for every MAUI project.

Measured on top of the other CI changes, Setup Environment went from
about 190 to 89 seconds in the trim job and from 170-180 to 71-78 in
the Android device test build.

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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant