-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
170 lines (165 loc) · 5.5 KB
/
azure-pipelines.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
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
variables:
monoVersion: '5.20.1.34'
minorVersion: $[counter('minorVersion', 1)]
nugetVersion: '$(monoVersion)-servarr$(minorVersion)'
trigger:
branches:
include:
- master
pr:
branches:
include:
- master
stages:
- stage: Setup
displayName: Setup
jobs:
- job:
displayName: Build Variables
pool:
vmImage: 'ubuntu-20.04'
steps:
- bash: echo "##vso[build.updatebuildnumber]$NUGETVERSION"
displayName: Set Build Name
- stage: Native
dependsOn: []
displayName: Build Native Library
jobs:
- job: build
strategy:
matrix:
linux-x64:
folder: 'linux-x64'
poolName: 'Azure Pipelines'
imageName: 'ubuntu-20.04'
linux-x86:
folder: 'linux-x86'
poolName: 'Azure Pipelines'
imageName: 'ubuntu-20.04'
linux-arm:
folder: 'linux-arm'
poolName: 'Azure Pipelines'
imageName: 'ubuntu-20.04'
linux-arm-vfpv3d16:
folder: 'linux-arm-vfpv3d16'
poolName: 'Azure Pipelines'
imageName: 'ubuntu-20.04'
linux-arm64:
folder: 'linux-arm64'
poolName: 'Azure Pipelines'
imageName: 'ubuntu-20.04'
linux-musl-x64:
folder: 'linux-musl-x64'
poolName: 'Azure Pipelines'
imageName: 'ubuntu-20.04'
linux-musl-arm:
folder: 'linux-musl-arm'
poolName: 'Azure Pipelines'
imageName: 'ubuntu-20.04'
linux-musl-arm64:
folder: 'linux-musl-arm64'
poolName: 'Azure Pipelines'
imageName: 'ubuntu-20.04'
osx-x64:
folder: 'osx-x64'
poolName: 'Azure Pipelines'
imageName: 'macOS-11'
osx-arm64:
folder: 'osx-arm64'
poolName: 'Azure Pipelines'
imageName: 'macOS-11'
freebsd-x64:
folder: 'freebsd-x64'
poolName: 'FreeBSD'
imageName:
pool:
name: $(poolName)
vmImage: $(imageName)
workspace:
clean: all
steps:
- bash: |
./get_mono.sh $MONOVERSION
${FOLDER}/build.sh
displayName: Build
- publish: $(folder)/output
artifact: $(folder)
displayName: Publish libMonoPosixHelper
- stage: Package
jobs:
- job: Nuget
pool:
vmImage: 'ubuntu-20.04'
steps:
- bash: ./get_mono.sh $MONOVERSION
displayName: Download mono
- task: DownloadPipelineArtifact@2
inputs:
buildType: 'current'
artifactName: linux-x64
targetPath: externals/artifacts/linux-x64
- task: DownloadPipelineArtifact@2
inputs:
buildType: 'current'
artifactName: linux-x86
targetPath: externals/artifacts/linux-x86
- task: DownloadPipelineArtifact@2
inputs:
buildType: 'current'
artifactName: linux-arm64
targetPath: externals/artifacts/linux-arm64
- task: DownloadPipelineArtifact@2
inputs:
buildType: 'current'
artifactName: linux-arm
targetPath: externals/artifacts/linux-arm
- task: DownloadPipelineArtifact@2
inputs:
buildType: 'current'
artifactName: linux-arm-vfpv3d16
targetPath: externals/artifacts/linux-arm-vfpv3d16
- task: DownloadPipelineArtifact@2
inputs:
buildType: 'current'
artifactName: linux-musl-x64
targetPath: externals/artifacts/linux-musl-x64
- task: DownloadPipelineArtifact@2
inputs:
buildType: 'current'
artifactName: linux-musl-arm64
targetPath: externals/artifacts/linux-musl-arm64
- task: DownloadPipelineArtifact@2
inputs:
buildType: 'current'
artifactName: linux-musl-arm
targetPath: externals/artifacts/linux-musl-arm
- task: DownloadPipelineArtifact@2
inputs:
buildType: 'current'
artifactName: freebsd-x64
targetPath: externals/artifacts/freebsd-x64
- task: DownloadPipelineArtifact@2
inputs:
buildType: 'current'
artifactName: osx-x64
targetPath: externals/artifacts/osx-x64
- task: DownloadPipelineArtifact@2
inputs:
buildType: 'current'
artifactName: osx-arm64
targetPath: externals/artifacts/osx-arm64
- bash: |
ls -lR externals/artifacts
dotnet new tool-manifest
dotnet tool install Cake.Tool --version 0.38.5
dotnet cake
displayName: Build nuget
- publish: output
artifact: nuget
- task: DotNetCoreCLI@2
inputs:
command: 'push'
packagesToPush: 'output/**/*.nupkg'
nuGetFeedType: 'internal'
publishVstsFeed: '7ab38f4e-5a57-4d70-84f4-94dd9bc5d6df/9845f7c9-6c8c-4845-b5ee-58375c59e0d8'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))