diff --git a/azure-pipelines-integration-corehost.yml b/azure-pipelines-integration-corehost.yml new file mode 100644 index 0000000000000..8423888c6ed22 --- /dev/null +++ b/azure-pipelines-integration-corehost.yml @@ -0,0 +1,40 @@ +# Separate pipeline from normal integration CI to allow branches to change legs + +# Branches that trigger a build on commit +trigger: +- main +- main-vs-deps +- release/* +- features/* +- demos/* + +# Branches that are allowed to trigger a build via /azp run. +# Automatic building of all PRs is disabled in the pipeline's trigger page. +# See https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/github?view=azure-devops&tabs=yaml#comment-triggers +pr: +- main +- main-vs-deps +- release/* +- features/* +- demos/* + +jobs: +- job: VS_Integration_CoreHost + pool: + name: NetCorePublic-Pool + queue: $(queueName) + strategy: + maxParallel: 2 + matrix: + debug: + _configuration: Debug + release: + _configuration: Release + timeoutInMinutes: 135 + + steps: + - template: eng/pipelines/test-integration-job.yml + parameters: + configuration: $(_configuration) + oop64bit: true + oopCoreClr: true diff --git a/eng/build.ps1 b/eng/build.ps1 index 985a60ca7d178..45c15d2ab601c 100644 --- a/eng/build.ps1 +++ b/eng/build.ps1 @@ -45,6 +45,7 @@ param ( [switch]$warnAsError = $false, [switch]$sourceBuild = $false, [switch]$oop64bit = $true, + [switch]$oopCoreClr = $false, [switch]$lspEditor = $false, # official build settings @@ -635,6 +636,7 @@ function Setup-IntegrationTestRun() { } $env:ROSLYN_OOP64BIT = "$oop64bit" + $env:ROSLYN_OOPCORECLR = "$oopCoreClr" $env:ROSLYN_LSPEDITOR = "$lspEditor" } diff --git a/eng/pipelines/test-integration-job.yml b/eng/pipelines/test-integration-job.yml index 270be80acb4fe..944ab1534d2fd 100644 --- a/eng/pipelines/test-integration-job.yml +++ b/eng/pipelines/test-integration-job.yml @@ -8,6 +8,9 @@ parameters: # So in order to pass a parameter that comes from a variable these must be typed as string. type: string default: true + - name: oopCoreClr + type: string + default: false - name: lspEditor type: string default: false @@ -19,7 +22,7 @@ steps: displayName: Build and Test inputs: filePath: eng/build.ps1 - arguments: -ci -restore -build -pack -sign -publish -binaryLog -configuration ${{ parameters.configuration }} -prepareMachine -testVsi -oop64bit:$${{ parameters.oop64bit }} -collectDumps -lspEditor:$${{ parameters.lspEditor }} + arguments: -ci -restore -build -pack -sign -publish -binaryLog -configuration ${{ parameters.configuration }} -prepareMachine -testVsi -oop64bit:$${{ parameters.oop64bit }} -oopCoreClr:$${{ parameters.oopCoreClr }} -collectDumps -lspEditor:$${{ parameters.lspEditor }} - task: PublishTestResults@2 displayName: Publish xUnit Test Results @@ -27,14 +30,14 @@ steps: testRunner: XUnit testResultsFiles: $(Build.SourcesDirectory)\artifacts\TestResults\${{ parameters.configuration }}\*.xml mergeTestResults: true - testRunTitle: '$(System.JobAttempt)-Integration ${{ parameters.configuration }} OOP64_${{ parameters.oop64bit }}' + testRunTitle: '$(System.JobAttempt)-Integration ${{ parameters.configuration }} OOP64_${{ parameters.oop64bit }} OOPCoreClr_${{ parameters.oopCoreClr }}' condition: always() - task: PublishBuildArtifacts@1 displayName: Publish Logs inputs: PathtoPublish: '$(Build.SourcesDirectory)\artifacts\log\${{ parameters.configuration }}' - ArtifactName: '$(System.JobAttempt)-Logs ${{ parameters.configuration }} OOP64_${{ parameters.oop64bit }} LspEditor_${{ parameters.lspEditor }} $(Build.BuildNumber)' + ArtifactName: '$(System.JobAttempt)-Logs ${{ parameters.configuration }} OOP64_${{ parameters.oop64bit }} OOPCoreClr_${{ parameters.oopCoreClr }} LspEditor_${{ parameters.lspEditor }} $(Build.BuildNumber)' publishLocation: Container continueOnError: true condition: not(succeeded()) @@ -43,7 +46,7 @@ steps: displayName: Publish Screenshots inputs: PathtoPublish: '$(Build.SourcesDirectory)\artifacts\bin\Microsoft.VisualStudio.LanguageServices.IntegrationTests\${{ parameters.configuration }}\net472\xUnitResults' - ArtifactName: '$(System.JobAttempt)-Screenshots ${{ parameters.configuration }} OOP64_${{ parameters.oop64bit }} LspEditor_${{ parameters.lspEditor }} $(Build.BuildNumber)' + ArtifactName: '$(System.JobAttempt)-Screenshots ${{ parameters.configuration }} OOP64_${{ parameters.oop64bit }} OOPCoreClr_${{ parameters.oopCoreClr }} LspEditor_${{ parameters.lspEditor }} $(Build.BuildNumber)' publishLocation: Container continueOnError: true condition: not(succeeded()) diff --git a/src/VisualStudio/IntegrationTest/TestUtilities/VisualStudioInstanceFactory.cs b/src/VisualStudio/IntegrationTest/TestUtilities/VisualStudioInstanceFactory.cs index 2b489423dce64..f091d2f6b2c63 100644 --- a/src/VisualStudio/IntegrationTest/TestUtilities/VisualStudioInstanceFactory.cs +++ b/src/VisualStudio/IntegrationTest/TestUtilities/VisualStudioInstanceFactory.cs @@ -360,6 +360,12 @@ private static Process StartNewVisualStudioProcess(string installationPath, int Process.Start(CreateSilentStartInfo(vsRegEditExeFile, $"set \"{installationPath}\" {Settings.Default.VsRootSuffix} HKCU \"Roslyn\\Internal\\OnOff\\Features\" OOP64Bit dword 0")).WaitForExit(); } + // Configure RemoteHostOptions.OOPCoreClrFeatureFlag for testing + if (string.Equals(Environment.GetEnvironmentVariable("ROSLYN_OOPCORECLR"), "true", StringComparison.OrdinalIgnoreCase)) + { + Process.Start(CreateSilentStartInfo(vsRegEditExeFile, $"set \"{installationPath}\" {Settings.Default.VsRootSuffix} HKCU \"FeatureFlags\\Roslyn\\ServiceHubCore\" Value dword 1")).WaitForExit(); + } + _firstLaunch = false; }