зеркало из https://github.com/github/VisualStudio.git
124 строки
4.1 KiB
YAML
124 строки
4.1 KiB
YAML
# .NET Desktop
|
|
# Build and run tests for .NET Desktop or Windows classic desktop solutions.
|
|
# Add steps that publish symbols, save build artifacts, and more:
|
|
# https://docs.microsoft.com/azure/devops/pipelines/apps/windows/dot-net
|
|
|
|
pool:
|
|
vmImage: 'windows-latest'
|
|
|
|
variables:
|
|
- group: GitHubVS
|
|
- name: githubvsSolution
|
|
value: 'GitHubVS.sln'
|
|
- name: essentialsSolution
|
|
value: 'src\GitHub.VisualStudio.16.sln'
|
|
- name: buildPlatform
|
|
value: 'Any CPU'
|
|
- name: buildConfiguration
|
|
value: 'Release'
|
|
|
|
jobs:
|
|
- job: build_and_test
|
|
displayName: 'Build/test GitHub for VS and Essentials'
|
|
|
|
strategy:
|
|
maxParallel: 2
|
|
matrix:
|
|
VSMarketplace:
|
|
ArtifactDirectory: '$(Build.ArtifactStagingDirectory)'
|
|
IsProductComponent: false
|
|
VSInstaller:
|
|
ArtifactDirectory: '$(Build.ArtifactStagingDirectory)\VSInstaller'
|
|
IsProductComponent: true
|
|
|
|
steps:
|
|
- checkout: self
|
|
submodules: true
|
|
|
|
# Can't use the NuGet tasks because of https://github.com/Microsoft/azure-pipelines-tasks/issues/6790
|
|
#- task: NuGetToolInstaller@0
|
|
#- task: NuGetCommand@2
|
|
# inputs:
|
|
# restoreSolution: '$(solution)'
|
|
# feedsToUse: 'config'
|
|
# nugetConfigPath: nuget.config
|
|
|
|
# Instead run nuget manually.
|
|
|
|
- task: DotNetCoreCLI@2
|
|
inputs:
|
|
command: custom
|
|
custom: tool
|
|
arguments: install --tool-path . nbgv
|
|
displayName: Install NBGV tool
|
|
|
|
- script: nbgv cloud
|
|
displayName: Set the cloud build number
|
|
|
|
- script: tools\nuget\nuget.exe restore $(githubvsSolution)
|
|
displayName: NuGet restore $(githubvsSolution)
|
|
|
|
- script: tools\nuget\nuget.exe restore $(essentialsSolution)
|
|
displayName: NuGet restore $(essentialsSolution)
|
|
|
|
- pwsh: mkdir $(ArtifactDirectory) -Force
|
|
displayName: Create VSIX staging directory
|
|
|
|
- task: MSBuild@1
|
|
displayName: GitHub for Visual Studio
|
|
inputs:
|
|
solution: $(githubvsSolution)
|
|
platform: '$(buildPlatform)'
|
|
configuration: '$(buildConfiguration)'
|
|
msbuildVersion: '16.0'
|
|
msbuildArguments: >
|
|
/p:TargetVsixContainer=$(ArtifactDirectory)\GitHub.VisualStudio.vsix
|
|
/p:IsProductComponent=$(IsProductComponent)
|
|
/p:DeployExtension=False
|
|
/p:GitHubVS_ClientId=$(GitHubVS_ClientId)
|
|
/p:GitHubVS_ClientSecret=$(GitHubVS_ClientSecret)
|
|
|
|
- task: MSBuild@1
|
|
displayName: GitHub Essentials
|
|
inputs:
|
|
solution: $(essentialsSolution)
|
|
platform: '$(buildPlatform)'
|
|
configuration: '$(buildConfiguration)'
|
|
msbuildVersion: '16.0'
|
|
msbuildArguments: >
|
|
/p:TargetVsixContainer=$(ArtifactDirectory)\GitHub.VisualStudio.16.vsix
|
|
/p:IsProductComponent=$(IsProductComponent)
|
|
/p:DeployExtension=False
|
|
|
|
- task: DownloadSecureFile@1
|
|
name: vsixsigntool_exe
|
|
inputs:
|
|
secureFile: vsixsigntool.exe
|
|
|
|
- task: DownloadSecureFile@1
|
|
name: certificate_pfx
|
|
inputs:
|
|
secureFile: certificate.pfx
|
|
|
|
- script: $(vsixsigntool_exe.secureFilePath) sign /f $(certificate_pfx.secureFilePath) /p "$(certificate_password)" /sha1 9c5a6d389e1454f2ed9ee9419cdf743689709f9c /fd sha256 /tr http://timestamp.digicert.com /td sha256 $(ArtifactDirectory)\GitHub.VisualStudio.vsix
|
|
condition: not(eq(variables['Build.Reason'], 'PullRequest'))
|
|
displayName: Sign the GitHub for Visual Studio VSIX
|
|
|
|
- script: $(vsixsigntool_exe.secureFilePath) sign /f $(certificate_pfx.secureFilePath) /p "$(certificate_password)" /sha1 9c5a6d389e1454f2ed9ee9419cdf743689709f9c /fd sha256 /tr http://timestamp.digicert.com /td sha256 $(ArtifactDirectory)\GitHub.VisualStudio.16.vsix
|
|
condition: not(eq(variables['Build.Reason'], 'PullRequest'))
|
|
displayName: Sign the GitHub Essentials VSIX
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
inputs:
|
|
pathToPublish: $(Build.ArtifactStagingDirectory)
|
|
artifactName: 'vsix'
|
|
|
|
- task: VSTest@2
|
|
inputs:
|
|
searchFolder: '$(Build.SourcesDirectory)\test'
|
|
testAssemblyVer2: '**\bin\**\*Tests.dll'
|
|
platform: '$(buildPlatform)'
|
|
configuration: '$(buildConfiguration)'
|
|
diagnosticsEnabled: true
|
|
runSettingsFile: '$(Build.SourcesDirectory)\test\test.runsettings'
|