From c6dee21fa62d64d331b375cf50b7ec1efa7b3d87 Mon Sep 17 00:00:00 2001 From: Ivan Diaz Date: Mon, 24 Jul 2023 14:13:03 -0700 Subject: [PATCH 01/10] First attempt at enabling TestReadyToRun for libraries in the CI. --- eng/pipelines/runtime.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index ade994eb08c6a7..44e03a6e7dcdfb 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -336,6 +336,36 @@ extends: eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), eq(variables['isFullMatrix'], true)) + # + # CoreCLR ReadyToRun release build and libraries tests + # Only when CoreCLR or library is changed + # + - 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 + platforms: + - windows_arm64 + - linux_arm64 + - osx_arm64 + jobParameters: + testGroup: innerloop + isSingleFile: false + nameSuffix: ReadyToRun_Libraries + buildArgs: -s clr+host.native+libs+libs.tests -c $(_BuildConfig) /p:TestReadyToRun=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 + extraStepsTemplate: /eng/pipelines/libraries/helix.yml + extraStepsParameters: + creator: dotnet-bot + testRunNamePrefixSuffix: ReadyToRun_$(_BuildConfig) + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(variables['isFullMatrix'], true)) + # Build and test clr tools - template: /eng/pipelines/common/platform-matrix.yml parameters: From 709554b60cfb80113c2996dfa84d208be8bf207a Mon Sep 17 00:00:00 2001 From: Ivan Diaz Date: Thu, 27 Jul 2023 15:21:39 -0700 Subject: [PATCH 02/10] Made the Crossgen2 command to use the dll. Doesn't work yet. This is just to save my progress... --- eng/testing/tests.singlefile.targets | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/eng/testing/tests.singlefile.targets b/eng/testing/tests.singlefile.targets index 2a0a439dd26f08..f231bb615d7932 100644 --- a/eng/testing/tests.singlefile.targets +++ b/eng/testing/tests.singlefile.targets @@ -143,11 +143,16 @@ - $(CoreCLRCrossgen2Dir)crossgen2$(ExeSuffix) + .sh + .cmd + $([MSBuild]::NormalizePath('$(RepoRoot)', 'dotnet$(ScriptSuffix)')) + $(CoreCLRCrossgen2Dir)crossgen2.dll + $(DotNetCli) $(Crossgen2ArtifactPath) + - + From 302813b80f7ddf888499cd8b5a0a0ae1c9e85d3c Mon Sep 17 00:00:00 2001 From: Ivan Diaz Date: Fri, 28 Jul 2023 16:52:19 -0700 Subject: [PATCH 03/10] Still not working. Added the necessary functionality to use the dll in our version of RunReadyToRunCompilers. Now, I just need to get this thing to use that one rather than the SDK's. --- eng/testing/tests.singlefile.targets | 8 ++--- .../Microsoft.NET.CrossGen.targets | 4 ++- .../Crossgen2Tasks/RunReadyToRunCompiler.cs | 32 +++++++++++++++++-- 3 files changed, 37 insertions(+), 7 deletions(-) diff --git a/eng/testing/tests.singlefile.targets b/eng/testing/tests.singlefile.targets index f231bb615d7932..25b86093bd1a09 100644 --- a/eng/testing/tests.singlefile.targets +++ b/eng/testing/tests.singlefile.targets @@ -143,16 +143,16 @@ - .sh + + $(DotNetCli) $(Crossgen2ArtifactPath) --> + $(CoreCLRCrossgen2Dir)crossgen2$(ExeSuffix) - + diff --git a/src/tasks/Crossgen2Tasks/Microsoft.NET.CrossGen.targets b/src/tasks/Crossgen2Tasks/Microsoft.NET.CrossGen.targets index a2912cc0822849..36c5ce9bc31d41 100644 --- a/src/tasks/Crossgen2Tasks/Microsoft.NET.CrossGen.targets +++ b/src/tasks/Crossgen2Tasks/Microsoft.NET.CrossGen.targets @@ -476,7 +476,9 @@ Copyright (c) .NET Foundation. All rights reserved. CompilationEntry="@(_ReadyToRunCompileList)" ContinueOnError="ErrorAndContinue" ReadyToRunCompositeBuildReferences="@(_ReadyToRunCompositeBuildReferences)" - ReadyToRunCompositeBuildInput="@(_ReadyToRunCompositeBuildInput)"> + ReadyToRunCompositeBuildInput="@(_ReadyToRunCompositeBuildInput)" + IsTestReadyToRun="$(TestReadyToRun)" + RepoRoot="$(RepoRoot)"> diff --git a/src/tasks/Crossgen2Tasks/RunReadyToRunCompiler.cs b/src/tasks/Crossgen2Tasks/RunReadyToRunCompiler.cs index 38ca23fedee837..514414c9cbb8cc 100644 --- a/src/tasks/Crossgen2Tasks/RunReadyToRunCompiler.cs +++ b/src/tasks/Crossgen2Tasks/RunReadyToRunCompiler.cs @@ -27,6 +27,12 @@ public class RunReadyToRunCompiler : ToolTask public string Crossgen2ExtraCommandLineArgs { get; set; } public ITaskItem[] Crossgen2PgoFiles { get; set; } + // GH Issue #85417: To enable TestReadyToRun in the CI pipelines, we need + // to be able to run Crossgen2 through the built dll, which requires + // slightly different handling. These two vars are used for that. + public bool IsTestReadyToRun { get; set; } + public string RepoRoot { get; set; } + [Output] public bool WarningsDetected { get; set; } @@ -36,6 +42,7 @@ public class RunReadyToRunCompiler : ToolTask private string _outputPDBImage; private string _createPDBCommand; private bool _createCompositeImage; + private string _dotnetScriptExtension; private bool IsPdbCompilation => !string.IsNullOrEmpty(_createPDBCommand); private bool ActuallyUseCrossgen2 => UseCrossgen2 && !IsPdbCompilation; @@ -101,17 +108,30 @@ protected override bool ValidateParameters() Log.LogError(Strings.Crossgen2ToolMissingWhenUseCrossgen2IsSet); return false; } - if (!File.Exists(Crossgen2Tool.ItemSpec)) + + // When TestReadyToRun has been passed, we need to ensure the + // Crossgen2 dll exists, as well as determine the dotnet script's + // extension according to the current platform. + string crossgen2ToolPath = Crossgen2Tool.ItemSpec; + if (IsTestReadyToRun) + { + crossgen2ToolPath = $"{crossgen2ToolPath}.dll"; + _dotnetScriptExtension = OperatingSystem.IsWindows() ? "cmd" : "sh"; + } + + if (!File.Exists(crossgen2ToolPath)) { - Log.LogError(Strings.Crossgen2ToolExecutableNotFound, Crossgen2Tool.ItemSpec); + Log.LogError(Strings.Crossgen2ToolExecutableNotFound, crossgen2ToolPath); return false; } + string hostPath = DotNetHostPath; if (!string.IsNullOrEmpty(hostPath) && !File.Exists(hostPath)) { Log.LogError(Strings.DotNetHostExecutableNotFound, hostPath); return false; } + string jitPath = Crossgen2Tool.GetMetadata(MetadataKeys.JitPath); if (!string.IsNullOrEmpty(jitPath)) { @@ -250,6 +270,14 @@ protected override string GenerateCommandLineCommands() { if (ActuallyUseCrossgen2 && !string.IsNullOrEmpty(DotNetHostPath)) { + // GH Issue #85417: For running libraries tests using ReadyToRun, + // we need to call Crossgen2's dll with the Dotnet CLI. + if (IsTestReadyToRun) + { + string dotnetCli = Path.Combine(RepoRoot, $"dotnet.{_dotnetScriptExtension}"); + return $"\"{dotnetCli} {Crossgen2Tool.ItemSpec}.dll\""; + } + return $"\"{Crossgen2Tool.ItemSpec}\""; } return null; From 6572973955c5cb814c0e43d72419e409683afe27 Mon Sep 17 00:00:00 2001 From: Ivan Diaz Date: Mon, 31 Jul 2023 15:14:29 -0700 Subject: [PATCH 04/10] Added the missing -p:Crossgen2TasksOverriden flag to the build command. --- eng/pipelines/runtime.yml | 11 +++++------ .../Microsoft.NET.CrossGen.props | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index 44e03a6e7dcdfb..609f17f65d8c2e 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -346,16 +346,15 @@ extends: helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml buildConfig: Release platforms: - - windows_arm64 - - linux_arm64 - - osx_arm64 + - windows_x64 + - linux_x64 + - osx_x64 jobParameters: testGroup: innerloop isSingleFile: false nameSuffix: ReadyToRun_Libraries - buildArgs: -s clr+host.native+libs+libs.tests -c $(_BuildConfig) /p:TestReadyToRun=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 + buildArgs: -s clr+libs+libs.tests -c $(_BuildConfig) /p:TestReadyToRun=true /p:RunSmokeTestsOnly=true /p:ArchiveTests=true /p:Crossgen2TasksOverriden=true + timeoutInMinutes: 120 extraStepsTemplate: /eng/pipelines/libraries/helix.yml extraStepsParameters: creator: dotnet-bot diff --git a/src/tasks/Crossgen2Tasks/ShimFilesSimulatingLogicInSdkRepo/Microsoft.NET.CrossGen.props b/src/tasks/Crossgen2Tasks/ShimFilesSimulatingLogicInSdkRepo/Microsoft.NET.CrossGen.props index 99dab14b360053..cddeb5aa34fff5 100644 --- a/src/tasks/Crossgen2Tasks/ShimFilesSimulatingLogicInSdkRepo/Microsoft.NET.CrossGen.props +++ b/src/tasks/Crossgen2Tasks/ShimFilesSimulatingLogicInSdkRepo/Microsoft.NET.CrossGen.props @@ -1,6 +1,6 @@ From cd37e120cdadf1e285b8009529e7a5659662ecac Mon Sep 17 00:00:00 2001 From: Ivan Diaz Date: Wed, 2 Aug 2023 14:29:31 -0700 Subject: [PATCH 06/10] Forgot to remove an unnecessary flag in the yaml... --- eng/pipelines/runtime.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index 609f17f65d8c2e..15c853f401052c 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -353,7 +353,7 @@ extends: testGroup: innerloop isSingleFile: false nameSuffix: ReadyToRun_Libraries - buildArgs: -s clr+libs+libs.tests -c $(_BuildConfig) /p:TestReadyToRun=true /p:RunSmokeTestsOnly=true /p:ArchiveTests=true /p:Crossgen2TasksOverriden=true + buildArgs: -s clr+libs+libs.tests -c $(_BuildConfig) /p:TestReadyToRun=true /p:RunSmokeTestsOnly=true /p:ArchiveTests=true timeoutInMinutes: 120 extraStepsTemplate: /eng/pipelines/libraries/helix.yml extraStepsParameters: From 4ffcf3845b89b4a59717496c5edd6d0bfa3cb72a Mon Sep 17 00:00:00 2001 From: Ivan Diaz Date: Mon, 21 Aug 2023 13:42:00 -0700 Subject: [PATCH 07/10] This might be it...! --- eng/pipelines/runtime.yml | 2 +- eng/testing/tests.singlefile.targets | 5 --- .../tests/System.Runtime.Tests.csproj | 3 -- src/libraries/tests.proj | 3 -- .../Microsoft.NET.CrossGen.targets | 4 +-- .../Crossgen2Tasks/RunReadyToRunCompiler.cs | 32 ++----------------- 6 files changed, 4 insertions(+), 45 deletions(-) diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index cc06ad82427a9b..d180f11bc2f875 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -353,7 +353,7 @@ extends: testGroup: innerloop isSingleFile: false nameSuffix: ReadyToRun_Libraries - buildArgs: -s clr+libs+libs.tests -c $(_BuildConfig) /p:TestReadyToRun=true /p:RunSmokeTestsOnly=true /p:ArchiveTests=true + buildArgs: -s clr+libs+packs+libs.tests -c $(_BuildConfig) -p:TestReadyToRun=true -p:RunSmokeTestsOnly=true -p:ArchiveTests=true timeoutInMinutes: 120 extraStepsTemplate: /eng/pipelines/libraries/helix.yml extraStepsParameters: diff --git a/eng/testing/tests.singlefile.targets b/eng/testing/tests.singlefile.targets index 25b86093bd1a09..2a0a439dd26f08 100644 --- a/eng/testing/tests.singlefile.targets +++ b/eng/testing/tests.singlefile.targets @@ -143,11 +143,6 @@ - $(CoreCLRCrossgen2Dir)crossgen2$(ExeSuffix) diff --git a/src/libraries/System.Runtime/tests/System.Runtime.Tests.csproj b/src/libraries/System.Runtime/tests/System.Runtime.Tests.csproj index 7d615dfa78120a..eb39dcf0cba85a 100644 --- a/src/libraries/System.Runtime/tests/System.Runtime.Tests.csproj +++ b/src/libraries/System.Runtime/tests/System.Runtime.Tests.csproj @@ -1,8 +1,5 @@  - - - $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-unix;$(NetCoreAppCurrent)-browser $(DefineConstants);TARGET_BROWSER diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj index 8e595203921452..7ef3d7b0235ebb 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -28,9 +28,6 @@ true - - - diff --git a/src/tasks/Crossgen2Tasks/Microsoft.NET.CrossGen.targets b/src/tasks/Crossgen2Tasks/Microsoft.NET.CrossGen.targets index 36c5ce9bc31d41..a2912cc0822849 100644 --- a/src/tasks/Crossgen2Tasks/Microsoft.NET.CrossGen.targets +++ b/src/tasks/Crossgen2Tasks/Microsoft.NET.CrossGen.targets @@ -476,9 +476,7 @@ Copyright (c) .NET Foundation. All rights reserved. CompilationEntry="@(_ReadyToRunCompileList)" ContinueOnError="ErrorAndContinue" ReadyToRunCompositeBuildReferences="@(_ReadyToRunCompositeBuildReferences)" - ReadyToRunCompositeBuildInput="@(_ReadyToRunCompositeBuildInput)" - IsTestReadyToRun="$(TestReadyToRun)" - RepoRoot="$(RepoRoot)"> + ReadyToRunCompositeBuildInput="@(_ReadyToRunCompositeBuildInput)"> diff --git a/src/tasks/Crossgen2Tasks/RunReadyToRunCompiler.cs b/src/tasks/Crossgen2Tasks/RunReadyToRunCompiler.cs index ab663c7b3e87bc..ebd5b17ee8c922 100644 --- a/src/tasks/Crossgen2Tasks/RunReadyToRunCompiler.cs +++ b/src/tasks/Crossgen2Tasks/RunReadyToRunCompiler.cs @@ -27,12 +27,6 @@ public class RunReadyToRunCompiler : ToolTask public string Crossgen2ExtraCommandLineArgs { get; set; } public ITaskItem[] Crossgen2PgoFiles { get; set; } - // GH Issue #85417: To enable TestReadyToRun in the CI pipelines, we need - // to be able to run Crossgen2 through the built dll, which requires - // slightly different handling. These two vars are used for that. - public bool IsTestReadyToRun { get; set; } - public string RepoRoot { get; set; } - [Output] public bool WarningsDetected { get; set; } @@ -42,7 +36,6 @@ public class RunReadyToRunCompiler : ToolTask private string _outputPDBImage; private string _createPDBCommand; private bool _createCompositeImage; - private string _dotnetScriptExtension; private bool IsPdbCompilation => !string.IsNullOrEmpty(_createPDBCommand); private bool ActuallyUseCrossgen2 => UseCrossgen2 && !IsPdbCompilation; @@ -108,30 +101,17 @@ protected override bool ValidateParameters() Log.LogError(Strings.Crossgen2ToolMissingWhenUseCrossgen2IsSet); return false; } - - // When TestReadyToRun has been passed, we need to ensure the - // Crossgen2 dll exists, as well as determine the dotnet script's - // extension according to the current platform. - string crossgen2ToolPath = Crossgen2Tool.ItemSpec; - if (IsTestReadyToRun) - { - crossgen2ToolPath = $"{crossgen2ToolPath}.dll"; - _dotnetScriptExtension = OperatingSystem.IsWindows() ? "cmd" : "sh"; - } - - if (!File.Exists(crossgen2ToolPath)) + if (!File.Exists(Crossgen2Tool.ItemSpec)) { - Log.LogError(Strings.Crossgen2ToolExecutableNotFound, crossgen2ToolPath); + Log.LogError(Strings.Crossgen2ToolExecutableNotFound, Crossgen2Tool.ItemSpec); return false; } - string hostPath = DotNetHostPath; if (!string.IsNullOrEmpty(hostPath) && !File.Exists(hostPath)) { Log.LogError(Strings.DotNetHostExecutableNotFound, hostPath); return false; } - string jitPath = Crossgen2Tool.GetMetadata(MetadataKeys.JitPath); if (!string.IsNullOrEmpty(jitPath)) { @@ -270,14 +250,6 @@ protected override string GenerateCommandLineCommands() { if (ActuallyUseCrossgen2 && !string.IsNullOrEmpty(DotNetHostPath)) { - // GH Issue #85417: For running libraries tests using ReadyToRun, - // we need to call Crossgen2's dll with the Dotnet CLI. - if (IsTestReadyToRun) - { - string dotnetCli = Path.Combine(RepoRoot, $"dotnet.{_dotnetScriptExtension}"); - return $"\"{dotnetCli} {Crossgen2Tool.ItemSpec}.dll\""; - } - return $"\"{Crossgen2Tool.ItemSpec}\""; } return null; From a509251169b90e1bc8aa1c40fc463cf3396cf9a4 Mon Sep 17 00:00:00 2001 From: Ivan Diaz Date: Mon, 21 Aug 2023 13:45:22 -0700 Subject: [PATCH 08/10] Forgot to restore this format change. --- src/libraries/System.Runtime/tests/System.Runtime.Tests.csproj | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libraries/System.Runtime/tests/System.Runtime.Tests.csproj b/src/libraries/System.Runtime/tests/System.Runtime.Tests.csproj index eb39dcf0cba85a..29bacddba5df44 100644 --- a/src/libraries/System.Runtime/tests/System.Runtime.Tests.csproj +++ b/src/libraries/System.Runtime/tests/System.Runtime.Tests.csproj @@ -1,5 +1,4 @@  - $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-unix;$(NetCoreAppCurrent)-browser $(DefineConstants);TARGET_BROWSER From b6a15ba68d079641194105eb54a8cbf720505173 Mon Sep 17 00:00:00 2001 From: Ivan Diaz Date: Thu, 24 Aug 2023 13:59:02 -0700 Subject: [PATCH 09/10] Added the new pipeline to runtime-coreclr crossgen2! Fingers crossed it works! --- eng/pipelines/coreclr/crossgen2.yml | 11 +++ .../libraries/libraries-test-ready-to-run.yml | 95 +++++++++++++++++++ eng/pipelines/runtime.yml | 29 ------ 3 files changed, 106 insertions(+), 29 deletions(-) create mode 100644 eng/pipelines/libraries/libraries-test-ready-to-run.yml diff --git a/eng/pipelines/coreclr/crossgen2.yml b/eng/pipelines/coreclr/crossgen2.yml index 479dfc5f1121d5..a7e3c313accadc 100644 --- a/eng/pipelines/coreclr/crossgen2.yml +++ b/eng/pipelines/coreclr/crossgen2.yml @@ -56,3 +56,14 @@ extends: readyToRun: true displayNameArgs: R2R_CG2 liveLibrariesBuildConfig: Release + + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/libraries/libraries-test-ready-to-run.yml + buildConfig: checked + platforms: + - linux_x64 + - osx_x64 + - windows_x64 + jobParameters: + libsAndPacksConfig: release diff --git a/eng/pipelines/libraries/libraries-test-ready-to-run.yml b/eng/pipelines/libraries/libraries-test-ready-to-run.yml new file mode 100644 index 00000000000000..95e367bbacb685 --- /dev/null +++ b/eng/pipelines/libraries/libraries-test-ready-to-run.yml @@ -0,0 +1,95 @@ +parameters: + archType: '' + buildConfig: '' + container: '' + dependOnEvaluatePaths: false + dependsOn: [] + isOfficialBuild: false + libsAndPacksConfig: '' + osGroup: '' + osSubgroup: '' + pool: '' + signBinaries: false + variables: {} + +jobs: + - template: /eng/common/templates/job/job.yml + parameters: + + name: ${{ format('libraries_{0}_coreclr_{1}_{2}{3}_{4}_testreadytorun', parameters.libsAndPacksConfig, parameters.buildConfig, parameters.osGroup, parameters.osSubgroup, parameters.archType) }} + + displayName: ${{ format('Libraries {0} CoreCLR {1} {2}{3} {4} TestReadyToRun', parameters.libsAndPacksConfig, parameters.buildConfig, parameters.osGroup, parameters.osSubgroup, parameters.archType) }} + + container: ${{ parameters.container }} + condition: succeeded() + helixRepo: dotnet/runtime + pool: ${{ parameters.pool }} + + dependsOn: + - ${{ if eq(parameters.dependOnEvaluatePaths, true) }}: + - evaluate_paths + - ${{ parameters.dependsOn }} + + workspace: + clean: all + + variables: + - _buildScript: ./build$(scriptExt) + - ${{ if eq(parameters.osGroup, 'windows') }}: + - _buildScript: .\build($scriptExt) + + - _preTestSubsets: clr+libs+packs + - _libsTestsSubset: libs.tests + + - _runtimeConfig: '' + - ${{ if ne(parameters.buildConfig, parameters.libsAndPacksConfig) }}: + - _runtimeConfig: -rc ${{ parameters.buildConfig }} + + - _buildArguments: -configuration ${{ parameters.libsAndPacksConfig }} + $(_runtimeConfig) + -arch ${{ parameters.archType }} + -os ${{ parameters.osGroup }} + -ci + - _libsTestsArguments: -configuration ${{ parameters.libsAndPacksConfig }} + /p:TestReadyToRun=true + /p:RunSmokeTestsOnly=true + - ${{ parameters.variables }} + + steps: + - checkout: self + clean: true + fetchDepth: $(checkoutFetchDepth) + + # When working in Apple platforms, we need to install some native dependencies. + # Currently, libraries with TestReadyToRun enabled will only be built + # in macOS from these platforms. If we decide to support iOS and/or tvOS, + # we'll have to add them to this condition. + + - ${{ if in(parameters.osGroup, 'osx') }}: + - script: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh $(osGroup) + displayName: Install Native Build Dependencies + + - ${{ if eq(parameters.isOfficialBuild, true) }}: + - template: /eng/pipelines/common/restore-internal-tools.yml + + # When working in Apple platforms, we need to keep track of the Disk Usage. + - ${{ if in(parameters.osGroup, 'osx') }}: + - script: | + du -sh $(Build.SourcesDirectory)/* + df -h + displayName: Disk Usage Before Build + + # Build CoreCLR, the Libraries, and the Packs. + - script: $(_buildScript) -subset $(_preTestSubsets) $(_buildArguments) + - displayName: Build CoreCLR, Libraries, and Packs + + # When working in Apple platforms, we need to keep track of the Disk Usage. + - ${{ if in(parameters.osGroup, 'osx') }}: + - script: | + du -sh $(Build.SourcesDirectory)/* + df -h + displayName: Disk Usage After Build + + # Build and run the libraries tests with TestReadyToRun. + - script: $(_buildScript) -subset $(_libsTestsSubset) $(_libsTestsArguments) + - displayName: Build and Run Libraries Tests with TestReadyToRun Enabled diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index d180f11bc2f875..0f1f9610c60349 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -336,35 +336,6 @@ extends: eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), eq(variables['isFullMatrix'], true)) - # - # CoreCLR ReadyToRun release build and libraries tests - # Only when CoreCLR or library is changed - # - - 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 - platforms: - - windows_x64 - - linux_x64 - - osx_x64 - jobParameters: - testGroup: innerloop - isSingleFile: false - nameSuffix: ReadyToRun_Libraries - buildArgs: -s clr+libs+packs+libs.tests -c $(_BuildConfig) -p:TestReadyToRun=true -p:RunSmokeTestsOnly=true -p:ArchiveTests=true - timeoutInMinutes: 120 - extraStepsTemplate: /eng/pipelines/libraries/helix.yml - extraStepsParameters: - creator: dotnet-bot - testRunNamePrefixSuffix: ReadyToRun_$(_BuildConfig) - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(variables['isFullMatrix'], true)) - # Build and test clr tools - template: /eng/pipelines/common/platform-matrix.yml parameters: From adb8c9b5fec25bf9f881f26a02e0682a0c2c87e4 Mon Sep 17 00:00:00 2001 From: Ivan Diaz Date: Thu, 24 Aug 2023 15:09:55 -0700 Subject: [PATCH 10/10] Fixed wrong syntax in displayName's when calling scripts in the pipeline steps section. --- eng/pipelines/common/platform-matrix.yml | 2 ++ eng/pipelines/coreclr/crossgen2.yml | 4 ++-- eng/pipelines/libraries/libraries-test-ready-to-run.yml | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/eng/pipelines/common/platform-matrix.yml b/eng/pipelines/common/platform-matrix.yml index 8399c82ecd7695..404e08a7ef89cc 100644 --- a/eng/pipelines/common/platform-matrix.yml +++ b/eng/pipelines/common/platform-matrix.yml @@ -25,6 +25,7 @@ parameters: jobs: # Linux arm + - ${{ if or(containsValue(parameters.platforms, 'linux_arm'), in(parameters.platformGroup, 'all', 'gcstress')) }}: - template: xplat-setup.yml parameters: @@ -45,6 +46,7 @@ jobs: ${{ insert }}: ${{ parameters.jobParameters }} # Linux armv6 + - ${{ if containsValue(parameters.platforms, 'linux_armv6') }}: - template: xplat-setup.yml parameters: diff --git a/eng/pipelines/coreclr/crossgen2.yml b/eng/pipelines/coreclr/crossgen2.yml index a7e3c313accadc..f1fe8eecc5f295 100644 --- a/eng/pipelines/coreclr/crossgen2.yml +++ b/eng/pipelines/coreclr/crossgen2.yml @@ -60,10 +60,10 @@ extends: - template: /eng/pipelines/common/platform-matrix.yml parameters: jobTemplate: /eng/pipelines/libraries/libraries-test-ready-to-run.yml - buildConfig: checked + buildConfig: Checked platforms: - linux_x64 - osx_x64 - windows_x64 jobParameters: - libsAndPacksConfig: release + libsAndPacksConfig: Release diff --git a/eng/pipelines/libraries/libraries-test-ready-to-run.yml b/eng/pipelines/libraries/libraries-test-ready-to-run.yml index 95e367bbacb685..4cefa675c99fff 100644 --- a/eng/pipelines/libraries/libraries-test-ready-to-run.yml +++ b/eng/pipelines/libraries/libraries-test-ready-to-run.yml @@ -81,7 +81,7 @@ jobs: # Build CoreCLR, the Libraries, and the Packs. - script: $(_buildScript) -subset $(_preTestSubsets) $(_buildArguments) - - displayName: Build CoreCLR, Libraries, and Packs + displayName: Build CoreCLR, Libraries, and Packs # When working in Apple platforms, we need to keep track of the Disk Usage. - ${{ if in(parameters.osGroup, 'osx') }}: @@ -92,4 +92,4 @@ jobs: # Build and run the libraries tests with TestReadyToRun. - script: $(_buildScript) -subset $(_libsTestsSubset) $(_libsTestsArguments) - - displayName: Build and Run Libraries Tests with TestReadyToRun Enabled + displayName: Build and Run Libraries Tests with TestReadyToRun Enabled