-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathazure-pipelines.yaml
125 lines (100 loc) · 3.68 KB
/
azure-pipelines.yaml
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
trigger:
batch: true
branches:
include:
- master
- releases/*
- features/*
paths:
exclude: [ 'README.md' ]
jobs:
- job: BuildLinux
pool:
vmImage: 'ubuntu-latest'
variables:
buildConfiguration: 'Release'
BUILD_PATH: '$(Build.BinariesDirectory)/mAPI-linux'
CSPROJ_PROJECT_PATH: '$(Build.BinariesDirectory)/mAPI-linux/src/Services/SPVChannels/SPVChannels.API.Rest/SPVChannels.API.Rest.csproj'
steps :
- bash: |
set -e
git clone --branch v1.1.0 --depth=1 https://github.com/electrumsv/spvchannels-reference.git $(BUILD_PATH)
displayName: 'clone'
- task: UseDotNet@2
displayName: 'Use .NET Core sdk'
inputs:
version: '3.1.x'
packageType: sdk
installationPath: $(Agent.ToolsDirectory)/dotnet
- bash: |
dotnet restore $(CSPROJ_PROJECT_PATH) --verbosity normal
displayName: 'Restore'
- bash: |
dotnet build $(CSPROJ_PROJECT_PATH) --verbosity normal
displayName: 'Build'
- bash: |
dotnet publish $(CSPROJ_PROJECT_PATH) -r linux-x64 -c $(buildConfiguration) --self-contained true -p:PublishSingleFile=true -o $(BUILD_PATH)/publish --verbosity normal
displayName: 'Publish'
- task: PublishBuildArtifacts@1
displayName: 'publish artifact'
inputs:
artifactName: 'LinuxPeerChannels'
pathtoPublish: '$(BUILD_PATH)/publish'
- job: BuildMacOSX
pool:
vmImage: 'macOS-10.15'
variables:
buildConfiguration: 'Release'
BUILD_PATH: '$(Build.BinariesDirectory)/mAPI-macosx'
CSPROJ_PROJECT_PATH: '$(Build.BinariesDirectory)/mAPI-macosx/src/Services/SPVChannels/SPVChannels.API.Rest/SPVChannels.API.Rest.csproj'
steps :
- bash: |
set -e
git clone --branch v1.1.0 --depth=1 https://github.com/electrumsv/spvchannels-reference.git $(BUILD_PATH)
displayName: 'clone'
- task: UseDotNet@2
displayName: 'Use .NET Core sdk'
inputs:
version: '3.1.x'
packageType: sdk
installationPath: $(Agent.ToolsDirectory)/dotnet
- bash: |
dotnet restore $(CSPROJ_PROJECT_PATH) --verbosity normal
displayName: 'Restore'
- bash: |
dotnet build $(CSPROJ_PROJECT_PATH) --verbosity normal
displayName: 'Build'
- bash: |
dotnet publish $(CSPROJ_PROJECT_PATH) -r osx-x64 -c $(buildConfiguration) --self-contained true -p:PublishSingleFile=true -o $(BUILD_PATH)/publish --verbosity normal
displayName: 'Publish'
- task: PublishBuildArtifacts@1
displayName: 'publish artifact'
inputs:
artifactName: 'MacOSXPeerChannels'
pathtoPublish: '$(BUILD_PATH)/publish'
- job: BuildWindows
pool:
vmImage: 'windows-latest'
variables:
buildConfiguration: 'Release'
BUILD_PATH: '$(Build.BinariesDirectory)\mAPI-windows'
CSPROJ_PROJECT_PATH: '$(Build.BinariesDirectory)\mAPI-windows\src\Services\SPVChannels\SPVChannels.API.Rest\SPVChannels.API.Rest.csproj'
steps :
- script: |
set -e
git clone --branch v1.1.0 --depth=1 https://github.com/electrumsv/spvchannels-reference.git $(BUILD_PATH)
displayName: 'clone'
- task: UseDotNet@2
displayName: 'Use .NET Core sdk'
inputs:
version: '3.1.x'
packageType: sdk
- script: |
dotnet restore $(CSPROJ_PROJECT_PATH)
dotnet publish $(CSPROJ_PROJECT_PATH) -r win-x64 -c $(buildConfiguration) -p:PublishSingleFile=true -o $(BUILD_PATH)\publish --self-contained true --verbosity normal --force
displayName: 'Publish'
- task: PublishBuildArtifacts@1
displayName: 'publish artifact'
inputs:
artifactName: 'WindowsPeerChannels'
pathtoPublish: '$(BUILD_PATH)\publish'