forked from dotnet/iot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vsts-ci.yml
272 lines (262 loc) · 9.37 KB
/
.vsts-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
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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
variables:
- name: Build.Repository.Clean
value: true
- name: _enableTelemetry
value: true
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- name: OfficialBuildId
value: $(Build.BuildNumber)
- name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE
value: 1
- name: DOTNET_MULTILEVEL_LOOKUP
value: 0
resources:
containers:
- container: LinuxContainer
image: microsoft/dotnet-buildtools-prereqs:ubuntu-14.04-cross-0cd4667-20170319080304
trigger:
batch: true
branches:
include:
- master
pr:
- master
jobs:
- template: /eng/common/templates/job/job.yml
parameters:
agentOs: Windows_NT
name: Windows_NT
enableTelemetry: $(_enableTelemetry)
enablePublishBuildArtifacts: true
helixRepo: dotnet/iot
pool:
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
name: NetCoreInternal-Int-Pool
queue: buildpool.windows.10.amd64.vs2017
${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
name: Hosted VS2017
strategy:
matrix:
debug_configuration:
_BuildConfig: Debug
release_configuration:
_BuildConfig: Release
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
enableMicrobuild: true
steps:
- script: build.cmd -ci
-configuration $(_BuildConfig)
-prepareMachine
name: Build
displayName: Build
condition: succeeded()
- task: PublishBuildArtifacts@1
displayName: Publish Windows managed assets
inputs:
pathToPublish: $(Build.SourcesDirectory)/artifacts/bin
artifactName: bin
artifactType: container
condition: eq(variables['_BuildConfig'], 'Release')
variables:
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- _TeamName: DotNetCore
- _SignType: real
- template: /eng/common/templates/job/job.yml
parameters:
agentOs: OSX
name: OSX
enableTelemetry: $(_enableTelemetry)
enablePublishBuildArtifacts: true
helixRepo: dotnet/iot
pool:
name: Hosted macOS
strategy:
matrix:
debug_configuration:
_BuildConfig: Debug
release_configuration:
_BuildConfig: Release
steps:
- script: ./build.sh --ci
--configuration $(_BuildConfig)
--prepareMachine
name: Build
displayName: Build
condition: succeeded()
- template: /eng/common/templates/job/job.yml
parameters:
agentOs: Linux
name: Linux_libgpiod
enableTelemetry: $(_enableTelemetry)
helixRepo: dotnet/iot
pool:
name: Hosted Ubuntu 1604
steps:
- script: src/Native/copyLibgpiod.sh
name: CopyLibgpiod
displayName: Copy Libgpiod dependency from container
condition: succeeded()
- task: PublishBuildArtifacts@1
displayName: Publish Libgpiod lib assets
inputs:
pathToPublish: $(Build.SourcesDirectory)/artifacts/libgpiod/
artifactName: Libgpiod
artifactType: container
- template: /eng/common/templates/job/job.yml
parameters:
dependsOn:
- Linux_libgpiod
agentOs: Linux
name: Linux
enableTelemetry: $(_enableTelemetry)
enablePublishBuildArtifacts: true
helixRepo: dotnet/iot
pool:
name: Hosted Ubuntu 1604
container: LinuxContainer
strategy:
matrix:
debug_configuration:
_BuildConfig: Debug
release_configuration:
_BuildConfig: Release
steps:
- task: DownloadBuildArtifacts@0
displayName: Download Libgpiod assets
inputs:
artifactName: Libgpiod
downloadPath: $(Build.SourcesDirectory)/artifacts/
- script: src/Native/moveLibgpiod.sh
name: MoveLibgpiod
displayName: Move Libgpiod into crossrootfs
condition: succeeded()
- script: ROOTFS_DIR=/crossrootfs/arm ./build.sh --ci
--configuration $(_BuildConfig)
--prepareMachine
/p:BuildNative=true
name: Build
displayName: Build
condition: succeeded()
- task: PublishBuildArtifacts@1
displayName: Publish Linux native assets
inputs:
pathToPublish: $(Build.SourcesDirectory)/artifacts/bin/Native
artifactName: Native
artifactType: container
condition: eq(variables['_BuildConfig'], 'Release')
- template: /eng/common/templates/job/job.yml
parameters:
dependsOn:
- Windows_NT
- OSX
- Linux
agentOs: Windows_NT
name: BuildPackages
enableTelemetry: $(_enableTelemetry)
enablePublishBuildArtifacts: true
helixRepo: dotnet/iot
pool:
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
name: NetCoreInternal-Int-Pool
queue: buildpool.windows.10.amd64.vs2017
${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
name: Hosted VS2017
strategy:
matrix:
release_configuration:
_BuildConfig: Release
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
enableMicrobuild: true
enablePublishBuildAssets: true
steps:
- task: DownloadBuildArtifacts@0
displayName: Download Built Managed Assets
inputs:
artifactName: bin
downloadPath: $(Build.SourcesDirectory)/artifacts
- task: DownloadBuildArtifacts@0
displayName: Download Built Native Assets
inputs:
artifactName: Native
downloadPath: $(Build.SourcesDirectory)/artifacts/bin
- script: build.cmd -ci -sign
-configuration $(_BuildConfig)
-prepareMachine
-publish
/p:ProductBuild=false
/p:ToolsBuild=false
/p:SampleBuild=false
/p:BuildTests=false
/p:BuildPackages=true
$(_InternalBuildArgs)
name: Build
displayName: Build
condition: succeeded()
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- task: PublishBuildArtifacts@1
displayName: Publish Windows package assets
inputs:
pathToPublish: $(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)/Shipping
artifactName: BuiltPackageOutputs
artifactType: container
condition: eq(variables['_BuildConfig'], 'Release')
variables:
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- _TeamName: DotNetCore
- _SignType: real
- _DotNetPublishToBlobFeed : true
# DotNet-Blob-Feed provides: dotnetfeed-storage-access-key-1
# Publish-Build-Assets provides: MaestroAccessToken, BotAccount-dotnet-maestro-bot-PAT
- group: DotNet-Blob-Feed
- group: Publish-Build-Assets
- _PublishBlobFeedUrl: https://dotnetfeed.blob.core.windows.net/dotnet-iot/index.json
- _InternalBuildArgs: /p:DotNetPublishToBlobFeed=$(_DotNetPublishToBlobFeed)
/p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1)
/p:DotNetPublishBlobFeedUrl=$(_PublishBlobFeedUrl)
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- template: /eng/common/templates/job/publish-build-assets.yml
parameters:
dependsOn:
- BuildPackages
agentOs: Windows_NT
name: PublishToBlobFeed
enableTelemetry: $(_enableTelemetry)
enablePublishBuildArtifacts: true
helixRepo: dotnet/iot
pool:
name: NetCoreInternal-Int-Pool
queue: buildpool.windows.10.amd64.vs2017
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- template: /eng/common/templates/job/job.yml
parameters:
dependsOn:
- BuildPackages
agentOs: Windows_NT
name: PublishToMyGet
displayName: Publish To MyGet
continueOnError: true
enableTelemetry: $(_enableTelemetry)
helixRepo: dotnet/iot
strategy:
matrix:
release_configuration:
_BuildConfig: Release
variables:
- group: DotNet-MyGet-Publish
pool:
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
name: NetCoreInternal-Int-Pool
queue: buildpool.windows.10.amd64.vs2017
${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
name: Hosted VS2017
steps:
- task: DownloadBuildArtifacts@0
displayName: Download Built Packages
inputs:
artifactName: BuiltPackageOutputs
downloadPath: $(Build.SourcesDirectory)/artifacts/packages/pushToMyGet
- script: powershell -ExecutionPolicy ByPass -NoProfile -command "& """$(Build.SourcesDirectory)\eng\common\Build.ps1""" -restore" &&
for /f %%x in ('dir /s /b $(Build.SourcesDirectory)\artifacts\packages\pushToMyGet\*.nupkg') do dotnet nuget push %%x -k $(dotnet-myget-org-api-key) -s https://dotnet.myget.org/F/dotnet-core/
name: PublishPackages
displayName: Publishing Packages to MyGet
condition: succeeded()