Run NativeAot tests on arm64 (#82307)
authorSven Boemer <sbomer@gmail.com>
Fri, 5 May 2023 19:39:36 +0000 (12:39 -0700)
committerGitHub <noreply@github.com>
Fri, 5 May 2023 19:39:36 +0000 (12:39 -0700)
Adds arm64 build and run of NativeAot smoke tests

eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml
eng/pipelines/coreclr/nativeaot-post-build-steps.yml
eng/pipelines/runtime.yml
src/tests/Directory.Build.targets

index f107350..d7864c3 100644 (file)
@@ -31,14 +31,12 @@ parameters:
 
 steps:
   - ${{ if eq(parameters.osGroup, 'windows') }}:
-    - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) ci ${{ parameters.archType }} $(buildConfigUpper) $(priorityArg) $(runtimeFlavorArgs) ${{ parameters.testBuildArgs }} $(runtimeVariantArg) /p:LibrariesConfiguration=${{ coalesce(parameters.liveLibrariesBuildConfig, parameters.buildConfig) }}
+    - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) $(crossArg) ci ${{ parameters.archType }} $(buildConfigUpper) $(priorityArg) $(runtimeFlavorArgs) ${{ parameters.testBuildArgs }} $(runtimeVariantArg) /p:LibrariesConfiguration=${{ coalesce(parameters.liveLibrariesBuildConfig, parameters.buildConfig) }}
       displayName: Build Tests
   - ${{ if ne(parameters.osGroup, 'windows') }}:
     - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) $(crossArg) ci os ${{ parameters.osGroup }} ${{ parameters.archType }} $(buildConfigUpper) $(priorityArg) $(runtimeFlavorArgs) ${{ parameters.testBuildArgs }} $(runtimeVariantArg) /p:LibrariesConfiguration=${{ coalesce(parameters.liveLibrariesBuildConfig, parameters.buildConfig) }}
       displayName: Build Tests
 
-
-
   # Build a Mono LLVM AOT cross-compiler for non-amd64 targets (in this case, just arm64)
   - ${{ if and(eq(parameters.runtimeFlavor, 'mono'), or(eq(parameters.runtimeVariant, 'llvmaot'), eq(parameters.runtimeVariant, 'llvmfullaot'))) }}:
     - ${{ if eq(parameters.archType, 'arm64') }}:
index 491e663..c3d65b8 100644 (file)
@@ -8,9 +8,6 @@ parameters:
   liveLibrariesBuildConfig: ''
 
 steps:
-# Can't run arm/arm64 tests on x64 build machines
-- ${{ if and(ne(parameters.archType, 'arm'), ne(parameters.archType, 'arm64')) }}:
-
   # Build coreclr native test output and send to helix
   - template: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml
     parameters:
@@ -25,7 +22,10 @@ steps:
       helixQueues: ${{ parameters.helixQueues }}
       liveLibrariesBuildConfig: ${{ parameters.liveLibrariesBuildConfig }}
 
-  # Publishing tooling doesn't support different configs between runtime and libs, so only run tests in Release config
-  - ${{ if eq(parameters.buildConfig, 'release') }}:
-    - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -ci -arch ${{ parameters.archType }} $(_osParameter) -s libs.tests -c $(_BuildConfig) $(crossArg) /p:TestAssemblies=false /p:RunNativeAotTestApps=true $(_officialBuildParameter) /bl:$(Build.SourcesDirectory)/artifacts/log/$(buildConfigUpper)/NativeAotTests.binlog ${{ parameters.extraTestArgs }}
-      displayName: Run NativeAot Library Tests
+  # Can't run arm/arm64 tests on x64 build machines
+  - ${{ if and(ne(parameters.archType, 'arm'), ne(parameters.archType, 'arm64')) }}:
+
+    # Publishing tooling doesn't support different configs between runtime and libs, so only run tests in Release config
+    - ${{ if eq(parameters.buildConfig, 'release') }}:
+      - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -ci -arch ${{ parameters.archType }} $(_osParameter) -s libs.tests -c $(_BuildConfig) $(crossArg) /p:TestAssemblies=false /p:RunNativeAotTestApps=true $(_officialBuildParameter) /bl:$(Build.SourcesDirectory)/artifacts/log/$(buildConfigUpper)/NativeAotTests.binlog ${{ parameters.extraTestArgs }}
+        displayName: Run NativeAot Library Tests
index 4ad81e6..36c9107 100644 (file)
@@ -271,6 +271,9 @@ extends:
           - linux_x64
           - windows_x64
           - osx_x64
+          - linux_arm64
+          - windows_arm64
+          - osx_arm64
           variables:
           - name: timeoutPerTestInMinutes
             value: 60
@@ -313,7 +316,7 @@ extends:
           jobParameters:
             testGroup: innerloop
             isSingleFile: true
-            nameSuffix: NativeAOT
+            nameSuffix: NativeAOT_Libraries
             buildArgs: -s clr.aot+host.native+libs+libs.tests -c $(_BuildConfig) /p:TestNativeAot=true /p:RunSmokeTestsOnly=true /p:ArchiveTests=true
             timeoutInMinutes: 240 # Doesn't actually take long, but we've seen the ARM64 Helix queue often get backlogged for 2+ hours
             # extra steps, run tests
index 098c7ea..6a6bdcb 100644 (file)
     <TrimMode Condition="'$(EnableAggressiveTrimming)' != 'true'">partial</TrimMode>
 
     <IlcToolsPath>$(CoreCLRILCompilerDir)</IlcToolsPath>
+    <IlcToolsPath Condition="'$(TargetArchitecture)' != '$(BuildArchitecture)'">$(CoreCLRCrossILCompilerDir)</IlcToolsPath>
     <IlcBuildTasksPath>$(CoreCLRILCompilerDir)netstandard/ILCompiler.Build.Tasks.dll</IlcBuildTasksPath>
     <IlcSdkPath>$(CoreCLRAotSdkDir)</IlcSdkPath>
     <IlcFrameworkPath>$(MicrosoftNetCoreAppRuntimePackRidLibTfmDir)</IlcFrameworkPath>