Skip to content

Commit

Permalink
Migrate PR build to Azure Pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
heaths committed Dec 19, 2018
1 parent 2f75494 commit ff89f2f
Show file tree
Hide file tree
Showing 7 changed files with 99 additions and 173 deletions.
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"files.associations": {
"inc/build.yml": "azure-pipelines",
".vsts-ci.yml": "azure-pipelines",
"azure-pipelines.yml": "azure-pipelines"
}
}
51 changes: 12 additions & 39 deletions .vsts-ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (C) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license. See LICENSE.txt in the project root for license information.

queue:
name: MicroBuildV2Pool
timeoutInMinutes: 120
Expand All @@ -6,55 +9,25 @@ queue:
- visualstudio
- vstest

variables:
solution: '**\*.sln'

steps:
- task: NuGetInstaller@0
inputs:
solution: $(solution)
versionSpec: 4.1.0

- task: MicroBuildSigningPlugin@1
- task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@1
displayName: Install signing plugin
inputs:
signType: $(SignType)
esrpSigning: true

- task: VSBuild@1
inputs:
solution: $(solution)
vsVersion: 14.0
configuration: $(BuildConfiguration)
platform: $(BuildPlatform)
maximumCpuCount: true

- task: VSTest@2
inputs:
testAssemblyVer2: |
**\*test*.dll
!**\obj\**
searchFolder: $(Build.SourcesDirectory)\bin\$(BuildConfiguration)
vsTestVersion: 14.0
runInParallel: true
codeCoverageEnabled: true
platform: $(BuildPlatform)
configuration: $(BuildConfiguration)

- task: CopyFiles@2
inputs:
SourceFolder: $(Build.SourcesDirectory)
Contents: |
bin\$(BuildConfiguration)\**
tools\**
TargetFolder: $(Build.ArtifactStagingDirectory)\out
- template: inc/build.yml
parameters:
BuildConfiguration: $(BuildConfiguration)
BuildPlatform: $(BuildPlatform)

- task: PublishBuildArtifacts@1
displayName: Publish build
inputs:
PathtoPublish: $(Build.ArtifactStagingDirectory)\out
ArtifactName: drop
publishLocation: Container

- task: MicroBuildCleanup@1
- task: ms-vseng.MicroBuildTasks.521a94ea-9e68-468a-8167-6dcf361ea776.MicroBuildCleanup@1
displayName: Clean up
condition: succeededOrFailed()

# vim: set ai et st=2 sts=2 sw=2:
34 changes: 0 additions & 34 deletions appveyor.yml

This file was deleted.

27 changes: 27 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright (C) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license. See LICENSE.txt in the project root for license information.

trigger: none

pr:
branches:
include:
- master
- develop
paths:
exclude:
- CONTRIBUTING.md
- README.md

pool:
vmImage: vs2017-win2016

variables:
BuildConfiguration: Release
BuildPlatform: x86

steps:
- template: inc/build.yml
parameters:
BuildConfiguration: $(BuildConfiguration)
BuildPlatform: $(BuildPlatform)
43 changes: 43 additions & 0 deletions inc/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Copyright (C) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license. See LICENSE.txt in the project root for license information.

parameters:
BuildConfiguration: Release
BuildPlatform: x86
TreatWarningsAsErrors: true

steps:
- task: NuGetToolInstaller@0
displayName: Install nuget
inputs:
versionSpec: '4.1.0'

- task: NuGetCommand@2
displayName: Restore packages
inputs:
restoreSolution: '**\*.sln'
feedsToUse: config
nugetConfigPath: nuget.config

- task: VSBuild@1
displayName: Build
inputs:
configuration: ${{ parameters.BuildConfiguration }}
platform: ${{ parameters.BuildPlatform }}
maximumCpuCount: true

- task: VSTest@2
displayName: Test
inputs:
configuration: ${{ parameters.BuildConfiguration }}
platform: ${{ parameters.BuildPlatform }}
testAssemblyVer2: |
bin\$(BuildConfiguration)\*.test.dll
runInParallel: true
codeCoverageEnabled: true

- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: bin\${{ parameters.BuildConfiguration }}
ArtifactName: drop
publishLocation: Container
10 changes: 10 additions & 0 deletions nuget.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<solution>
<add key="disableSourceControlIntegration" value="true" />
</solution>
<packageSources>
<clear />
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>
100 changes: 0 additions & 100 deletions tools/Publish-Release.ps1

This file was deleted.

0 comments on commit ff89f2f

Please sign in to comment.