Skip to content

Commit

Permalink
[nativeaot][tests] Add Native AOT iOS perf scenarios (#85317)
Browse files Browse the repository at this point in the history
This PR updates the CI jobs to include the Native AOT iOS performance scenarios. The changes include building the NativeAOT iOS scenarios and running them, as well as updating the underlying scripts and project files to support it. Additionally, it separates the scenarios from the current Mono AOT sample measurements.
  • Loading branch information
kotlarmilos authored Jun 1, 2023
1 parent d45a905 commit 534d1df
Show file tree
Hide file tree
Showing 10 changed files with 443 additions and 61 deletions.
90 changes: 90 additions & 0 deletions eng/pipelines/coreclr/perf-non-wasm-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,27 @@ jobs:
archiveType: tar
tarCompression: gz

# build NativeAOT iOS scenarios
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/global-build-job.yml
buildConfig: release
runtimeFlavor: mono
platforms:
- ios_arm64
jobParameters:
nameSuffix: iOSNativeAOT
isOfficialBuild: false
extraStepsTemplate: /eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
extraStepsParameters:
rootFolder: '$(Build.SourcesDirectory)/artifacts/'
includeRootFolder: true
displayName: iOS NativeAOT Artifacts
artifactName: iOSNativeAOTarm64
archiveExtension: '.tar.gz'
archiveType: tar
tarCompression: gz

# build mono
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
Expand Down Expand Up @@ -143,6 +164,24 @@ jobs:
runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
logicalmachine: 'perfiphone12mini'
iOSLlvmBuild: False
iOSStripSymbols: False

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
buildConfig: release
runtimeFlavor: mono
platforms:
- osx_x64
jobParameters:
testGroup: perf
runtimeType: iOSMono
projectFile: ios_scenarios.proj
runKind: ios_scenarios
runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
logicalmachine: 'perfiphone12mini'
iOSLlvmBuild: False
iOSStripSymbols: True

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
Expand All @@ -159,6 +198,57 @@ jobs:
runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
logicalmachine: 'perfiphone12mini'
iOSLlvmBuild: True
iOSStripSymbols: False

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
buildConfig: release
runtimeFlavor: mono
platforms:
- osx_x64
jobParameters:
testGroup: perf
runtimeType: iOSMono
projectFile: ios_scenarios.proj
runKind: ios_scenarios
runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
logicalmachine: 'perfiphone12mini'
iOSLlvmBuild: True
iOSStripSymbols: True

# run NativeAOT iOS scenarios
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
buildConfig: release
runtimeFlavor: mono
platforms:
- osx_x64
jobParameters:
testGroup: perf
runtimeType: iOSNativeAOT
projectFile: ios_nativeaot_scenarios.proj
runKind: ios_scenarios
runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
logicalmachine: 'perfiphone12mini'
iOSStripSymbols: False

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
buildConfig: release
runtimeFlavor: mono
platforms:
- osx_x64
jobParameters:
testGroup: perf
runtimeType: iOSNativeAOT
projectFile: ios_nativeaot_scenarios.proj
runKind: ios_scenarios
runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
logicalmachine: 'perfiphone12mini'
iOSStripSymbols: True

# run mono microbenchmarks perf job
- template: /eng/pipelines/common/platform-matrix.yml
Expand Down
103 changes: 95 additions & 8 deletions eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ steps:
- script: rm -r -f $(Build.SourcesDirectory)/artifacts/bin/AndroidSampleApp
workingDirectory: $(Build.SourcesDirectory)/artifacts/bin
displayName: clean bindir
- ${{ if eq(parameters.osGroup, 'ios') }}:
- script: make build-appbundle TARGET=ios MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=False DEPLOY_AND_RUN=false

- ${{ if and(eq(parameters.osGroup, 'ios'), eq(parameters.nameSuffix, 'iOSMono')) }}:
- script: make build-appbundle TARGET=ios MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=False DEPLOY_AND_RUN=false STRIP_DEBUG_SYMBOLS=false
env:
DevTeamProvisioning: '-'
workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
displayName: Build HelloiOS AOT sample app LLVM=False
displayName: Build HelloiOS AOT sample app LLVM=False STRIP_SYMBOLS=False
- task: PublishBuildArtifacts@1
condition: succeededOrFailed()
displayName: 'Publish binlog'
Expand All @@ -53,17 +53,39 @@ steps:
rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS/bin/ios-arm64/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
includeRootFolder: true
displayName: iOS Sample App NoLLVM
artifactName: iOSSampleAppNoLLVM
artifactName: iOSSampleAppNoLLVMSymbols
archiveExtension: '.zip'
archiveType: zip
- script: rm -r -f $(Build.SourcesDirectory)/src/mono/sample/iOS/bin
workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
displayName: Clean bindir
- script: make build-appbundle TARGET=ios MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=True DEPLOY_AND_RUN=false
- script: make build-appbundle TARGET=ios MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=False DEPLOY_AND_RUN=false STRIP_DEBUG_SYMBOLS=true
env:
DevTeamProvisioning: '-'
workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
displayName: Build HelloiOS AOT sample app LLVM=True
displayName: Build HelloiOS AOT sample app LLVM=False STRIP_SYMBOLS=True
- task: PublishBuildArtifacts@1
condition: succeededOrFailed()
displayName: 'Publish binlog'
inputs:
pathtoPublish: $(Build.SourcesDirectory)/src/mono/sample/iOS/msbuild.binlog
artifactName: ${{ parameters.artifactName }}
- template: /eng/pipelines/common/upload-artifact-step.yml
parameters:
rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS/bin/ios-arm64/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
includeRootFolder: true
displayName: iOS Sample App NoLLVM NoSymbols
artifactName: iOSSampleAppNoLLVMNoSymbols
archiveExtension: '.zip'
archiveType: zip
- script: rm -r -f $(Build.SourcesDirectory)/src/mono/sample/iOS/bin
workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
displayName: Clean bindir
- script: make build-appbundle TARGET=ios MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=True DEPLOY_AND_RUN=false STRIP_DEBUG_SYMBOLS=false
env:
DevTeamProvisioning: '-'
workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
displayName: Build HelloiOS AOT sample app LLVM=True STRIP_SYMBOLS=False
- task: PublishBuildArtifacts@1
condition: succeededOrFailed()
displayName: 'Publish binlog'
Expand All @@ -75,6 +97,71 @@ steps:
rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS/bin/ios-arm64/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
includeRootFolder: true
displayName: iOS Sample App LLVM
artifactName: iOSSampleAppLLVM
artifactName: iOSSampleAppLLVMSymbols
archiveExtension: '.zip'
archiveType: zip
- script: rm -r -f $(Build.SourcesDirectory)/src/mono/sample/iOS/bin
workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
displayName: Clean bindir
- script: make build-appbundle TARGET=ios MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=True DEPLOY_AND_RUN=false STRIP_DEBUG_SYMBOLS=true
env:
DevTeamProvisioning: '-'
workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
displayName: Build HelloiOS AOT sample app LLVM=True STRIP_SYMBOLS=True
- task: PublishBuildArtifacts@1
condition: succeededOrFailed()
displayName: 'Publish binlog'
inputs:
pathtoPublish: $(Build.SourcesDirectory)/src/mono/sample/iOS/msbuild.binlog
artifactName: ${{ parameters.artifactName }}
- template: /eng/pipelines/common/upload-artifact-step.yml
parameters:
rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS/bin/ios-arm64/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
includeRootFolder: true
displayName: iOS Sample App LLVM NoSymbols
artifactName: iOSSampleAppLLVMNoSymbols
archiveExtension: '.zip'
archiveType: zip

- ${{ if and(eq(parameters.osGroup, 'ios'), eq(parameters.nameSuffix, 'iOSNativeAOT')) }}:
- script: make world TARGET_OS=ios TARGET_ARCH=arm64 BUILD_CONFIG=Release DEPLOY_AND_RUN=false STRIP_DEBUG_SYMBOLS=false
env:
DevTeamProvisioning: '-'
workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT
displayName: Build HelloiOS Native AOT sample app STRIP_SYMBOLS=False
- task: PublishBuildArtifacts@1
condition: succeededOrFailed()
displayName: 'Publish binlog'
inputs:
pathtoPublish: $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT/msbuild.binlog
artifactName: ${{ parameters.artifactName }}
- template: /eng/pipelines/common/upload-artifact-step.yml
parameters:
rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT/bin/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
includeRootFolder: true
displayName: iOS Sample App Symbols
artifactName: iOSSampleAppSymbols
archiveExtension: '.zip'
archiveType: zip
- script: rm -r -f $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT/bin
workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT
displayName: Clean bindir
- script: make world TARGET_OS=ios TARGET_ARCH=arm64 BUILD_CONFIG=Release DEPLOY_AND_RUN=false STRIP_DEBUG_SYMBOLS=true
env:
DevTeamProvisioning: '-'
workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT
displayName: Build HelloiOS Native AOT sample app STRIP_SYMBOLS=True
- task: PublishBuildArtifacts@1
condition: succeededOrFailed()
displayName: 'Publish binlog'
inputs:
pathtoPublish: $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT/msbuild.binlog
artifactName: ${{ parameters.artifactName }}
- template: /eng/pipelines/common/upload-artifact-step.yml
parameters:
rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT/bin/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
includeRootFolder: true
displayName: iOS Sample App NoSymbols
artifactName: iOSSampleAppNoSymbols
archiveExtension: '.zip'
archiveType: zip
Loading

0 comments on commit 534d1df

Please sign in to comment.