diff --git a/eng/pipelines/coreclr/nativeaot-post-build-steps.yml b/eng/pipelines/coreclr/nativeaot-post-build-steps.yml new file mode 100644 index 00000000000000..15f6f53de57bef --- /dev/null +++ b/eng/pipelines/coreclr/nativeaot-post-build-steps.yml @@ -0,0 +1,35 @@ +parameters: + buildConfig: '' + archType: '' + osGroup: '' + osSubgroup: '' + platform: '' + pgoType: '' + runtimeVariant: '' + uploadTests: false + testFilter: tree nativeaot + runSingleFileTests: true + +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 + - ${{ if eq(parameters.osGroup, 'windows') }}: + - script: $(Build.SourcesDirectory)/src/tests/build.cmd nativeaot $(buildConfigUpper) ${{ parameters.archType }} ${{ parameters.testFilter }} /p:NativeAotMultimodule=true + displayName: Build tests + - ${{ if ne(parameters.osGroup, 'windows') }}: + - script: $(Build.SourcesDirectory)/src/tests/build.sh nativeaot $(buildConfigUpper) ${{ parameters.archType }} '${{ parameters.testFilter }}' + displayName: Build tests + + - ${{ if eq(parameters.runSingleFileTests, true) }}: + - ${{ if eq(parameters.osGroup, 'windows') }}: + - script: $(Build.SourcesDirectory)/src/tests/run.cmd runnativeaottests $(buildConfigUpper) ${{ parameters.archType }} + displayName: Run tests in single file mode + - ${{ if ne(parameters.osGroup, 'windows') }}: + - script: $(Build.SourcesDirectory)/src/tests/run.sh --runnativeaottests $(buildConfigUpper) ${{ parameters.archType }} + displayName: Run tests in single file mode + + - ${{ if eq(parameters.osGroup, 'windows') }}: + - script: $(Build.SourcesDirectory)/src/tests/run.sh runnativeaottests nativeaotmultimodule $(buildConfigUpper) ${{ parameters.archType }} + displayName: Run tests in multifile mode diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index 04fca6cc817093..d49bf441a853b9 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -196,6 +196,75 @@ jobs: eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr_jit.containsChange'], true), eq(variables['isFullMatrix'], true))) +# +# CoreCLR NativeAOT debug build and smoke tests +# Only when CoreCLR is changed +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: debug + platforms: + - Linux_x64 + - windows_x64 + jobParameters: + testGroup: innerloop + timeoutInMinutes: 120 + nameSuffix: NativeAOT + buildArgs: -s clr.jit+clr.tools+clr.nativeaotlibs+libs -rc $(_BuildConfig) -lc Release + extraStepsTemplate: /eng/pipelines/coreclr/nativeaot-post-build-steps.yml + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + eq(variables['isFullMatrix'], true)) + +# +# CoreCLR NativeAOT checked build and smoke tests +# Only when CoreCLR is changed +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: checked + platforms: + - windows_x64 + jobParameters: + testGroup: innerloop + timeoutInMinutes: 120 + nameSuffix: NativeAOT + buildArgs: -s clr.jit+clr.tools+clr.nativeaotlibs+libs -rc $(_BuildConfig) -lc Release + extraStepsTemplate: /eng/pipelines/coreclr/nativeaot-post-build-steps.yml + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + eq(variables['isFullMatrix'], true)) + +# +# CoreCLR NativeAOT checked build and smoke tests +# Only when CoreCLR is changed +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: release + platforms: + - Linux_x64 + - windows_x64 + - OSX_x64 + jobParameters: + testGroup: innerloop + timeoutInMinutes: 120 + nameSuffix: NativeAOT + buildArgs: -s clr.jit+clr.tools+clr.nativeaotlibs+libs -rc $(_BuildConfig) -lc Release + extraStepsTemplate: /eng/pipelines/coreclr/nativeaot-post-build-steps.yml + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + eq(variables['isFullMatrix'], true)) + # Build and test clr tools - template: /eng/pipelines/common/platform-matrix.yml parameters: diff --git a/src/coreclr/nativeaot/Runtime/inc/ModuleHeaders.h b/src/coreclr/nativeaot/Runtime/inc/ModuleHeaders.h index fa3607b93b9775..a975e3356144cb 100644 --- a/src/coreclr/nativeaot/Runtime/inc/ModuleHeaders.h +++ b/src/coreclr/nativeaot/Runtime/inc/ModuleHeaders.h @@ -10,7 +10,7 @@ struct ReadyToRunHeaderConstants { static const uint32_t Signature = 0x00525452; // 'RTR' - static const uint32_t CurrentMajorVersion = 5; + static const uint32_t CurrentMajorVersion = 6; static const uint32_t CurrentMinorVersion = 0; }; diff --git a/src/tests/Common/tests.targets b/src/tests/Common/tests.targets index fbab315d4faf02..ff6ba352e24cc7 100644 --- a/src/tests/Common/tests.targets +++ b/src/tests/Common/tests.targets @@ -69,7 +69,14 @@ $(CORE_ROOT)\corerun $(CORE_ROOT)\corerun.exe - $(DotnetRoot)/dotnet + + + dotnet --roll-forward LatestMajor + $(DotnetRoot)/dotnet + true + $(DotnetExecutable)