2018-11-29 13:57:52 +03:00
|
|
|
# .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
|
|
|
|
|
2019-10-10 13:20:57 +03:00
|
|
|
pool:
|
|
|
|
vmImage: 'windows-latest'
|
|
|
|
|
2019-10-10 11:45:50 +03:00
|
|
|
jobs:
|
|
|
|
- job: build_and_test
|
2019-10-10 14:20:51 +03:00
|
|
|
displayName: 'Build/test GitHub for VS and Essentials'
|
2018-11-29 13:57:52 +03:00
|
|
|
|
2019-10-10 11:45:50 +03:00
|
|
|
strategy:
|
|
|
|
maxParallel: 2
|
|
|
|
matrix:
|
|
|
|
VSMarketplace:
|
|
|
|
MatrixName: 'VSMarketplace'
|
|
|
|
IsProductComponent: false
|
|
|
|
VSInstaller:
|
|
|
|
MatrixName: 'VSInstaller'
|
|
|
|
IsProductComponent: true
|
2019-10-09 12:39:58 +03:00
|
|
|
|
2019-10-10 11:45:50 +03:00
|
|
|
variables:
|
|
|
|
githubvsSolution: 'GitHubVS.sln'
|
|
|
|
essentialsSolution: 'src\GitHub.VisualStudio.16.sln'
|
|
|
|
buildPlatform: 'Any CPU'
|
|
|
|
buildConfiguration: 'Release'
|
2018-11-29 13:57:52 +03:00
|
|
|
|
2019-10-10 11:45:50 +03:00
|
|
|
steps:
|
|
|
|
- checkout: self
|
|
|
|
submodules: true
|
2018-11-29 13:57:52 +03:00
|
|
|
|
2019-10-10 11:45:50 +03:00
|
|
|
# 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
|
2018-11-29 13:57:52 +03:00
|
|
|
|
2019-10-10 11:45:50 +03:00
|
|
|
# Instead run nuget manually.
|
2019-10-07 15:29:00 +03:00
|
|
|
|
2019-10-10 11:45:50 +03:00
|
|
|
- script: tools\nuget\nuget.exe restore $(githubvsSolution)
|
|
|
|
displayName: NuGet restore $(githubvsSolution)
|
2019-10-07 15:29:00 +03:00
|
|
|
|
2019-10-10 11:45:50 +03:00
|
|
|
- script: tools\nuget\nuget.exe restore $(essentialsSolution)
|
|
|
|
displayName: NuGet restore $(essentialsSolution)
|
2018-11-29 13:57:52 +03:00
|
|
|
|
2019-10-10 11:45:50 +03:00
|
|
|
# Ideally we'd run NerdBank.GitVersioning but that will come later. For now bump the
|
|
|
|
# version with the azure BuildId
|
|
|
|
- task: PowerShell@2
|
|
|
|
displayName: Bump version
|
|
|
|
inputs:
|
|
|
|
targetType: filePath
|
|
|
|
filePath: '$(Build.SourcesDirectory)\scripts\Bump-Version.ps1'
|
|
|
|
arguments: -BumpBuild -BuildNumber:$(Build.BuildId)
|
2018-11-29 13:57:52 +03:00
|
|
|
|
2019-10-10 11:45:50 +03:00
|
|
|
- script: mkdir $(Build.ArtifactStagingDirectory)\$(MatrixName)
|
|
|
|
displayName: Create VSIX staging directory
|
2019-10-09 17:48:48 +03:00
|
|
|
|
2019-10-10 11:45:50 +03:00
|
|
|
- task: MSBuild@1
|
|
|
|
displayName: GitHub for Visual Studio
|
|
|
|
inputs:
|
|
|
|
solution: $(githubvsSolution)
|
|
|
|
platform: '$(buildPlatform)'
|
|
|
|
configuration: '$(buildConfiguration)'
|
|
|
|
msbuildVersion: '16.0'
|
|
|
|
msbuildArguments: '/property:TargetVsixContainer=$(Build.ArtifactStagingDirectory)\$(MatrixName)\GitHub.VisualStudio.vsix;IsProductComponent=$(IsProductComponent);DeployExtension=False;GitHubVS_ClientId=$(GitHubVS_ClientId);GitHubVS_ClientSecret=$(GitHubVS_ClientSecret)'
|
2018-11-29 13:57:52 +03:00
|
|
|
|
2019-10-10 13:58:09 +03:00
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
inputs:
|
|
|
|
pathToPublish: $(Build.ArtifactStagingDirectory)
|
|
|
|
artifactName: 'vsix'
|
|
|
|
|
2019-10-10 11:45:50 +03:00
|
|
|
- task: MSBuild@1
|
|
|
|
displayName: GitHub Essentials
|
|
|
|
inputs:
|
|
|
|
solution: $(essentialsSolution)
|
|
|
|
platform: '$(buildPlatform)'
|
|
|
|
configuration: '$(buildConfiguration)'
|
|
|
|
msbuildVersion: '16.0'
|
|
|
|
msbuildArguments: '/property:TargetVsixContainer=$(Build.ArtifactStagingDirectory)\$(MatrixName)\GitHub.VisualStudio.16.vsix;IsProductComponent=$(IsProductComponent);DeployExtension=False'
|
2019-10-07 13:58:55 +03:00
|
|
|
|
2019-10-10 13:31:24 +03:00
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
inputs:
|
|
|
|
pathToPublish: $(Build.ArtifactStagingDirectory)
|
|
|
|
artifactName: 'vsix'
|
|
|
|
|
2019-10-10 11:45:50 +03:00
|
|
|
- task: VSTest@2
|
|
|
|
inputs:
|
|
|
|
searchFolder: '$(Build.SourcesDirectory)\test'
|
|
|
|
testAssemblyVer2: '**\bin\**\*Tests.dll'
|
|
|
|
platform: '$(buildPlatform)'
|
|
|
|
configuration: '$(buildConfiguration)'
|
|
|
|
diagnosticsEnabled: true
|
|
|
|
runSettingsFile: '$(Build.SourcesDirectory)\test\test.runsettings'
|