Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ServiceHub core host integration test CI #57228

Merged
merged 4 commits into from
Oct 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions azure-pipelines-integration-corehost.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Separate pipeline from normal integration CI to allow branches to change legs
genlu marked this conversation as resolved.
Show resolved Hide resolved

# 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a matrix so we test both Release and Debug configurations. See example

- job: VS_Integration
pool:
name: $(poolName)
queue: $(queueName)
strategy:
maxParallel: 4
matrix:
debug_32:
_configuration: Debug
_oop64bit: false
debug_64:
_configuration: Debug
_oop64bit: true
release_32:
_configuration: Release
_oop64bit: false
release_64:
_configuration: Release
_oop64bit: true
timeoutInMinutes: 135
steps:
- template: eng/pipelines/test-integration-job.yml
parameters:
configuration: $(_configuration)
oop64bit: $(_oop64bit)
lspEditor: false

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to use $(poolName) in this new leg as well?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That isn't necessary. We use that for our scouting queue.


steps:
- template: eng/pipelines/test-integration-job.yml
parameters:
configuration: $(_configuration)
oop64bit: true
oopCoreClr: true
2 changes: 2 additions & 0 deletions eng/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ param (
[switch]$warnAsError = $false,
[switch]$sourceBuild = $false,
[switch]$oop64bit = $true,
[switch]$oopCoreClr = $false,
[switch]$lspEditor = $false,

# official build settings
Expand Down Expand Up @@ -635,6 +636,7 @@ function Setup-IntegrationTestRun() {
}

$env:ROSLYN_OOP64BIT = "$oop64bit"
$env:ROSLYN_OOPCORECLR = "$oopCoreClr"
$env:ROSLYN_LSPEDITOR = "$lspEditor"
}

Expand Down
11 changes: 7 additions & 4 deletions eng/pipelines/test-integration-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -19,22 +22,22 @@ 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
inputs:
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())
Expand All @@ -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())
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down