Skip to content

Update Maui Workload Install Process for Perf #64692

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Feb 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
c8bcfa8
Disable all unneeded jobs for testing. Add dotnet install and run to …
LoopedBard3 Jan 31, 2022
c8b1e9f
Try to skip building the product.
LoopedBard3 Jan 31, 2022
761f6fd
Remove steps for error in maui yml.
LoopedBard3 Jan 31, 2022
1e02db6
Try another setup that gives install permission.
LoopedBard3 Jan 31, 2022
f8dfd7a
See if file actually downloaded.
LoopedBard3 Jan 31, 2022
c7ed524
Add dotnet azure task to see if results are different.
LoopedBard3 Feb 1, 2022
059c2d8
Update version and install location.
LoopedBard3 Feb 1, 2022
0b9fd1e
Install script now seems to be working. Make it not error due to user…
LoopedBard3 Feb 1, 2022
2ee2c00
Download and use local dotnet version.
LoopedBard3 Feb 1, 2022
1d6b8ce
Use updated dotnet for more of the pipeline.
LoopedBard3 Feb 1, 2022
53d3ed4
Removed unnecessary ls and dotnet infos, and added nuget as source fo…
LoopedBard3 Feb 1, 2022
dc85b56
Test with made runtime packs and and add ios arm pack substitution.
LoopedBard3 Feb 1, 2022
4cc32a0
iOS build failed, disable workload builds for faster testing.
LoopedBard3 Feb 1, 2022
9ada86b
Add runtime identifier for ios-arm64.
LoopedBard3 Feb 1, 2022
ddaf1e9
The runtime didn't seem to catch, try again.
LoopedBard3 Feb 1, 2022
9186301
Add runtime ID to props file for ios scenario.
LoopedBard3 Feb 1, 2022
1f59f26
Try iossimulator instead.
LoopedBard3 Feb 1, 2022
7180249
Try building instead of publishing.
LoopedBard3 Feb 2, 2022
9253df7
Try iossimulator as passed runtime instead of props runtime.
LoopedBard3 Feb 2, 2022
d5f1ae8
Try without specifying RID as it failed with it at the top level
LoopedBard3 Feb 2, 2022
8459e47
Reenable everything for full test run.
LoopedBard3 Feb 2, 2022
9aec509
Package name now seems to default to lower case for maui.
LoopedBard3 Feb 2, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions eng/pipelines/coreclr/perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,8 @@ jobs:
- Build_Android_x64_release_Maui_Packs_Mono
- Build_MacCatalyst_x64_release_Maui_Packs_Mono
- Build_iOSSimulator_x64_release_Maui_Packs_Mono
- Build_iOS_arm_release_Maui_Packs_Mono
- Build_iOS_arm64_release_Maui_Packs_Mono
buildArgs: -s mono -c $(_BuildConfig)
nameSuffix: MACiOSAndroidMaui
isOfficialBuild: false
Expand Down
16 changes: 9 additions & 7 deletions eng/pipelines/coreclr/templates/build-perf-maui-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,16 @@ steps:
cleanDestinationFolder: false

- script: |
curl -o ./rollback.json 'maui.blob.core.windows.net/metadata/rollbacks/main.json'
./dotnet.sh workload update --from-rollback-file ./rollback.json
./dotnet.sh workload install maui --skip-manifest-update
curl -o dotnet-install.sh 'https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh'
chmod -R a+rx .
./dotnet-install.sh --channel 6.0.2xx --quality signed --install-dir .
./dotnet --info
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this line for? Is it needed?

./dotnet workload install maui --from-rollback-file https://aka.ms/dotnet/maui/main.json --source https://aka.ms/dotnet6/nuget/index.json --source https://api.nuget.org/v3/index.json
displayName: Install MAUI workload
workingDirectory: $(Build.SourcesDirectory)

- script: |
./dotnet.sh new maui -n MauiTesting
./dotnet new maui -n MauiTesting
cd MauiTesting
cp $(Build.SourcesDirectory)/src/tests/Common/maui/MauiScenario.props ./Directory.Build.props
cp $(Build.SourcesDirectory)/src/tests/Common/maui/MauiScenario.targets ./Directory.Build.targets
Expand All @@ -126,21 +128,21 @@ steps:

- script: |
chmod -R a+r .
../dotnet.sh publish -bl:MauiAndroid.binlog -f net6.0-android -c Release
../dotnet publish -bl:MauiAndroid.binlog -f net6.0-android -c Release
mv ./bin/Release/net6.0-android/com.companyname.MauiTesting-Signed.apk ./MauiAndroidDefault.apk
displayName: Build MAUI Android
workingDirectory: $(Build.SourcesDirectory)/MauiTesting

- script: |
chmod -R a+r .
../dotnet.sh publish -bl:MauiiOS.binlog -f net6.0-ios -c Release
../dotnet build -bl:MauiiOS.binlog -f net6.0-ios -c Release
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I've found to work is:

  1. Remove the net6.0-maccatalyst TFM from the TargetFrameworks property in the .csproj.
  2. dotnet publish -c Release -f net6.0-ios -r ios-arm64

I've logged dotnet/macios#14015 for this, which was closed in favor of dotnet/sdk#21877.

mv ./bin/Release/net6.0-ios/iossimulator-x64/MauiTesting.app ./MauiiOSDefault.app
displayName: Build MAUI iOS
workingDirectory: $(Build.SourcesDirectory)/MauiTesting

- script: |
chmod -R a+r .
../dotnet.sh publish -bl:MauiMacCatalyst.binlog -f net6.0-maccatalyst -c Release
../dotnet publish -bl:MauiMacCatalyst.binlog -f net6.0-maccatalyst -c Release
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we care about maccatalyst size? I'm not certain this is an important scenario to track. It may just be wasting resources and cluttering the perf dashboard.

mv ./bin/Release/net6.0-maccatalyst/maccatalyst-x64/MauiTesting.app ./MauiMacCatalystDefault.app
displayName: Build MAUI MacCatalyst
workingDirectory: $(Build.SourcesDirectory)/MauiTesting
Expand Down
2 changes: 1 addition & 1 deletion eng/testing/performance/android_scenarios.proj
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<HelixWorkItem Include="Startup - Android Maui">
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
<PreCommands>echo on;set XHARNESSPATH=$(XharnessPath);cd $(ScenarioDirectory)mauiandroid;copy %HELIX_CORRELATION_PAYLOAD%\MauiAndroidDefault.apk .;$(Python) pre.py</PreCommands>
<Command>$(Python) test.py devicestartup --device-type android --package-path pub\MauiAndroidDefault.apk --package-name com.companyname.MauiTesting --scenario-name &quot;%(Identity)&quot;</Command>
<Command>$(Python) test.py devicestartup --device-type android --package-path pub\MauiAndroidDefault.apk --package-name com.companyname.mauitesting --scenario-name &quot;%(Identity)&quot;</Command>
<PostCommands>$(Python) post.py</PostCommands>
</HelixWorkItem>
</ItemGroup>
Expand Down
6 changes: 5 additions & 1 deletion src/tests/Common/maui/MauiScenario.targets
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Message Text="Used runtime pack: %(ResolvedRuntimePack.PackageDirectory)" Importance="high" />
</Target>

<!-- Use local targeting pack for NetCoreAppCurrent. -->
<!--Use local targeting pack for NetCoreAppCurrent.-->
<Target Name="UpdateTargetingAndRuntimePack"
AfterTargets="ResolveFrameworkReferences">
<PropertyGroup>
Expand All @@ -18,6 +18,10 @@
Condition="'%(ResolvedRuntimePack.FrameworkName)' == 'Microsoft.NETCore.App' and '%(ResolvedRuntimePack.RuntimeIdentifier)' == 'android-x86'" />
<ResolvedRuntimePack PackageDirectory="$(MicrosoftNetCoreAppRuntimePackDir)/Microsoft.NETCore.App.Runtime.Mono.android-x64"
Condition="'%(ResolvedRuntimePack.FrameworkName)' == 'Microsoft.NETCore.App' and '%(ResolvedRuntimePack.RuntimeIdentifier)' == 'android-x64'" />
<ResolvedRuntimePack PackageDirectory="$(MicrosoftNetCoreAppRuntimePackDir)/Microsoft.NETCore.App.Runtime.Mono.ios-arm"
Condition="'%(ResolvedRuntimePack.FrameworkName)' == 'Microsoft.NETCore.App' and '%(ResolvedRuntimePack.RuntimeIdentifier)' == 'ios-arm'" />
<ResolvedRuntimePack PackageDirectory="$(MicrosoftNetCoreAppRuntimePackDir)/Microsoft.NETCore.App.Runtime.Mono.ios-arm64"
Condition="'%(ResolvedRuntimePack.FrameworkName)' == 'Microsoft.NETCore.App' and '%(ResolvedRuntimePack.RuntimeIdentifier)' == 'ios-arm64'" />
<ResolvedRuntimePack PackageDirectory="$(MicrosoftNetCoreAppRuntimePackDir)/Microsoft.NETCore.App.Runtime.Mono.maccatalyst-x64"
Condition="'%(ResolvedRuntimePack.FrameworkName)' == 'Microsoft.NETCore.App' and '%(ResolvedRuntimePack.RuntimeIdentifier)' == 'maccatalyst-x64'" />
<ResolvedRuntimePack PackageDirectory="$(MicrosoftNetCoreAppRuntimePackDir)/Microsoft.NETCore.App.Runtime.Mono.iossimulator-x64"
Expand Down