-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Maui Android Size on Disk Integration (#60425)
Added main Maui build pipeline yml file with target and prop files to properly build Maui for Android with the latest runtime bits, updated the perf.yml file to run the Maui build steps, and piped the Android app artifact through the same line as the AndroidScenario so the perf size on disk tests are run.
- Loading branch information
1 parent
881ee50
commit ed91cea
Showing
7 changed files
with
224 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
131 changes: 131 additions & 0 deletions
131
eng/pipelines/coreclr/templates/build-perf-maui-apps.yml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
parameters: | ||
osGroup: '' | ||
osSubgroup: '' | ||
archType: '' | ||
buildConfig: '' | ||
runtimeFlavor: '' | ||
helixQueues: '' | ||
targetRid: '' | ||
nameSuffix: '' | ||
platform: '' | ||
shouldContinueOnError: '' | ||
rootFolder: '' | ||
includeRootFolder: '' | ||
displayName: '' | ||
artifactName: '' | ||
archiveExtension: '' | ||
archiveType: '' | ||
tarCompression: '' | ||
|
||
|
||
steps: | ||
- task: DownloadPipelineArtifact@2 | ||
displayName: Download runtime packages | ||
inputs: | ||
artifact: 'IntermediateArtifacts' | ||
path: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks | ||
patterns: | | ||
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.android-!(*.symbols).nupkg | ||
# Other artifacts to include once they are being built | ||
# IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.ios-*.nupkg | ||
# IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.iossimulator-*.nupkg | ||
# IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.maccatalyst-*.nupkg | ||
|
||
- task: CopyFiles@2 | ||
displayName: Flatten packages | ||
inputs: | ||
sourceFolder: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks | ||
contents: '*/Shipping/*.nupkg' | ||
cleanTargetFolder: false | ||
targetFolder: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks | ||
flattenFolders: true | ||
|
||
- script: | | ||
for file in *.nupkg | ||
do | ||
mv -v "$file" "${file%.nupkg}.zip" | ||
done | ||
displayName: Change nupkgs to zips | ||
workingDirectory: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks | ||
# #Unzip the nuget packages to make the actual runtimes accessible | ||
- task: ExtractFiles@1 | ||
displayName: Extract android-arm64 runtime | ||
inputs: | ||
archiveFilePatterns: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks/Microsoft.NETCore.App.Runtime.Mono.android-arm64.*.zip | ||
destinationFolder: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks/Microsoft.NETCore.App.Runtime.Mono.android-arm64 | ||
overwriteExistingFiles: true | ||
cleanDestinationFolder: false | ||
- task: ExtractFiles@1 | ||
displayName: Extract android-x86 runtime | ||
inputs: | ||
archiveFilePatterns: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks/Microsoft.NETCore.App.Runtime.Mono.android-x86.*.zip | ||
destinationFolder: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks/Microsoft.NETCore.App.Runtime.Mono.android-x86 | ||
overwriteExistingFiles: true | ||
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 | ||
displayName: Install MAUI workload | ||
workingDirectory: $(Build.SourcesDirectory) | ||
- script: | | ||
./dotnet.sh new maui -n MauiTesting | ||
cd MauiTesting | ||
cp $(Build.SourcesDirectory)/src/maui/MauiScenario.props ./Directory.Build.props | ||
cp $(Build.SourcesDirectory)/src/maui/MauiScenario.targets ./Directory.Build.targets | ||
displayName: Setup MAUI Project | ||
workingDirectory: $(Build.SourcesDirectory) | ||
- script: | | ||
chmod -R a+r . | ||
../dotnet.sh 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 | ||
- task: PublishBuildArtifacts@1 | ||
displayName: 'Publish MauiAndroid binlog' | ||
inputs: | ||
pathtoPublish: $(Build.SourcesDirectory)/MauiTesting/MauiAndroid.binlog | ||
artifactName: ${{ parameters.artifactName }} | ||
|
||
- template: /eng/pipelines/common/upload-artifact-step.yml | ||
parameters: | ||
rootFolder: $(Build.SourcesDirectory)/MauiTesting/MauiAndroidDefault.apk | ||
includeRootFolder: true | ||
displayName: Maui Android App | ||
artifactName: MauiAndroidApp | ||
archiveExtension: '.tar.gz' | ||
archiveType: tar | ||
tarCompression: gz | ||
|
||
- script: rm -r -f ./bin | ||
workingDirectory: $(Build.SourcesDirectory)/MauiTesting | ||
displayName: Clean bin directory | ||
condition: succeededOrFailed() | ||
|
||
- template: /eng/pipelines/common/upload-artifact-step.yml | ||
parameters: | ||
osGroup: ${{ parameters.osGroup }} | ||
osSubgroup: ${{ parameters.osSubgroup }} | ||
archType: ${{ parameters.archType }} | ||
buildConfig: ${{ parameters.buildConfig }} | ||
runtimeFlavor: ${{ parameters.runtimeFlavor }} | ||
helixQueues: ${{ parameters.helixQueues }} | ||
targetRid: ${{ parameters.targetRid }} | ||
nameSuffix: ${{ parameters.nameSuffix }} | ||
platform: ${{ parameters.platform }} | ||
shouldContinueOnError: ${{ parameters.shouldContinueOnError }} | ||
rootFolder: ${{ parameters.rootFolder }} | ||
includeRootFolder: ${{ parameters.includeRootFolder }} | ||
displayName: ${{ parameters.displayName }} | ||
artifactName: ${{ parameters.artifactName }} | ||
archiveExtension: ${{ parameters.archiveExtension }} | ||
archiveType: ${{ parameters.archiveType }} | ||
tarCompression: ${{ parameters.tarCompression }} | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<Project> | ||
<!-- Only here so that the default Directory.Build.props will not be used. --> | ||
</Project> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<Project> | ||
<Target Name="PrintRuntimePackLocation" AfterTargets="UpdateTargetingAndRuntimePack"> | ||
<Message Text="Used runtime pack: %(ResolvedRuntimePack.PackageDirectory)" Importance="high" /> | ||
</Target> | ||
|
||
<!-- Use local targeting pack for NetCoreAppCurrent. --> | ||
<Target Name="UpdateTargetingAndRuntimePack" | ||
AfterTargets="ResolveFrameworkReferences"> | ||
<PropertyGroup> | ||
<MicrosoftNetCoreAppRuntimePackDir>./ArtifactPacks</MicrosoftNetCoreAppRuntimePackDir> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<ResolvedRuntimePack PackageDirectory="$(MicrosoftNetCoreAppRuntimePackDir)/Microsoft.NETCore.App.Runtime.Mono.android-arm64" | ||
Condition="'%(ResolvedRuntimePack.FrameworkName)' == 'Microsoft.NETCore.App' and '%(ResolvedRuntimePack.RuntimeIdentifier)' == 'android-arm64'" /> | ||
<ResolvedRuntimePack PackageDirectory="$(MicrosoftNetCoreAppRuntimePackDir)/Microsoft.NETCore.App.Runtime.Mono.android-x86" | ||
Condition="'%(ResolvedRuntimePack.FrameworkName)' == 'Microsoft.NETCore.App' and '%(ResolvedRuntimePack.RuntimeIdentifier)' == 'android-x86'" /> | ||
</ItemGroup> | ||
</Target> | ||
</Project> |