This repository has been archived by the owner on Oct 9, 2020. It is now read-only.
forked from MichaCo/DnsClient.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines-ci.yml
73 lines (65 loc) · 1.81 KB
/
azure-pipelines-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: '$(Date:yyyyMMdd)$(Rev:.r)'
trigger:
- dev
- master
pr:
autoCancel: false
branches:
include:
- '*'
# pool:
# vmImage: 'windows-latest'
variables:
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
versionSuffix: 'beta-$(Build.BuildNumber)'
jobs:
- job: 'Linux'
displayName: 'Build on Ubuntu'
pool:
vmImage: 'ubuntu-latest'
steps:
- task: DotNetCoreCLI@2
inputs:
command: 'build'
projects: |
src/**/*.csproj
arguments: '-c Release -f netstandard2.0'
name: 'Build'
displayName: 'build sources'
# TODO: re-work unit tests to run without unpredictable local DNS results or run bind on those build agents?
# - task: DotNetCoreCLI@2
# inputs:
# command: 'test'
# projects: 'test/DnsClient.Tests/*.csproj'
# publishTestResults: true
# arguments: '-c Release -f netcoreapp3.0'
- job: Windows
displayName: 'Build & Test on Windows'
pool:
vmImage: 'windows-latest'
steps:
- task: DotNetCoreCLI@2
displayName: 'dotnet build'
inputs:
command: 'build'
projects: |
src/**/*.csproj
test/DnsClient.Tests/*.csproj
arguments: '-c Release'
name: 'Build'
- task: DotNetCoreCLI@2
displayName: "dotnet test"
inputs:
command: 'test'
projects: 'test/DnsClient.Tests/*.csproj'
publishTestResults: true
arguments: '-c Release --no-build --no-restore --collect "Code coverage"'
- script: 'dotnet pack src\DnsClient\DnsClient.csproj -c Release --no-build --no-restore --version-suffix $(versionSuffix) -v normal -o $(Build.ArtifactStagingDirectory)'
name: 'PackBeta'
displayName: 'dotnet pack'
- task: PublishBuildArtifacts@1
displayName: 'publish'
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: 'beta'