Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit e8ffe6b

Browse files
committed
Setup azure pipelines without VSTest.
#2049 was opened to setup azure pipelines but `VSTest` is hanging there. MS have been investigating but until that gets resolved all our PRs have a big red X next to them. This adds a working azure-pipelines.yml setup that skips tests but should allow builds to pass.
1 parent 6eda710 commit e8ffe6b

File tree

5 files changed

+75
-1
lines changed

5 files changed

+75
-1
lines changed

azure-pipelines.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# .NET Desktop
2+
# Build and run tests for .NET Desktop or Windows classic desktop solutions.
3+
# Add steps that publish symbols, save build artifacts, and more:
4+
# https://docs.microsoft.com/azure/devops/pipelines/apps/windows/dot-net
5+
6+
pool:
7+
vmImage: 'VS2017-Win2016'
8+
9+
variables:
10+
solution: '**/*.sln'
11+
buildPlatform: 'Any CPU'
12+
buildConfiguration: 'Release'
13+
14+
steps:
15+
- task: InstallSSHKey@0
16+
inputs:
17+
hostName: github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==
18+
sshPublicKey: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCx/AxLjr4mhH7XFlbISb65GBxQnVnKh1owmAT1bK/Qt1b4/Z0SL68IvV88DpgLyKbica2giEVfKo/Z4dkO+P8M2bGXrNgazzfO910DlR+e1vt8BSU/Dbvscz0i1lsfKb3PnfSouCkQev6Th0v+hBdgkuackWgaBw22DDLkp9Uf/cAo+QYLz56p5KVctEESRRgGgIIlZyUc8OYDMSU2wQhG9x31mSyJ4ODuOZsi1RgBBHrgUb2QRhLJ9nZWfQgGBRDxGYTKLWiWIQwgSVQ9x1Az/Rei+CbPRvLcVGg+5vHt8lcu+HxEgrY4IsjXdMqosPqxQ+TT6f+G4GQDn8+IQ4wOpTVi84PkOQX3JPE2QSJwWA0AHNe5NTSns6WWYQyzxFJYBN2pLPuMnj9/+ozV3GaeQqn47WHfUH3s5IawNQPTFDxcl4qsmU66Ybfqa4eFIPEvCCp1leQcuXyDHxKLq80x1szN4kn0oyL2W0zbkwTaZG4I5l4Rto0hErUf3qx7FlZjMGEFMdJVskgnRMkKdqngF0FmSYQICpmqqYD8TydUc6jxZVOCvFF5gbqwxV/F2lk10D7FnetUNeWvpcZKbFUX4e5Ff15vibJZp4/5FUbksv+glfbPwk6tGuNj3xPFODP7KG8Y5wtcbknX11XI0vi+iL8TxL0Vk30TpZUMXWYYvQ==
19+
sshKeySecureFile: id_rsa
20+
21+
- script: git submodule init && git submodule deinit script && git submodule update
22+
displayName: Submodule init
23+
24+
# Can't use the NuGet tasks because of https://github.com/Microsoft/azure-pipelines-tasks/issues/6790
25+
#- task: NuGetToolInstaller@0
26+
#- task: NuGetCommand@2
27+
# inputs:
28+
# restoreSolution: '$(solution)'
29+
# feedsToUse: 'config'
30+
# nugetConfigPath: nuget.config
31+
32+
# Instead run nuget manually.
33+
- script: tools\nuget\nuget.exe restore
34+
displayName: NuGet restore
35+
36+
# Ideally we'd run NerdBank.GitVersioning but that will come later. For now bump the
37+
# version with the azure BuildId
38+
- task: PowerShell@2
39+
inputs:
40+
targetType: filePath
41+
filePath: '$(Build.SourcesDirectory)\scripts\Bump-Version.ps1'
42+
arguments: -BumpBuild -BuildNumber:$(Build.BuildId)
43+
displayName: Bump version
44+
45+
- task: VSBuild@1
46+
inputs:
47+
solution: GitHubVS.sln
48+
platform: '$(buildPlatform)'
49+
configuration: '$(buildConfiguration)'
50+
51+
# VSTest is hanging. Skip tests for now; we're still running Appveyor which will handle the tests.
52+
#- task: VSTest@2
53+
# inputs:
54+
# searchFolder: '$(Build.SourcesDirectory)\test'
55+
# testAssemblyVer2: '**\bin\**\*Tests.dll'
56+
# platform: '$(buildPlatform)'
57+
# configuration: '$(buildConfiguration)'
58+
# diagnosticsEnabled: true
59+
# runSettingsFile: '$(Build.SourcesDirectory)\test\test.runsettings'
60+
61+
- task: PublishBuildArtifacts@1
62+
inputs:
63+
pathtoPublish: '$(Build.SourcesDirectory)\build\Release\GitHub.VisualStudio.vsix'
64+
artifactName: 'vsix'

nuget.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<packageSources>
4-
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
4+
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
55
<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
66
<add key="vsixtesting" value="https://www.myget.org/F/vsixtesting/api/v3/index.json" />
77
<add key="Custom Packages for GHfVS" value="lib" />

src/GitHub.VisualStudio/GitHub.VisualStudio.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@
7979
<DeployExtension>False</DeployExtension>
8080
<OutputPath>..\..\build\Release\</OutputPath>
8181
</PropertyGroup>
82+
<PropertyGroup Condition="'$(BuildingInsideVisualStudio)' != 'true'">
83+
<!-- Only deploy extension when building inside Visual Studio -->
84+
<DeployExtension>False</DeployExtension>
85+
</PropertyGroup>
8286
<Import Project="..\common\signing.props" />
8387
<ItemGroup>
8488
<Reference Include="Microsoft.CSharp" />

test/test.runsettings

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<RunSettings>
3+
<RunConfiguration>
4+
<TestSessionTimeout>120000</TestSessionTimeout>
5+
</RunConfiguration>
6+
</RunSettings>

tools/nuget/NuGet.exe

1.34 MB
Binary file not shown.

0 commit comments

Comments
 (0)