Skip to content

Commit 640df60

Browse files
authored
Run NativeAot tests on arm64 (#82307)
Adds arm64 build and run of NativeAot smoke tests
1 parent d365c34 commit 640df60

File tree

4 files changed

+13
-11
lines changed

4 files changed

+13
-11
lines changed

eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,12 @@ parameters:
3131

3232
steps:
3333
- ${{ if eq(parameters.osGroup, 'windows') }}:
34-
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) ci ${{ parameters.archType }} $(buildConfigUpper) $(priorityArg) $(runtimeFlavorArgs) ${{ parameters.testBuildArgs }} $(runtimeVariantArg) /p:LibrariesConfiguration=${{ coalesce(parameters.liveLibrariesBuildConfig, parameters.buildConfig) }}
34+
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) $(crossArg) ci ${{ parameters.archType }} $(buildConfigUpper) $(priorityArg) $(runtimeFlavorArgs) ${{ parameters.testBuildArgs }} $(runtimeVariantArg) /p:LibrariesConfiguration=${{ coalesce(parameters.liveLibrariesBuildConfig, parameters.buildConfig) }}
3535
displayName: Build Tests
3636
- ${{ if ne(parameters.osGroup, 'windows') }}:
3737
- 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) }}
3838
displayName: Build Tests
3939

40-
41-
4240
# Build a Mono LLVM AOT cross-compiler for non-amd64 targets (in this case, just arm64)
4341
- ${{ if and(eq(parameters.runtimeFlavor, 'mono'), or(eq(parameters.runtimeVariant, 'llvmaot'), eq(parameters.runtimeVariant, 'llvmfullaot'))) }}:
4442
- ${{ if eq(parameters.archType, 'arm64') }}:

eng/pipelines/coreclr/nativeaot-post-build-steps.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ parameters:
88
liveLibrariesBuildConfig: ''
99

1010
steps:
11-
# Can't run arm/arm64 tests on x64 build machines
12-
- ${{ if and(ne(parameters.archType, 'arm'), ne(parameters.archType, 'arm64')) }}:
13-
1411
# Build coreclr native test output and send to helix
1512
- template: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml
1613
parameters:
@@ -25,7 +22,10 @@ steps:
2522
helixQueues: ${{ parameters.helixQueues }}
2623
liveLibrariesBuildConfig: ${{ parameters.liveLibrariesBuildConfig }}
2724

28-
# Publishing tooling doesn't support different configs between runtime and libs, so only run tests in Release config
29-
- ${{ if eq(parameters.buildConfig, 'release') }}:
30-
- 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 }}
31-
displayName: Run NativeAot Library Tests
25+
# Can't run arm/arm64 tests on x64 build machines
26+
- ${{ if and(ne(parameters.archType, 'arm'), ne(parameters.archType, 'arm64')) }}:
27+
28+
# Publishing tooling doesn't support different configs between runtime and libs, so only run tests in Release config
29+
- ${{ if eq(parameters.buildConfig, 'release') }}:
30+
- 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 }}
31+
displayName: Run NativeAot Library Tests

eng/pipelines/runtime.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,9 @@ extends:
271271
- linux_x64
272272
- windows_x64
273273
- osx_x64
274+
- linux_arm64
275+
- windows_arm64
276+
- osx_arm64
274277
variables:
275278
- name: timeoutPerTestInMinutes
276279
value: 60
@@ -313,7 +316,7 @@ extends:
313316
jobParameters:
314317
testGroup: innerloop
315318
isSingleFile: true
316-
nameSuffix: NativeAOT
319+
nameSuffix: NativeAOT_Libraries
317320
buildArgs: -s clr.aot+host.native+libs+libs.tests -c $(_BuildConfig) /p:TestNativeAot=true /p:RunSmokeTestsOnly=true /p:ArchiveTests=true
318321
timeoutInMinutes: 240 # Doesn't actually take long, but we've seen the ARM64 Helix queue often get backlogged for 2+ hours
319322
# extra steps, run tests

src/tests/Directory.Build.targets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,7 @@
527527
<TrimMode Condition="'$(EnableAggressiveTrimming)' != 'true'">partial</TrimMode>
528528

529529
<IlcToolsPath>$(CoreCLRILCompilerDir)</IlcToolsPath>
530+
<IlcToolsPath Condition="'$(TargetArchitecture)' != '$(BuildArchitecture)'">$(CoreCLRCrossILCompilerDir)</IlcToolsPath>
530531
<IlcBuildTasksPath>$(CoreCLRILCompilerDir)netstandard/ILCompiler.Build.Tasks.dll</IlcBuildTasksPath>
531532
<IlcSdkPath>$(CoreCLRAotSdkDir)</IlcSdkPath>
532533
<IlcFrameworkPath>$(MicrosoftNetCoreAppRuntimePackRidLibTfmDir)</IlcFrameworkPath>

0 commit comments

Comments
 (0)