CI: build the unified sample on the net8 and net10 extremes as a matrix - #4
Merged
Conversation
The sample built as a step inside the validate job, at the single net9 pair, in one invocation - so the net8 and net10 asset sets the packages ship went unbuilt on both platforms, and the whole point of the cross-platform layer (one MAUI sample driving Android and iOS) was only ever proven on net9. Extracted into a dedicated build-samples matrix: four legs - android and iOS, each on the net8 and net10 extreme - Release, fail-fast off. Android legs run on a Linux runner (the sample drops its iOS head there via an IsOSPlatform condition, the Net.Agora trick), iOS legs on macOS with Xcode. Each leg pins its SDK band through a scratch global.json and installs only the workloads that band's restore needs. validate loses the sample step and the MAUI/Android workloads it alone required, leaving plain net9 unit and package tests. The sample selects one framework per platform per band via SampleSdkBand (net9 default, so local `dotnet build` still works). CommunityToolkit.Maui, its MediaElement, the Microsoft.Maui.Controls version each toolkit release pins (8.0.71 / 9.0.30 / 10.0.60, to dodge NU1605) and a matching Logging.Debug are all selected per band, since none spans net8 and net10. Verified: the net9 band restores both heads and builds clean; the net8/net10 package sets are confirmed on nuget.org and build in the matrix. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The net8 legs failed restore with NU1605: the sample pinned Microsoft.Maui.Controls at the toolkit's 8.0.71 floor, but FFmpegKit.Net.*.Maui itself declares 8.0.100, so the sample was pinned under the package it consumes. Pin the highest floor in the graph instead. The net10 legs failed to compile with CS7036: MediaElement 10.0.0 made isAndroidForegroundServiceEnabled a required argument of UseMauiCommunityToolkitMediaElement. Pass false - this sample previews a local file in the foreground, and opting in would also require FOREGROUND_SERVICE_MEDIA_PLAYBACK in the manifest. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The sample built as a step inside the validate job, at the single net9 pair, in one invocation - so the net8 and net10 asset sets the packages ship went unbuilt on both platforms, and the whole point of the cross-platform layer (one MAUI sample driving Android and iOS) was only ever proven on net9.
Extracted into a dedicated build-samples matrix: four legs - android and iOS, each on the net8 and net10 extreme - Release, fail-fast off. Android legs run on a Linux runner (the sample drops its iOS head there via an IsOSPlatform condition, the Net.Agora trick), iOS legs on macOS with Xcode. Each leg pins its SDK band through a scratch global.json and installs only the workloads that band's restore needs. validate loses the sample step and the MAUI/Android workloads it alone required, leaving plain net9 unit and package tests.
The sample selects one framework per platform per band via SampleSdkBand (net9 default, so local
dotnet buildstill works). CommunityToolkit.Maui, its MediaElement, the Microsoft.Maui.Controls version each toolkit release pins (8.0.71 / 9.0.30 / 10.0.60, to dodge NU1605) and a matching Logging.Debug are all selected per band, since none spans net8 and net10. Verified: the net9 band restores both heads and builds clean; the net8/net10 package sets are confirmed on nuget.org and build in the matrix.