- name: _osParameter
value: -os ${{ parameters.osGroup }}
+ - name: _archParameter
+ value: -arch ${{ parameters.archType }}
- ${{ if and(eq(parameters.osGroup, 'linux'), eq(parameters.osSubGroup, '_bionic')) }}:
- name: _osParameter
- task: CodeQL3000Init@0
displayName: Initialize CodeQL (manually-injected)
- - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -ci -arch ${{ parameters.archType }} $(_osParameter) $(crossArg) ${{ parameters.buildArgs }} $(_officialBuildParameter) $(_buildDarwinFrameworksParameter) $(_overrideTestScriptWindowsCmdParameter)
+ - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -ci $(_archParameter) $(_osParameter) $(crossArg) ${{ parameters.buildArgs }} $(_officialBuildParameter) $(_buildDarwinFrameworksParameter) $(_overrideTestScriptWindowsCmdParameter)
displayName: Build product
${{ if eq(parameters.useContinueOnErrorDuringBuild, true) }}:
continueOnError: ${{ parameters.shouldContinueOnError }}
platform: maccatalyst_x64
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
jobParameters:
- runtimeFlavor: mono
+ ${{ if eq(parameters.runtimeFlavor, '') }}:
+ runtimeFlavor: mono
+ ${{ else }}:
+ runtimeFlavor: ${{ parameters.runtimeFlavor }}
buildConfig: ${{ parameters.buildConfig }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}
platform: maccatalyst_arm64
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
jobParameters:
- runtimeFlavor: mono
+ ${{ if eq(parameters.runtimeFlavor, '') }}:
+ runtimeFlavor: mono
+ ${{ else }}:
+ runtimeFlavor: ${{ parameters.runtimeFlavor }}
buildConfig: ${{ parameters.buildConfig }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}
platform: tvos_arm64
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
jobParameters:
- runtimeFlavor: mono
+ ${{ if eq(parameters.runtimeFlavor, '') }}:
+ runtimeFlavor: mono
+ ${{ else }}:
+ runtimeFlavor: ${{ parameters.runtimeFlavor }}
buildConfig: ${{ parameters.buildConfig }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}
platform: tvossimulator_x64
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
jobParameters:
- runtimeFlavor: mono
+ ${{ if eq(parameters.runtimeFlavor, '') }}:
+ runtimeFlavor: mono
+ ${{ else }}:
+ runtimeFlavor: ${{ parameters.runtimeFlavor }}
buildConfig: ${{ parameters.buildConfig }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}
platform: tvossimulator_arm64
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
jobParameters:
- runtimeFlavor: mono
+ ${{ if eq(parameters.runtimeFlavor, '') }}:
+ runtimeFlavor: mono
+ ${{ else }}:
+ runtimeFlavor: ${{ parameters.runtimeFlavor }}
buildConfig: ${{ parameters.buildConfig }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}
platform: ios_arm64
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
jobParameters:
- runtimeFlavor: mono
+ ${{ if eq(parameters.runtimeFlavor, '') }}:
+ runtimeFlavor: mono
+ ${{ else }}:
+ runtimeFlavor: ${{ parameters.runtimeFlavor }}
buildConfig: ${{ parameters.buildConfig }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}
platform: iossimulator_x64
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
jobParameters:
- runtimeFlavor: mono
+ ${{ if eq(parameters.runtimeFlavor, '') }}:
+ runtimeFlavor: mono
+ ${{ else }}:
+ runtimeFlavor: ${{ parameters.runtimeFlavor }}
buildConfig: ${{ parameters.buildConfig }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}
platform: iossimulator_arm64
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
jobParameters:
- runtimeFlavor: mono
+ ${{ if eq(parameters.runtimeFlavor, '') }}:
+ runtimeFlavor: mono
+ ${{ else }}:
+ runtimeFlavor: ${{ parameters.runtimeFlavor }}
buildConfig: ${{ parameters.buildConfig }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}
- name: runtimeFlavorArgs
value: '-mono'
+ - ${{ if and(eq(parameters.runtimeFlavor, 'coreclr'), in(parameters.osGroup, 'ios', 'iossimulator', 'tvos', 'tvossimulator', 'maccatalyst')) }}:
+ - name: runtimeFlavorArgs
+ value: '-nativeaot'
+
- name: testTreeFilterArg
value: ''
- name: runtimeFlavorArgs
value: '-mono'
+ - ${{ if and(eq(parameters.runtimeFlavor, 'coreclr'), in(parameters.osGroup, 'ios', 'iossimulator', 'tvos', 'tvossimulator', 'maccatalyst')) }}:
+ - name: runtimeFlavorArgs
+ value: '-nativeaot'
+
- name: runtimeVariantArg
value: ''
- name: isWasmOnlyBuild
value: ${{ in(variables['Build.DefinitionName'], 'runtime-wasm', 'runtime-wasm-libtests', 'runtime-wasm-non-libtests', 'runtime-wasm-dbgtests', 'runtime-wasm-optional') }}
- name: isiOSLikeOnlyBuild
- value: ${{ in(variables['Build.DefinitionName'], 'runtime-ioslike') }}
+ value: ${{ in(variables['Build.DefinitionName'], 'runtime-ioslike', 'runtime-ioslike-mono', 'runtime-ioslike-coreclr') }}
- name: isiOSLikeSimulatorOnlyBuild
value: ${{ in(variables['Build.DefinitionName'], 'runtime-ioslikesimulator') }}
- name: isAndroidOnlyBuild
- name: isLinuxBionicOnlyBuild
value: ${{ in(variables['Build.DefinitionName'], 'runtime-linuxbionic') }}
- name: isRunSmokeTestsOnly
- value: ${{ notin(variables['Build.DefinitionName'], 'runtime-extra-platforms', 'runtime-wasm', 'runtime-wasm-libtests', 'runtime-wasm-non-libtests', 'runtime-ioslike', 'runtime-ioslikesimulator', 'runtime-android', 'runtime-androidemulator', 'runtime-maccatalyst', 'runtime-linuxbionic') }}
+ value: ${{ notin(variables['Build.DefinitionName'], 'runtime-extra-platforms', 'runtime-wasm', 'runtime-wasm-libtests', 'runtime-wasm-non-libtests', 'runtime-ioslike', 'runtime-ioslike-mono', 'runtime-ioslike-coreclr', 'runtime-ioslikesimulator', 'runtime-android', 'runtime-androidemulator', 'runtime-maccatalyst', 'runtime-linuxbionic') }}
- name: isNotSpecificPlatformOnlyBuild
- value: ${{ notin(variables['Build.DefinitionName'], 'runtime-wasm', 'runtime-wasm-libtests', 'runtime-wasm-non-libtests', 'runtime-ioslike', 'runtime-ioslikesimulator', 'runtime-android', 'runtime-androidemulator', 'runtime-maccatalyst', 'runtime-linuxbionic') }}
+ value: ${{ notin(variables['Build.DefinitionName'], 'runtime-wasm', 'runtime-wasm-libtests', 'runtime-wasm-non-libtests', 'runtime-ioslike', 'runtime-ioslike-mono', 'runtime-ioslike-coreclr', 'runtime-ioslikesimulator', 'runtime-android', 'runtime-androidemulator', 'runtime-maccatalyst', 'runtime-linuxbionic') }}
# We only run evaluate paths on runtime and runtime-community pipelines on PRs
# keep in sync with /eng/pipelines/common/xplat-setup.yml
- name: dependOnEvaluatePaths
- value: ${{ and(eq(variables['Build.Reason'], 'PullRequest'), in(variables['Build.DefinitionName'], 'runtime', 'runtime-community', 'runtime-extra-platforms', 'runtime-wasm', 'runtime-wasm-libtests', 'runtime-wasm-non-libtests', 'runtime-ioslike', 'runtime-ioslikesimulator', 'runtime-android', 'runtime-androidemulator', 'runtime-maccatalyst', 'runtime-linuxbionic', 'dotnet-linker-tests', 'runtime-dev-innerloop', 'runtime-coreclr superpmi-replay', 'runtime-coreclr superpmi-diffs')) }}
+ value: ${{ and(eq(variables['Build.Reason'], 'PullRequest'), in(variables['Build.DefinitionName'], 'runtime', 'runtime-community', 'runtime-extra-platforms', 'runtime-wasm', 'runtime-wasm-libtests', 'runtime-wasm-non-libtests', 'runtime-ioslike', 'runtime-ioslike-mono', 'runtime-ioslike-coreclr', 'runtime-ioslikesimulator', 'runtime-android', 'runtime-androidemulator', 'runtime-maccatalyst', 'runtime-linuxbionic', 'dotnet-linker-tests', 'runtime-dev-innerloop', 'runtime-coreclr superpmi-replay', 'runtime-coreclr superpmi-diffs')) }}
- name: debugOnPrReleaseOnRolling
${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
value: Release
parameters:
jobTemplate: ''
hostedOs: ''
+ hostedArch: ''
osGroup: ''
osSubgroup: ''
archType: ''
parameters:
jobTemplate: /eng/pipelines/common/global-build-job.yml
buildConfig: release
- runtimeFlavor: mono
+ runtimeFlavor: coreclr
platforms:
- ios_arm64
jobParameters:
- buildArgs: -s clr.nativeaotruntime+clr.nativeaotlibs+libs -c $(_BuildConfig)
+ buildArgs: --cross -s clr.alljits+clr.tools+clr.nativeaotruntime+clr.nativeaotlibs+libs -c $(_BuildConfig)
nameSuffix: iOSNativeAOT
isOfficialBuild: false
extraStepsTemplate: /eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
parameters:
jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
buildConfig: release
- runtimeFlavor: mono
+ runtimeFlavor: coreclr
platforms:
- osx_x64
jobParameters:
parameters:
jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
buildConfig: release
- runtimeFlavor: mono
+ runtimeFlavor: coreclr
platforms:
- osx_x64
jobParameters:
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
+ rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT/bin/ios-arm64/Bundle/HelloiOS/Release-iphoneos/HelloiOS.app
includeRootFolder: true
displayName: iOS Sample App Symbols
artifactName: iOSSampleAppSymbols
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
+ rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT/bin/ios-arm64/Bundle/HelloiOS/Release-iphoneos/HelloiOS.app
includeRootFolder: true
displayName: iOS Sample App NoSymbols
artifactName: iOSSampleAppNoSymbols
# Create Core_Root
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) $(buildConfig) $(archType) generatelayoutonly $(librariesOverrideArg) $(_crossBuildPropertyArg)
displayName: Create Core_Root
- condition: and(succeeded(), ne(variables.runtimeFlavorName, 'Mono'), ne('${{ parameters.runtimeType }}', 'wasm'))
+ condition: and(succeeded(), ne(variables.runtimeFlavorName, 'Mono'), ne('${{ parameters.runtimeType }}', 'wasm'), not(in('${{ parameters.runtimeType }}', 'AndroidMono', 'iOSMono', 'iOSNativeAOT')))
# Copy the runtime directory into the testhost folder to include OOBs.
- script: "build.cmd -subset libs.pretest -configuration release -ci -arch $(archType) -testscope innerloop /p:RuntimeArtifactsPath=$(librariesDownloadDir)\\bin\\mono\\$(osGroup).$(archType).$(buildConfigUpper) /p:RuntimeFlavor=mono;xcopy $(Build.SourcesDirectory)\\artifacts\\bin\\runtime\\net8.0-$(osGroup)-$(buildConfigUpper)-$(archType)\\* $(Build.SourcesDirectory)\\artifacts\\bin\\testhost\\net8.0-$(osGroup)-$(buildConfigUpper)-$(archType)\\shared\\Microsoft.NETCore.App\\$(productVersion) /E /I /Y;xcopy $(Build.SourcesDirectory)\\artifacts\\bin\\testhost\\net8.0-$(osGroup)-$(buildConfigUpper)-$(archType)\\* $(Build.SourcesDirectory)\\.dotnet-mono /E /I /Y;copy $(Build.SourcesDirectory)\\artifacts\\bin\\coreclr\\$(osGroup).$(archType).$(buildConfigUpper)\\corerun.exe $(Build.SourcesDirectory)\\.dotnet-mono\\shared\\Microsoft.NETCore.App\\$(productVersion)\\corerun.exe"
isExtraPlatformsBuild: false
isiOSLikeOnlyBuild: false
isRollingBuild: false
+ isMonoOnlyBuild: false
+ isCoreclrOnlyBuild: false
jobs:
-#
-# iOS/tvOS devices - Full AOT + AggressiveTrimming to reduce size
-# Build the whole product using Mono and run libraries tests
-#
-- template: /eng/pipelines/common/platform-matrix.yml
- parameters:
- jobTemplate: /eng/pipelines/common/global-build-job.yml
- helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml
- buildConfig: Release
- runtimeFlavor: mono
- isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}
- isiOSLikeOnlyBuild: ${{ parameters.isiOSLikeOnlyBuild }}
- platforms:
- - ios_arm64
- - tvos_arm64
- variables:
- # map dependencies variables to local variables
- - name: librariesContainsChange
- value: $[ dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ]
- - name: monoContainsChange
- value: $[ dependencies.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'] ]
- jobParameters:
- testGroup: innerloop
- nameSuffix: AllSubsets_Mono
- isExtraPlatforms: ${{ parameters.isExtraPlatformsBuild }}
- buildArgs: -s mono+libs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:RunAOTCompilation=true $(_runSmokeTestsOnlyArg) /p:BuildTestsOnHelix=true /p:EnableAdditionalTimezoneChecks=true /p:UsePortableRuntimePack=true /p:BuildDarwinFrameworks=true /p:IsManualOrRollingBuild=true
- timeoutInMinutes: 180
- # extra steps, run tests
- extraStepsTemplate: /eng/pipelines/libraries/helix.yml
- extraStepsParameters:
- creator: dotnet-bot
- testRunNamePrefixSuffix: Mono_$(_BuildConfig)
- extraHelixArguments: /p:NeedsToBuildAppsOnHelix=true
+- ${{ if eq(parameters.isCoreclrOnlyBuild, false) }}:
+ #
+ # iOS/tvOS devices - Full AOT + AggressiveTrimming to reduce size
+ # Build the whole product using Mono and run libraries tests
+ #
+ - template: /eng/pipelines/common/platform-matrix.yml
+ parameters:
+ jobTemplate: /eng/pipelines/common/global-build-job.yml
+ helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml
+ buildConfig: Release
+ runtimeFlavor: mono
+ isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}
+ isiOSLikeOnlyBuild: ${{ parameters.isiOSLikeOnlyBuild }}
+ platforms:
+ - ios_arm64
+ - tvos_arm64
+ variables:
+ # map dependencies variables to local variables
+ - name: librariesContainsChange
+ value: $[ dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ]
+ - name: monoContainsChange
+ value: $[ dependencies.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'] ]
+ jobParameters:
+ testGroup: innerloop
+ nameSuffix: AllSubsets_Mono
+ isExtraPlatforms: ${{ parameters.isExtraPlatformsBuild }}
+ buildArgs: -s mono+libs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:RunAOTCompilation=true $(_runSmokeTestsOnlyArg) /p:BuildTestsOnHelix=true /p:EnableAdditionalTimezoneChecks=true /p:UsePortableRuntimePack=true /p:BuildDarwinFrameworks=true /p:IsManualOrRollingBuild=true
+ timeoutInMinutes: 180
+ # extra steps, run tests
+ extraStepsTemplate: /eng/pipelines/libraries/helix.yml
+ extraStepsParameters:
+ creator: dotnet-bot
+ testRunNamePrefixSuffix: Mono_$(_BuildConfig)
+ extraHelixArguments: /p:NeedsToBuildAppsOnHelix=true
-#
-# Build the whole product using Mono for iOS/tvOS and run runtime tests with iOS/tvOS devices
-#
-- template: /eng/pipelines/common/platform-matrix.yml
- parameters:
- jobTemplate: /eng/pipelines/common/global-build-job.yml
- helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
- buildConfig: Release
- runtimeFlavor: mono
- isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}
- isiOSLikeOnlyBuild: ${{ parameters.isiOSLikeOnlyBuild }}
- platforms:
- - ios_arm64
- - tvos_arm64
- variables:
- - ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest')) }}:
- - name: _HelixSource
- value: pr/dotnet/runtime/$(Build.SourceBranch)
- - ${{ if and(eq(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}:
- - name: _HelixSource
- value: ci/dotnet/runtime/$(Build.SourceBranch)
- - name: timeoutPerTestInMinutes
- value: 60
- - name: timeoutPerTestCollectionInMinutes
- value: 180
- jobParameters:
- testGroup: innerloop
- nameSuffix: AllSubsets_Mono_RuntimeTests
- buildArgs: -s mono+libs -c $(_BuildConfig)
- timeoutInMinutes: 240
- # extra steps, run tests
- extraVariablesTemplates:
- - template: /eng/pipelines/common/templates/runtimes/test-variables.yml
- parameters:
- testGroup: innerloop
- extraStepsTemplate: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml
- extraStepsParameters:
- creator: dotnet-bot
- # FIXME: Currently, tracing/eventpipe tests are only enabled on iOS platforms. It should be expanded to include all runtime tests. Tracking issue: https://github.com/dotnet/runtime/issues/84254
- testBuildArgs: tree tracing/eventpipe
- testRunNamePrefixSuffix: Mono_$(_BuildConfig)
+ #
+ # Build the whole product using Mono for iOS/tvOS and run runtime tests with iOS/tvOS devices
+ #
+ - template: /eng/pipelines/common/platform-matrix.yml
+ parameters:
+ jobTemplate: /eng/pipelines/common/global-build-job.yml
+ helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
+ buildConfig: Release
+ runtimeFlavor: mono
+ isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}
+ isiOSLikeOnlyBuild: ${{ parameters.isiOSLikeOnlyBuild }}
+ platforms:
+ - ios_arm64
+ - tvos_arm64
+ variables:
+ - ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest')) }}:
+ - name: _HelixSource
+ value: pr/dotnet/runtime/$(Build.SourceBranch)
+ - ${{ if and(eq(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}:
+ - name: _HelixSource
+ value: ci/dotnet/runtime/$(Build.SourceBranch)
+ - name: timeoutPerTestInMinutes
+ value: 60
+ - name: timeoutPerTestCollectionInMinutes
+ value: 180
+ jobParameters:
+ testGroup: innerloop
+ nameSuffix: AllSubsets_Mono_RuntimeTests
+ buildArgs: -s mono+libs -c $(_BuildConfig)
+ timeoutInMinutes: 240
+ # extra steps, run tests
+ extraVariablesTemplates:
+ - template: /eng/pipelines/common/templates/runtimes/test-variables.yml
+ parameters:
+ testGroup: innerloop
+ extraStepsTemplate: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml
+ extraStepsParameters:
+ creator: dotnet-bot
+ # FIXME: Currently, tracing/eventpipe tests are only enabled on iOS platforms. It should be expanded to include all runtime tests. Tracking issue: https://github.com/dotnet/runtime/issues/84254
+ testBuildArgs: tree tracing/eventpipe
+ testRunNamePrefixSuffix: Mono_$(_BuildConfig)
+
+- ${{ if eq(parameters.isMonoOnlyBuild, false) }}:
+ #
+ # Build the whole product using NativeAOT for iOS/tvOS and run runtime tests with iOS/tvOS devices
+ #
+ - template: /eng/pipelines/common/platform-matrix.yml
+ parameters:
+ jobTemplate: /eng/pipelines/common/global-build-job.yml
+ helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
+ buildConfig: Release
+ runtimeFlavor: coreclr
+ isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}
+ isiOSLikeOnlyBuild: ${{ parameters.isiOSLikeOnlyBuild }}
+ platforms:
+ - ios_arm64
+ - tvos_arm64
+ variables:
+ - name: timeoutPerTestInMinutes
+ value: 60
+ - name: timeoutPerTestCollectionInMinutes
+ value: 180
+ jobParameters:
+ testGroup: innerloop
+ nameSuffix: AllSubsets_NativeAOT_RuntimeTests
+ timeoutInMinutes: 240
+ buildArgs: --cross -s clr.alljits+clr.tools+clr.nativeaotruntime+clr.nativeaotlibs+libs -c $(_BuildConfig)
+ # extra steps, run tests
+ extraVariablesTemplates:
+ - template: /eng/pipelines/common/templates/runtimes/test-variables.yml
+ parameters:
+ testGroup: innerloop
+ extraStepsTemplate: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml
+ extraStepsParameters:
+ creator: dotnet-bot
+ testBuildArgs: tree nativeaot/SmokeTests/UnitTests /p:BuildNativeAOTRuntimePack=true
+ testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig)
# FIXME: Currently, tracing/eventpipe tests are only enabled on iOS platforms. It should be expanded to include all runtime tests. Tracking issue: https://github.com/dotnet/runtime/issues/84254
testBuildArgs: tree tracing/eventpipe
testRunNamePrefixSuffix: Mono_$(_BuildConfig)
+
+#
+# Build the whole product using Native AOT for iOSSimulator/tvOSSimulator and run runtime tests with iOS/tvOS simulators
+#
+- template: /eng/pipelines/common/platform-matrix.yml
+ parameters:
+ jobTemplate: /eng/pipelines/common/global-build-job.yml
+ helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
+ buildConfig: Release
+ runtimeFlavor: coreclr
+ isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}
+ isiOSLikeOnlyBuild: ${{ parameters.isiOSLikeOnlyBuild }}
+ platforms:
+ - iossimulator_x64
+ - tvossimulator_x64
+ - iossimulator_arm64
+ variables:
+ - ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest')) }}:
+ - name: _HelixSource
+ value: pr/dotnet/runtime/$(Build.SourceBranch)
+ - ${{ if and(eq(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}:
+ - name: _HelixSource
+ value: ci/dotnet/runtime/$(Build.SourceBranch)
+ - name: timeoutPerTestInMinutes
+ value: 60
+ - name: timeoutPerTestCollectionInMinutes
+ value: 180
+ jobParameters:
+ testGroup: innerloop
+ nameSuffix: AllSubsets_NativeAOT_RuntimeTests
+ timeoutInMinutes: 240
+ buildArgs: --cross -s clr.alljits+clr.tools+clr.nativeaotruntime+clr.nativeaotlibs+libs -c $(_BuildConfig)
+ # extra steps, run tests
+ extraVariablesTemplates:
+ - template: /eng/pipelines/common/templates/runtimes/test-variables.yml
+ parameters:
+ testGroup: innerloop
+ extraStepsTemplate: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml
+ extraStepsParameters:
+ creator: dotnet-bot
+ testBuildArgs: tree nativeaot/SmokeTests/UnitTests /p:BuildNativeAOTRuntimePack=true
+ testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig)
--- /dev/null
+# This is a wrapper yml for `runtime-extra-platforms-ioslike.yml`, which runs Native AOT iOS/tvOS runtime tests.
+
+trigger: none
+
+variables:
+ - template: /eng/pipelines/common/variables.yml
+
+extends:
+ template: /eng/pipelines/common/templates/pipeline-with-resources.yml
+ parameters:
+ stages:
+ - stage: Build
+ jobs:
+ - template: /eng/pipelines/extra-platforms/runtime-extra-platforms-ioslike.yml
+ parameters:
+ isExtraPlatformsBuild: ${{ variables.isExtraPlatformsBuild }}
+ isiOSLikeOnlyBuild: ${{ variables.isiOSLikeOnlyBuild }}
+ isRollingBuild: ${{ variables.isRollingBuild }}
+ isCoreclrOnlyBuild: true
--- /dev/null
+# This is a wrapper yml for `runtime-extra-platforms-ioslike.yml`, which runs Mono AOT iOS/tvOS runtime tests.
+
+trigger: none
+
+variables:
+ - template: /eng/pipelines/common/variables.yml
+
+extends:
+ template: /eng/pipelines/common/templates/pipeline-with-resources.yml
+ parameters:
+ stages:
+ - stage: Build
+ jobs:
+ - template: /eng/pipelines/extra-platforms/runtime-extra-platforms-ioslike.yml
+ parameters:
+ isExtraPlatformsBuild: ${{ variables.isExtraPlatformsBuild }}
+ isiOSLikeOnlyBuild: ${{ variables.isiOSLikeOnlyBuild }}
+ isRollingBuild: ${{ variables.isRollingBuild }}
+ isMonoOnlyBuild: true
<Error Condition="'$(RuntimeIdentifier)' == ''"
Text="RuntimeIdentifier is required for native compilation. Try running dotnet publish with the -r option value specified." />
<Error Condition="'$(GeneratePackageOnBuild)' == 'true'" Text="GeneratePackageOnBuild is not supported for native compilation." />
- <Error Condition="'$(OutputType)' != 'Library' and '$(NativeLib)' != ''" Text="NativeLib requires OutputType=Library." />
+ <Error Condition="'$(OutputType)' != 'Library' and '$(NativeLib)' != '' and '$(CustomNativeMain)' != 'true'" Text="NativeLib requires OutputType=Library." />
<Error Condition="'$(PublishTrimmed)' == 'false'" Text="PublishTrimmed is implied by native compilation and cannot be disabled." />
<Error Condition="'$(NativeMainSource)' != '' and !Exists('$(NativeMainSource)')" Text="Project property NativeMainSource is defined, but the specified file: '$(NativeMainSource)' does not exist." />
<AppleAppBuilderTask
+ UseNativeAOTRuntime="$(UseNativeAOTRuntime)"
+ NativeDependencies="$(NativeDependencies)"
AppDir="$(AppleBuildDir)"
Arch="$(TargetArchitecture)"
Assemblies="@(_AssembliesToBundleInternal)"
# build all dependencies: runtime, nativeAot and all the libs
ifeq ($(USE_RUNTIME_PACKS),false)
-build-deps: build-runtime-ilc build-libs-all
+build-deps: build-runtime-libs-ilc
else
build-deps: build-runtime-ilc-packs build-libs-all-packs
endif
# building for host
-build-runtime-ilc:
- $(BUILD_SCRIPT) clr+clr.aot -c $(BUILD_CONFIG)
+build-runtime-libs-ilc:
+ $(BUILD_SCRIPT) --cross -s clr.alljits+clr.tools+clr.nativeaotruntime+clr.nativeaotlibs+libs -c $(BUILD_CONFIG) -os $(TARGET_OS) -arch $(TARGET_ARCH)
build-runtime-ilc-packs:
$(BUILD_SCRIPT) clr+clr.aot+libs+packs -c $(BUILD_CONFIG)
-# building for target platform
-build-libs-all:
- $(BUILD_SCRIPT) clr.nativeaotruntime+clr.nativeaotlibs+libs -c $(BUILD_CONFIG) -os $(TARGET_OS) -arch $(TARGET_ARCH)
-
build-libs-all-packs:
$(BUILD_SCRIPT) clr.nativeaotruntime+clr.nativeaotlibs+libs+packs -c $(BUILD_CONFIG) -os $(TARGET_OS) -arch $(TARGET_ARCH) /p:BuildNativeAOTRuntimePack=true
<RuntimeIdentifier>$(TargetOS)-$(TargetArchitecture)</RuntimeIdentifier>
<AppName>HelloiOS</AppName>
<UseNativeAOTRuntime Condition="'$(UseNativeAOTRuntime)' == ''">true</UseNativeAOTRuntime>
- <PublishDir Condition="'$(PublishDir)' == ''">$(OutputPath)/publish</PublishDir>
<NativeLib>static</NativeLib>
<CustomNativeMain>true</CustomNativeMain>
<!-- Escape NativeAOT bundling targets -->
<Target Name="ConfigureIlcPathsForiOSCrossCompilation" Condition="'$(PublishAotUsingRuntimePack)' != 'true'"
BeforeTargets="SetupProperties">
<PropertyGroup>
- <IlcPath>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'artifacts', 'bin', 'coreclr', '$(TargetOS).$(TargetArchitecture).$(CoreCLRConfiguration)', '$(BuildArchitecture)' ,'ilc'))</IlcPath>
- <IlcToolsPath>$(IlcPath)</IlcToolsPath>
+ <IlcToolsPath>$(CoreCLRCrossILCompilerDir)</IlcToolsPath>
<IlcSdkPath>$(CoreCLRAotSdkDir)</IlcSdkPath>
<IlcFrameworkPath>$(LibrariesAllBinArtifactsPath)</IlcFrameworkPath>
<IlcFrameworkNativePath>$(LibrariesAllBinArtifactsPath)</IlcFrameworkNativePath>
DependsOnTargets="IlcCompile;CopyFilesToPublishDirectory">
<PropertyGroup>
- <AppDir>$(MSBuildThisFileDirectory)$(PublishDir)\app</AppDir>
+ <AppDir>$(MSBuildThisFileDirectory)$(OutputPath)\Bundle</AppDir>
<Optimized Condition="'$(Configuration)' == 'Release'">True</Optimized>
<StripDebugSymbols Condition="'$(StripDebugSymbols)' == ''">false</StripDebugSymbols>
<DevTeamProvisioning Condition="'$(TargetOS)' == 'maccatalyst' and '$(DevTeamProvisioning)' == ''">adhoc</DevTeamProvisioning>
InvariantGlobalization="$(InvariantGlobalization)"
EnableAppSandbox="$(EnableAppSandbox)"
StripSymbolTable="$(StripDebugSymbols)"
- AppDir="$(MSBuildThisFileDirectory)$(PublishDir)"
+ AppDir="$(MSBuildThisFileDirectory)$(OutputPath)"
ExtraLinkerArguments="@(ExtraLinkerArguments)" >
<Output TaskParameter="AppBundlePath" PropertyName="AppBundlePath" />
<Output TaskParameter="XcodeProjectPath" PropertyName="XcodeProjectPath" />
[button addTarget:self action:@selector(buttonClicked:) forControlEvents:UIControlEventTouchUpInside];
[button setFrame:CGRectMake(50, 300, 200, 50)];
[button setTitle:@"Click me (wire me up)" forState:UIControlStateNormal];
- [button setExclusiveTouch:YES];
[self.view addSubview:button];
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
CLRTestExpectedExitCode=0
]]>
</BashCLRTestLaunchCmds>
- <BashCLRTestLaunchCmds Condition="'$(CLRTestKind)' == 'BuildAndRun' And ('$(TargetOS)' == 'iossimulator' or '$(TargetOS)' == 'ios' or '$(TargetOS)' == 'tvos' or '$(TargetOS)' == 'tvossimulator')">
+ <BashCLRTestLaunchCmds Condition="'$(CLRTestKind)' == 'BuildAndRun' and ('$(TargetOS)' == 'iossimulator' or '$(TargetOS)' == 'ios' or '$(TargetOS)' == 'tvos' or '$(TargetOS)' == 'tvossimulator' or '$(TargetOS)' == 'maccatalyst')">
<![CDATA[
__Command=""
if [ ! -z ${__TestDotNetCmd+x} ] %3B then
<RunWithAndroid Condition="'$(TargetOS)' == 'android'">true</RunWithAndroid>
<RunWithiOS>false</RunWithiOS>
- <RunWithiOS Condition="'$(TargetOS)' == 'ios' or '$(TargetOS)' == 'iossimulator' or '$(TargetOS)' == 'tvos' or '$(TargetOS)' == 'tvossimulator'">true</RunWithiOS>
+ <RunWithiOS Condition="'$(TargetOS)' == 'ios' or '$(TargetOS)' == 'iossimulator' or '$(TargetOS)' == 'tvos' or '$(TargetOS)' == 'tvossimulator' or '$(TargetOS)' == 'maccatalyst'">true</RunWithiOS>
<MonoAot>false</MonoAot>
<MonoAot Condition="'$(__MonoAot)' == '1'">true</MonoAot>
<SkipTestUtilitiesReference>true</SkipTestUtilitiesReference>
</PropertyGroup>
+ <PropertyGroup Condition="'$(RuntimeFlavor)' == 'coreclr' and '$(TargetsAppleMobile)' == 'true'">
+ <_targetOS>$(TargetOS)</_targetOS>
+ <UseNativeAOTRuntime>true</UseNativeAOTRuntime>
+ <NativeLib>static</NativeLib>
+ <CustomNativeMain>true</CustomNativeMain>
+ <_IsApplePlatform Condition="'$(TargetsAppleMobile)' == 'true'">true</_IsApplePlatform>
+ <_IsiOSLikePlatform Condition="'$(TargetsAppleMobile)' == 'true'">true</_IsiOSLikePlatform>
+ <DsymUtilOptions Condition="'$(_IsApplePlatform)' == 'true'">--flat</DsymUtilOptions>
+ <_SymbolPrefix Condition="'$(_IsApplePlatform)' == 'true'">_</_SymbolPrefix>
+ </PropertyGroup>
+
<Import Project="$(RepositoryEngineeringDir)testing\tests.props" Condition="'$(IsTestsCommonProject)' != 'true'" />
<Import Project="$(BaseOutputPath)\packages\Common\test_dependencies\test_dependencies\test_dependencies.*.props" Condition="'$(IsTestsCommonProject)' != 'true'" />
</Project>
<TrimMode Condition="'$(EnableAggressiveTrimming)' != 'true'">partial</TrimMode>
<IlcToolsPath>$(CoreCLRILCompilerDir)</IlcToolsPath>
- <IlcToolsPath Condition="'$(TargetArchitecture)' != '$(BuildArchitecture)'">$(CoreCLRCrossILCompilerDir)</IlcToolsPath>
+ <IlcToolsPath Condition="'$(TargetArchitecture)' != '$(BuildArchitecture)' or '$(TargetOS)' != '$(HostOS)'">$(CoreCLRCrossILCompilerDir)</IlcToolsPath>
<IlcBuildTasksPath>$(CoreCLRILCompilerDir)netstandard/ILCompiler.Build.Tasks.dll</IlcBuildTasksPath>
<IlcSdkPath>$(CoreCLRAotSdkDir)</IlcSdkPath>
<IlcFrameworkPath>$(MicrosoftNetCoreAppRuntimePackRidLibTfmDir)</IlcFrameworkPath>
<Import Project="Directory.Build.targets" />
<Import Project="xunit-wrappers.targets" />
+ <Import Project="$(MonoProjectRoot)\msbuild\apple\build\AppleBuild.props" />
+ <Import Project="$(MonoProjectRoot)\msbuild\apple\build\AppleBuild.InTree.targets" />
+
<PropertyGroup>
<XunitTestBinBase Condition="'$(XunitTestBinBase)'==''" >$(BaseOutputPathWithConfig)</XunitTestBinBase>
<XunitWrapperGeneratedCSDirBase>$(XunitTestBinBase)\TestWrappers\</XunitWrapperGeneratedCSDirBase>
<ItemGroup Condition="'@(LegacyRunnableTestPaths)' != ''">
<LegacyRunnableTestPaths Separator="$([System.String]::Copy('%(LegacyRunnableTestPaths.Identity)').IndexOfAny('\\/', $(XunitTestBinBase.Length)))" />
<LegacyRunnableTestPaths SecondSeparator="$([System.String]::Copy('%(LegacyRunnableTestPaths.Identity)').IndexOfAny('\\/', $([MSBuild]::Add(%(LegacyRunnableTestPaths.Separator), 1))))" />
+ <LegacyRunnableTestPaths ThirdSeparator="$([System.String]::Copy('%(LegacyRunnableTestPaths.Identity)').IndexOfAny('\\/', $([MSBuild]::Add(%(LegacyRunnableTestPaths.SecondSeparator), 1))))" />
<LegacyRunnableTestPaths Separator="%(LegacyRunnableTestPaths.SecondSeparator)" Condition="'%(LegacyRunnableTestPaths.SecondSeparator)' != '-1'" />
+ <LegacyRunnableTestPaths Separator="%(LegacyRunnableTestPaths.ThirdSeparator)" Condition="'%(LegacyRunnableTestPaths.ThirdSeparator)' != '-1' and '$(TestBuildMode)' == 'nativeaot' and '$(TargetsAppleMobile)' == 'true'" />
<TestDirectoriesWithDup Include="$([System.String]::Copy('%(LegacyRunnableTestPaths.Identity)').Substring(0, %(LegacyRunnableTestPaths.Separator)))" />
</ItemGroup>
<UsingTask TaskName="AppleAppBuilderTask" AssemblyFile="$(AppleAppBuilderTasksAssemblyPath)" />
<UsingTask TaskName="MonoAOTCompiler" AssemblyFile="$(MonoAOTCompilerTasksAssemblyPath)" />
- <Target Name="BuildiOSApp">
+ <Target Name="BuildMonoiOSApp">
<PropertyGroup>
<CMDDIR_Grandparent>$([System.IO.Path]::GetDirectoryName($([System.IO.Path]::GetDirectoryName($(_CMDDIR)))))</CMDDIR_Grandparent>
<CategoryWithSlash>$([System.String]::Copy('$(_CMDDIR)').Replace("$(CMDDIR_Grandparent)/",""))</CategoryWithSlash>
<Message Importance="High" Text="App: $(FinalPath)" />
</Target>
+
+ <!-- This target builds a Native AOT iOS App -->
+ <Target Name="BuildNativeAOTiOSApp" DependsOnTargets="SetupOSSpecificProps">
+ <PropertyGroup>
+ <CategoryPath>$([System.IO.Path]::GetDirectoryName($([System.IO.Path]::GetDirectoryName($(_CMDDIR)))))</CategoryPath>
+ <CategoryName>$([System.IO.Path]::GetFileName($(CategoryPath)))</CategoryName>
+ <TestRelativePath>$(CategoryName)/$([System.String]::Copy('$(_CMDDIR)').Replace("$(CategoryPath)/",""))</TestRelativePath>
+ <TestName>$([System.IO.Path]::GetFileName($(_CMDDIR)))</TestName>
+ <AppName>$([System.String]::Copy('$(TestRelativePath)').Replace('/','_'))</AppName>
+ <AppleBuildDir>$(IntermediateOutputPath)\iOSApps\$(AppName)</AppleBuildDir>
+ <FinalPath>$(XUnitTestBinBase)$(TestRelativePath)\$(AppName).app</FinalPath>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <NativeDependencies>$(IntermediateOutputPath)\..\$(TestRelativePath)\$(TestName)\native\$(TestName).o</NativeDependencies>
+ <DevTeamProvisioning>-</DevTeamProvisioning>
+ <AppleGenerateAppBundle>true</AppleGenerateAppBundle>
+ <GenerateXcodeProject>true</GenerateXcodeProject>
+ <AppleBundleDir>$(AppDir)</AppleBundleDir>
+ <RunAOTCompilation>false</RunAOTCompilation>
+ <MonoForceInterpreter>false</MonoForceInterpreter>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <_LinkerFlagsToDrop Include="@(NativeFramework->'-framework %(Identity)')" />
+ <LinkerArg Remove="@(_LinkerFlagsToDrop)" />
+ <ExtraAppLinkerArgs Include="@(LinkerArg)" />
+ <GlobalizationNativeLibs Include="$(MicrosoftNetCoreAppRuntimePackDir)runtimes/$(TargetOS)-$(TargetArchitecture)/native/icudt.dat" />
+ </ItemGroup>
+
+ <RemoveDir Directories="$(AppleBuildDir)" />
+ <RemoveDir Directories="$(AppDir)" />
+ <MakeDir Directories="$(AppleBuildDir)" />
+
+ <Copy
+ SourceFiles="@(GlobalizationNativeLibs)"
+ DestinationFolder="$(AppleBuildDir)" />
+ </Target>
+
+ <!-- This target moves app bundles to the payload directory -->
+ <Target Name="AfterAppleBuild">
+ <!-- Apparently MSBuild cannot move directories and recursively copying a
+ a directory requires writing some sort of recursive traversal
+ logic yourself. -->
+ <ItemGroup>
+ <RecursiveCopyHack Include="$(AppBundlePath)/**/*.*" />
+ </ItemGroup>
+ <MakeDir Directories="$(FinalPath)" />
+ <Copy SourceFiles="@(RecursiveCopyHack)" DestinationFolder="$(FinalPath)/%(RecursiveDir)" />
+ <RemoveDir Directories="$(AppBundlePath)" />
+ <Message Importance="High" Text="Final app: $(FinalPath)" />
+ </Target>
+
<Target Name="BuildAlliOSApp" DependsOnTargets="GetListOfTestCmds;FindCmdDirectories">
<ItemGroup>
<RunProj Include="$(MSBuildProjectFile)">
</ItemGroup>
<MSBuild
Projects="@(RunProj)"
- Targets="BuildiOSApp"
+ Targets="BuildMonoiOSApp"
BuildInParallel="true"
- Condition="'@(TestDirectories)' != ''"
- />
+ Condition="'@(TestDirectories)' != '' and '$(TestBuildMode)' != 'nativeaot'"
+ />
+
+ <MSBuild
+ Projects="@(RunProj)"
+ Targets="BuildNativeAOTiOSApp;_AppleGenerateAppBundle;AfterAppleBuild"
+ BuildInParallel="true"
+ Condition="'@(TestDirectories)' != '' and '$(TestBuildMode)' == 'nativeaot'"
+ />
</Target>
<Target Name="GetListOfTestCmds">
result = Fail;
}
- TestLinqExpressions.Run();
+ // ActiveIssue https://github.com/dotnet/runtime/issues/87924
+ if (!OperatingSystem.IsIOS() && !OperatingSystem.IsTvOS() && !OperatingSystem.IsMacCatalyst())
+ {
+ TestLinqExpressions.Run();
+ }
+
TestDefaultInterfaceMethods.Run();
return result;