diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index 44740dd5181d2e..305bb899368c87 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -86,21 +86,6 @@ extends: eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true), eq(variables['isRollingBuild'], true)) - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - platforms: - - osx_arm64 - jobParameters: - nameSuffix: AllSubsets_CoreCLR - buildArgs: -s clr+libs+host+packs -rc Release -c Release -lc $(_BuildConfig) - timeoutInMinutes: 120 - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - template: /eng/pipelines/common/platform-matrix.yml parameters: jobTemplate: /eng/pipelines/common/global-build-job.yml @@ -208,6 +193,36 @@ extends: eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), eq(variables['isRollingBuild'], true)) + # + # Build CoreCLR and Libraries + # For running installer tests + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: release + platforms: + - osx_arm64 + jobParameters: + nameSuffix: CoreCLR_Libraries + buildArgs: -s clr+libs -c $(_BuildConfig) + timeoutInMinutes: 120 + postBuildSteps: + - template: /eng/pipelines/common/upload-artifact-step.yml + parameters: + rootFolder: $(Build.SourcesDirectory)/artifacts/bin + includeRootFolder: false + archiveType: $(archiveType) + archiveExtension: $(archiveExtension) + tarCompression: $(tarCompression) + artifactName: CoreCLR_Libraries_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) + displayName: Build Assets + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(variables['isRollingBuild'], true)) + # # Build CoreCLR and Libraries with the respective tests # for the test configurations we run. @@ -1261,6 +1276,7 @@ extends: buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} platforms: - windows_x86 + - osx_arm64 helixQueuesTemplate: /eng/pipelines/installer/helix-queues-setup.yml jobParameters: nameSuffix: Installer_Build_And_Test diff --git a/src/installer/tests/HostActivation.Tests/FrameworkResolution/FrameworkResolution.cs b/src/installer/tests/HostActivation.Tests/FrameworkResolution/FrameworkResolution.cs index 43803b698669a4..42e724c8ad5356 100644 --- a/src/installer/tests/HostActivation.Tests/FrameworkResolution/FrameworkResolution.cs +++ b/src/installer/tests/HostActivation.Tests/FrameworkResolution/FrameworkResolution.cs @@ -33,7 +33,7 @@ public FrameworkResolution(SharedTestState sharedState) public void Default(string requestedVersion, string resolvedVersion) { CommandResult result = RunTest( - new TestSettings().WithRuntimeConfigCustomizer(rc => + new TestSettings().WithRuntimeConfigCustomizer(rc => rc.WithFramework(MicrosoftNETCoreApp, requestedVersion))); result.ShouldHaveResolvedFrameworkOrFailToFind(MicrosoftNETCoreApp, resolvedVersion); @@ -137,6 +137,12 @@ public SharedTestState() foreach (string version in EmptyVersions) Directory.CreateDirectory(Path.Combine(InstalledDotNet.SharedFxPath, version)); + // Enable test-only behaviour. We always do this - even for tests that don't need the behaviour. + // On macOS with system integrity protection enabled, if the binary is loaded, modified (test-only + // behaviour rewrites part of the binary), and loaded again, the process will crash. + // We don't bother disabling it later, as we just delete the containing folder after tests run. + _ = TestOnlyProductBehavior.Enable(InstalledDotNet.GreatestVersionHostFxrFilePath); + App = CreateFrameworkReferenceApp(); } }