forked from nanoframework/nf-interpreter
-
Notifications
You must be signed in to change notification settings - Fork 2
/
azure-pipelines.yml
494 lines (412 loc) · 24.9 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
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
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
trigger:
branches:
include: ["master", "develop*", "release-*", "refs/tags/*" ]
paths:
exclude: [ "doc", "*.md", ".gitignore", "README.md" ]
pr:
autoCancel: true
# add nf-tools repo to resources (for Azure Pipelines templates)
resources:
repositories:
- repository: templates
type: github
name: nanoframework/nf-tools
endpoint: nanoframework
jobs:
##############################
- job: Check_Build_Options
pool:
vmImage: 'windows-2019'
steps:
- checkout: self
fetchDepth: 1
# get commint message
- powershell: |
if($env:StartReleaseCandidate -like "true")
{
# this is a release prep so NO build
echo "##vso[task.setvariable variable=SKIP_BUILD;isOutput=true]true"
Write-Host "Release preparation, skipping build."
}
else
{
# get commit details, if this is a PR
if($env:System_PullRequest_PullRequestId -ne $null)
{
$commit = Invoke-RestMethod -Uri "https://api.github.com/repos/nanoframework/nf-interpreter/commits/$(Build.SourceVersion)" -ContentType "application/json" -Method GET
if( ($commit.commit.author.name -eq "nfbot") -and ($commit.commit.message -like "*[version update]*") )
{
echo "##vso[task.setvariable variable=SKIP_BUILD;isOutput=true]true"
}
else
{
echo "##vso[task.setvariable variable=SKIP_BUILD;isOutput=true]false"
}
}
else
{
echo "##vso[task.setvariable variable=SKIP_BUILD;isOutput=true]false"
}
}
name: BuildOptions
displayName: Evaluate build options
- task: DotNetCoreCLI@2
condition: eq( variables['StartReleaseCandidate'], true )
displayName: Install NBGV tool
inputs:
command: custom
custom: tool
arguments: install -g nbgv
- powershell: |
# compute authorization header in format "AUTHORIZATION: basic 'encoded token'"
# 'encoded token' is the Base64 of the string "nfbot:personal-token"
$auth = "basic $([System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes("nfbot:$(GitHubToken)"))))"
cd "$env:Agent_TempDirectory" > $null
git init "$env:Agent_TempDirectory\repo"
cd repo > $null
git remote add origin "$env:Build_Repository_Uri"
git config --global gc.auto 0
git config --global user.name nfbot
git config --global user.email [email protected]
git config --global core.autocrlf true
git -c http.extraheader="AUTHORIZATION: $auth" fetch --progress origin
git checkout develop
# prepare release and capture output
$release = nbgv prepare-release
# push all changes to github
git -c http.extraheader="AUTHORIZATION: $auth" push --all origin
# get release branch name
$branch = $release.Split(' ')[0]
# start PR for release
$prRequestBody = @{title="Release $branch";body="";head="$branch";base="master"} | ConvertTo-Json
$githubApiEndpoint = "https://api.github.com/repos/$env:Build_Repository_Name/pulls"
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$headers = @{}
$headers.Add("Authorization","$auth")
$headers.Add("Accept","application/vnd.github.symmetra-preview+json")
try
{
$result = Invoke-RestMethod -Method Post -UserAgent [Microsoft.PowerShell.Commands.PSUserAgent]::InternetExplorer -Uri $githubApiEndpoint -Header $headers -ContentType "application/json" -Body $prRequestBody
'Started PR for new release...' | Write-Host -NoNewline
'OK' | Write-Host -ForegroundColor Green
}
catch
{
$result = $_.Exception.Response.GetResponseStream()
$reader = New-Object System.IO.StreamReader($result)
$reader.BaseStream.Position = 0
$reader.DiscardBufferedData()
$responseBody = $reader.ReadToEnd();
"Error starting PR: $responseBody" | Write-Host -ForegroundColor Red
}
condition: eq( variables['StartReleaseCandidate'], true )
displayName: NBGV prepare release
##############################
- job: Check_Code_Style
condition: ne( dependencies.Check_Build_Options.outputs['BuildOptions.SKIP_BUILD'], true )
dependsOn:
- Check_Build_Options
pool:
vmImage: 'windows-2019'
steps:
- checkout: self
fetchDepth: 1
- template: azure-pipelines-templates/download-install-llvm.yml
- template: azure-pipelines-templates/check-code-style.yml
#################
# STM32
- job: Build_STM32_targets
condition: and( succeeded('Check_Code_Style'), ne( dependencies.Check_Build_Options.outputs['BuildOptions.SKIP_BUILD'], true ) )
dependsOn:
- Check_Build_Options
- Check_Code_Style
pool:
vmImage: 'windows-2019'
strategy:
matrix:
NETDUINO3_WIFI:
TargetBoard: NETDUINO3_WIFI
BuildOptions: -DTARGET_SERIES=STM32F4xx -DRTOS=CHIBIOS -DSUPPORT_ANY_BASE_CONVERSION=ON -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DNF_FEATURE_HAS_SDCARD=ON -DAPI_System.Math=ON -DAPI_Hardware.Stm32=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_System.Device.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_Windows.Devices.Adc=ON -DAPI_System.Device.Dac=OFF -DAPI_nanoFramework.Devices.OneWire=ON -DAPI_nanoFramework.ResourceManager=ON -DAPI_nanoFramework.System.Collections=ON -DAPI_nanoFramework.System.Text=ON
GccArm_Version:
NeedsDFU: true
ORGPAL_PALTHREE:
TargetBoard: ORGPAL_PALTHREE
BuildOptions: -DTARGET_SERIES=STM32F7xx -DRTOS=CHIBIOS -DCHIBIOS_CONTRIB_REQUIRED=ON -DSTM32_CUBE_PACKAGE_REQUIRED=ON -DSUPPORT_ANY_BASE_CONVERSION=ON -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DNF_FEATURE_HAS_USB_MSD=ON -DNF_FEATURE_HAS_SDCARD=ON -DNF_FEATURE_USE_SPIFFS=ON -DAPI_System.Math=ON -DAPI_Hardware.Stm32=ON -DNF_FEATURE_HAS_CONFIG_BLOCK=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_System.Device.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_Windows.Devices.Adc=ON -DAPI_System.Device.Dac=ON -DAPI_System.Net=ON -DNF_SECURITY_MBEDTLS=ON -DAPI_nanoFramework.ResourceManager=ON -DAPI_nanoFramework.System.Collections=ON -DAPI_nanoFramework.System.Text=ON
GccArm_Version:
NeedsDFU: true
ST_STM32F429I_DISCOVERY:
TargetBoard: ST_STM32F429I_DISCOVERY
BuildOptions: -DTARGET_SERIES=STM32F4xx -DRTOS=CHIBIOS -DSUPPORT_ANY_BASE_CONVERSION=ON -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DAPI_System.Math=ON -DAPI_Hardware.Stm32=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_System.Device.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_Windows.Devices.Adc=ON -DAPI_nanoFramework.Devices.OneWire=ON -DAPI_nanoFramework.Devices.Can=ON -DAPI_nanoFramework.ResourceManager=ON -DAPI_nanoFramework.System.Collections=ON -DAPI_nanoFramework.System.Text=ON
GccArm_Version:
NeedsDFU: false
ST_NUCLEO64_F091RC:
TargetBoard: ST_NUCLEO64_F091RC
BuildOptions: -DTARGET_SERIES=STM32F0xx -DRTOS=CHIBIOS -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DUSE_RNG=OFF -DNF_PLATFORM_NO_CLR_TRACE=ON -DNF_CLR_NO_IL_INLINE=ON -DAPI_Hardware.Stm32=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_System.Device.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_nanoFramework.System.Text=ON
GccArm_Version:
NeedsDFU: false
ST_STM32F769I_DISCOVERY:
TargetBoard: ST_STM32F769I_DISCOVERY
BuildOptions: -DTARGET_SERIES=STM32F7xx -DRTOS=CHIBIOS -DSUPPORT_ANY_BASE_CONVERSION=ON -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DNF_FEATURE_HAS_SDCARD=ON -DAPI_System.Math=ON -DAPI_Hardware.Stm32=ON -DNF_FEATURE_HAS_CONFIG_BLOCK=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_System.Device.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_Windows.Devices.Adc=ON -DAPI_System.Device.Dac=ON -DAPI_System.Net=ON -DNF_SECURITY_MBEDTLS=ON -DAPI_nanoFramework.Devices.OneWire=ON -DAPI_nanoFramework.Devices.Can=ON -DAPI_System.IO.FileSystem=ON -DAPI_nanoFramework.ResourceManager=ON -DAPI_nanoFramework.System.Collections=ON -DAPI_nanoFramework.System.Text=ON -DAPI_nanoFramework.Graphics=ON -DGRAPHICS_MEMORY=Graphics_Memory.cpp -DGRAPHICS_DISPLAY=Otm8009a_DSI_Video_Mode.cpp -DGRAPHICS_DISPLAY_INTERFACE=DSI_To_Display_Video_Mode.cpp -DTOUCHPANEL_DEVICE=ft6x06_I2C.cpp -DTOUCHPANEL_INTERFACE=I2C_To_TouchPanel.cpp
GccArm_Version:
NeedsDFU: false
variables:
GNU_GCC_TOOLCHAIN_PATH: $(Agent.TempDirectory)\GNU_Tools_ARM_Embedded
HelperPackageVersion: $[counter('HelperPackageVersioncounter', 0)]
steps:
- template: azure-pipelines-templates/build-preparations.yml
- template: azure-pipelines-templates/nb-gitversioning.yml
- template: azure-pipelines-templates/download-install-arm-gcc-toolchain.yml
- template: azure-pipelines-templates/download-install-ninja.yml
- template: azure-pipelines-templates/download-hexdfu.yml
- template: azure-pipelines-templates/build-chibios-stm32.yml
- template: azure-pipelines-templates/pack-publish-artifacts.yml
- template: azure-pipelines-templates/publish-bintray.yml
- template: azure-pipelines-templates/pack-publish-managed-helpers.yml
#################
# ESP32 targets
- job: Build_ESP32_targets
condition: and( succeeded('Check_Code_Style'), ne( dependencies.Check_Build_Options.outputs['BuildOptions.SKIP_BUILD'], true ) )
dependsOn:
- Check_Build_Options
- Check_Code_Style
pool:
vmImage: 'windows-2019'
# there is only a single ESP32 target, but this is already config as a matrix to make it easy to add new ones
strategy:
matrix:
ESP32_WROOM_32:
TargetBoard: ESP32_WROOM_32
BuildOptions: -DTARGET_SERIES=ESP32 -DRTOS=FREERTOS_ESP32 -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DNF_FEATURE_HAS_CONFIG_BLOCK=ON -DNF_FEATURE_HAS_SDCARD=ON -DAPI_System.Math=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_System.Device.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_Windows.Devices.Adc=ON -DAPI_System.Net=ON -DAPI_Windows.Devices.Wifi=ON -DNF_SECURITY_MBEDTLS=ON -DAPI_Hardware.Esp32=ON -DSUPPORT_ANY_BASE_CONVERSION=ON -DAPI_nanoFramework.Devices.OneWire=ON -DAPI_nanoFramework.ResourceManager=ON -DAPI_nanoFramework.System.Collections=ON -DAPI_nanoFramework.System.Text=ON -DAPI_nanoFramework.Hardware.Esp32.Rmt=ON
ESP_WROVER_KIT:
TargetBoard: ESP32_WROOM_32
BuildOptions: -DTARGET_SERIES=ESP32 -DRTOS=FREERTOS_ESP32 -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DNF_FEATURE_HAS_CONFIG_BLOCK=ON -DNF_FEATURE_HAS_SDCARD=ON -DAPI_System.Math=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_System.Device.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_Windows.Devices.Adc=ON -DAPI_System.Net=ON -DAPI_Windows.Devices.Wifi=ON -DNF_SECURITY_MBEDTLS=ON -DAPI_Hardware.Esp32=ON -DSUPPORT_ANY_BASE_CONVERSION=ON -DAPI_nanoFramework.Devices.OneWire=ON -DAPI_nanoFramework.ResourceManager=ON -DAPI_nanoFramework.System.Collections=ON -DAPI_nanoFramework.System.Text=ON -DAPI_nanoFramework.Hardware.Esp32.Rmt=ON -DAPI_nanoFramework.Graphics=ON -DGRAPHICS_DISPLAY="ILI9341_240x320_SPI.cpp" -DTOUCHPANEL_DEVICE="XPT2046.cpp" -DGRAPHICS_DISPLAY_INTERFACE="Spi_To_Display.cpp" -DTOUCHPANEL_INTERFACE="Spi_To_TouchPanel.cpp"
PackageName: ESP_WROVER_KIT
ESP32_PICO:
TargetBoard: ESP32_WROOM_32
BuildOptions: -DTARGET_SERIES=ESP32 -DRTOS=FREERTOS_ESP32 -DNF_FEATURE_DEBUGGER=ON -DTARGET_SERIAL_BAUDRATE=115200 -DTARGET_NAME=ESP32_PICO -DNF_FEATURE_RTC=ON -DNF_FEATURE_HAS_CONFIG_BLOCK=ON -DNF_FEATURE_HAS_SDCARD=ON -DAPI_System.Math=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_System.Device.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_Windows.Devices.Adc=ON -DAPI_System.Net=ON -DAPI_Windows.Devices.Wifi=ON -DNF_SECURITY_MBEDTLS=ON -DAPI_Hardware.Esp32=ON -DSUPPORT_ANY_BASE_CONVERSION=ON -DAPI_nanoFramework.ResourceManager=ON -DAPI_nanoFramework.System.Collections=ON -DAPI_nanoFramework.System.Text=ON -DAPI_nanoFramework.Hardware.Esp32.Rmt=ON
PackageName: ESP32_PICO
variables:
ESP32_TOOLCHAIN_PATH: $(Agent.TempDirectory)\ESP32_Tools\xtensa-esp32-elf
steps:
- template: azure-pipelines-templates/build-preparations.yml
- template: azure-pipelines-templates/nb-gitversioning.yml
- template: azure-pipelines-templates/download-install-esp32-build-components.yml
- template: azure-pipelines-templates/download-install-ninja.yml
- template: azure-pipelines-templates/build-esp32.yml
- task: CopyFiles@1
condition: and( succeeded(), ne(variables['Build.Reason'], 'PullRequest') )
displayName: Copying bootloader from ESP32 libs
inputs:
sourceFolder: $(ESP32_LIBS_PATH)
Contents: |
bootloader.bin
TargetFolder: '$(Build.ArtifactStagingDirectory)\$(TargetPublishName)'
flattenFolders: true
- template: azure-pipelines-templates/pack-publish-artifacts.yml
- template: azure-pipelines-templates/publish-bintray.yml
#################
# NXP
- job: Build_NXP_targets
condition: and( succeeded('Check_Code_Style'), ne( dependencies.Check_Build_Options.outputs['BuildOptions.SKIP_BUILD'], true ) )
dependsOn:
- Check_Build_Options
- Check_Code_Style
pool:
vmImage: 'windows-2019'
strategy:
matrix:
NXP_MIMXRT1060_EVK:
TargetBoard: NXP_MIMXRT1060_EVK
BuildOptions: -DTARGET_SERIES=IMXRT10xx -DRTOS=FREERTOS -DSUPPORT_ANY_BASE_CONVERSION=ON -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DNF_FEATURE_HAS_SDCARD=ON -DAPI_System.Math=ON -DNF_FEATURE_HAS_CONFIG_BLOCK=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_System.Net=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_Windows.Devices.I2c=ON -DAPI_System.Device.I2c=ON -DAPI_nanoFramework.ResourceManager=ON -DAPI_nanoFramework.System.Collections=ON -DAPI_nanoFramework.System.Text=ON
GccArm_Version:
NeedsSRECORD: true
variables:
GNU_GCC_TOOLCHAIN_PATH: $(Agent.TempDirectory)\GNU_Tools_ARM_Embedded
GIT_LFS_SKIP_SMUDGE: 1
steps:
- template: azure-pipelines-templates/build-preparations.yml
- template: azure-pipelines-templates/nb-gitversioning.yml
- template: azure-pipelines-templates/download-install-arm-gcc-toolchain.yml
- template: azure-pipelines-templates/download-install-ninja.yml
- template: azure-pipelines-templates/download-srecord.yml
- template: azure-pipelines-templates/build-freertos-nxp.yml
- template: azure-pipelines-templates/pack-publish-artifacts.yml
- template: azure-pipelines-templates/publish-bintray.yml
- template: azure-pipelines-templates/pack-publish-managed-helpers.yml
#################
# TI SimpleLink
- job: Build_TI_SimpleLink_targets
condition: and( succeeded('Check_Code_Style'), ne( dependencies.Check_Build_Options.outputs['BuildOptions.SKIP_BUILD'], true ) )
dependsOn:
- Check_Build_Options
- Check_Code_Style
pool:
vmImage: 'windows-2019'
strategy:
matrix:
# disabled: waiting to update SDK to latest version with Sys Config
# TI_CC3220SF_LAUNCHXL:
# TargetBoard: TI_CC3220SF_LAUNCHXL
# BuildOptions: -DTARGET_SERIES=CC32xx -DRTOS=TI_SIMPLELINK -DSUPPORT_ANY_BASE_CONVERSION=OFF -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DNF_FEATURE_WATCHDOG=OFF -DNF_FEATURE_HAS_CONFIG_BLOCK=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_System.Device.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=OFF -DAPI_Windows.Devices.Adc=ON -DAPI_System.Net=ON -DAPI_nanoFramework.System.Collections=ON -DAPI_nanoFramework.System.Text=ON
# GccArm_Version:
TI_CC1352R1_LAUNCHXL_868:
TargetBoard: TI_CC1352R1_LAUNCHXL
PackageName: TI_CC1352R1_LAUNCHXL_868
BuildOptions: -DTARGET_SERIES=CC13x2_26x2 -DRTOS=TI_SIMPLELINK -DRADIO_FREQUENCY=868 -DSUPPORT_ANY_BASE_CONVERSION=OFF -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DNF_FEATURE_WATCHDOG=OFF -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=OFF -DAPI_Windows.Devices.I2c=OFF -DAPI_Windows.Devices.Pwm=OFF -DAPI_Windows.Devices.SerialCommunication=OFF -DAPI_Windows.Devices.Adc=ON -DAPI_nanoFramework.TI.EasyLink=ON -DAPI_nanoFramework.Hardware.TI=ON
GccArm_Version:
TI_CC1352R1_LAUNCHXL_915:
TargetBoard: TI_CC1352R1_LAUNCHXL
PackageName: TI_CC1352R1_LAUNCHXL_915
BuildOptions: -DTARGET_SERIES=CC13x2_26x2 -DRTOS=TI_SIMPLELINK -DRADIO_FREQUENCY=915 -DSUPPORT_ANY_BASE_CONVERSION=OFF -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DNF_FEATURE_WATCHDOG=OFF -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=OFF -DAPI_Windows.Devices.I2c=OFF -DAPI_Windows.Devices.Pwm=OFF -DAPI_Windows.Devices.SerialCommunication=OFF -DAPI_Windows.Devices.Adc=ON -DAPI_nanoFramework.TI.EasyLink=ON -DAPI_nanoFramework.Hardware.TI=ON
GccArm_Version:
variables:
GNU_GCC_TOOLCHAIN_PATH: $(Agent.TempDirectory)\GNU_Tools_ARM_Embedded
HelperPackageVersion: $[counter('HelperPackageVersioncounter', 0)]
steps:
- template: azure-pipelines-templates/build-preparations.yml
- template: azure-pipelines-templates/nb-gitversioning.yml
- template: azure-pipelines-templates/download-install-arm-gcc-toolchain.yml
- template: azure-pipelines-templates/download-install-ninja.yml
- template: azure-pipelines-templates/build-ti-simplelink.yml
- template: azure-pipelines-templates/pack-publish-artifacts.yml
- template: azure-pipelines-templates/publish-bintray.yml
- template: azure-pipelines-templates/pack-publish-ti-sl-managed-helpers.yml
#################
# WIN32
- job: Build_WIN32_nanoCLR
condition: and( succeeded('Check_Code_Style'), ne( dependencies.Check_Build_Options.outputs['BuildOptions.SKIP_BUILD'], true ) )
dependsOn:
- Check_Build_Options
- Check_Code_Style
pool:
vmImage: 'windows-2019'
steps:
- task: NuGetToolInstaller@0
inputs:
versionSpec: '5.8.0'
displayName: 'Install specifc version of NuGet'
- task: VSBuild@1
inputs:
solution: 'targets\os\win32\nanoCLR.sln'
platform: 'x86'
configuration: 'Release'
#######################
# generate change log
- job: Generate_change_log
dependsOn:
- Build_STM32_targets
- Build_ESP32_targets
- Build_NXP_targets
- Build_TI_SimpleLink_targets
# skip build if this is a PR, submitted by nfbot and the commit message contains [version update]
condition: and( succeeded('Build_STM32_targets'), succeeded('Build_ESP32_targets'), succeeded('Build_NXP_targets'), succeeded('Build_TI_SimpleLink_targets'), not( eq(variables['Build.Reason'], 'PullRequest') ), or( eq(variables['Build.SourceBranchName'], 'master'), startsWith(variables['Build.SourceBranch'], 'refs/tags/v') ), ne( variables['StartReleaseCandidate'], true ) )
pool:
vmImage: 'windows-2019'
steps:
- task: DotNetCoreCLI@2
condition: succeeded()
displayName: Install NBGV tool
inputs:
command: custom
custom: tool
arguments: install --tool-path . nbgv
- script: nbgv cloud -a -c
condition: succeeded()
displayName: Set build number
- task: UseRubyVersion@0
condition: succeeded()
inputs:
versionSpec: '>= 2.7'
addToPath: true
# generate change log including future version
- powershell: |
gem install github_changelog_generator --quiet --no-document
# need to call it passing both cache options with full path otherwise it won't work
github_changelog_generator --token $(GitHubToken) --cache-log $env:AGENT_TEMPDIRECTORY\github-changelog-logger.log --cache-file $env:AGENT_TEMPDIRECTORY\github-changelog-http-cache --pr-wo-labels --future-release "v$env:NBGV_AssemblyVersion"
condition: and( succeeded(), ne(variables['Build.Reason'], 'PullRequest'), or( eq(variables['Build.SourceBranchName'], 'master'), startsWith(variables['Build.SourceBranch'], 'refs/tags/v') ) )
displayName: Generate change log
# generate change log without future version
- powershell: |
gem install github_changelog_generator --quiet --no-document
# need to call it passing both cache options with full path otherwise it won't work
github_changelog_generator --token $(GitHubToken) --cache-log $env:AGENT_TEMPDIRECTORY\github-changelog-logger.log --cache-file $env:AGENT_TEMPDIRECTORY\github-changelog-http-cache --pr-wo-labels
condition: and( succeeded(), ne(variables['Build.Reason'], 'PullRequest'), not( or( eq(variables['Build.SourceBranchName'], 'master'), startsWith(variables['Build.SourceBranch'], 'refs/tags/v') ) ) )
displayName: Generate change log
# push new changelog to GitHub repo
- powershell: |
git config --global gc.auto 0
git config --global user.name nfbot
git config --global user.email [email protected]
git config --global core.autocrlf true
git add CHANGELOG.md
git commit -m "Update CHANGELOG" -m"***NO_CI***"
# compute authorization header in format "AUTHORIZATION: basic 'encoded token'"
# 'encoded token' is the Base64 of the string "nfbot:personal-token"
$auth = "basic $([System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes("nfbot:$(GitHubToken)"))))"
git -c http.extraheader="AUTHORIZATION: $auth" push origin "HEAD:$(Build.SourceBranchName)"
condition: and( succeeded(), ne(variables['Build.Reason'], 'PullRequest') )
displayName: Push changelog to GitHub
#######################
# create or update GitHub release ON tags from master branche or tags
- job: Publish_Release
dependsOn:
- Build_STM32_targets
- Build_ESP32_targets
- Build_NXP_targets
- Build_TI_SimpleLink_targets
- Build_WIN32_nanoCLR
- Generate_change_log
# skip build if this is a PR, submitted by nfbot and the commit message contains [version update]
condition: and( succeeded('Build_STM32_targets'), succeeded('Build_ESP32_targets'), succeeded('Build_NXP_targets'), succeeded('Build_TI_SimpleLink_targets'), succeeded('Generate_change_log'), not( eq(variables['Build.Reason'], 'PullRequest') ), or( endsWith(variables['Build.SourceBranchName'], 'master'), startsWith(variables['Build.SourceBranch'], 'refs/tags/v') ), ne( variables['StartReleaseCandidate'], true ) )
pool:
vmImage: 'windows-2019'
steps:
- task: DotNetCoreCLI@2
inputs:
command: custom
custom: tool
arguments: install --tool-path . nbgv
displayName: Install NBGV tool
- script: nbgv cloud -a -c
displayName: Set build number
- task: GitHubReleasePublish@1
condition: endsWith(variables['Build.SourceBranch'], 'master')
displayName: Create/Update GitHub stable release
inputs:
githubEndpoint: 'nanoframework'
githubOwner: 'nanoframework'
githubRepositoryName: nf-interpreter
githubTag: v$(NBGV_AssemblyVersion)
githubReleaseTitle: 'nf Interpreter v$(NBGV_AssemblyVersion)'
githubReleaseNotes: 'Check the [changelog]($(Build.Repository.Uri)/blob/$(Build.SourceBranchName)/CHANGELOG.md).<br><br>Download images from our Bintray repo. See the available images [here](https://github.com/nanoframework/nf-interpreter/tree/master#firmware-for-reference-boards).'
githubTargetCommitsh: $(Build.SourceVersion)
githubReleaseDraft: false
githubReleasePrerelease: true
githubReuseDraftOnly: false
githubReuseRelease: true
githubEditRelease: true
githubDeleteEmptyTag: true
githubReleaseAsset: '$(Build.ArtifactStagingDirectory)/**/*.zip'
##################################
# report build failure to Discord
- job: Report_Build_Failure
dependsOn:
- Build_STM32_targets
- Build_ESP32_targets
- Build_NXP_targets
- Build_TI_SimpleLink_targets
- Build_WIN32_nanoCLR
- Generate_change_log
- Check_Code_Style
condition: and(ne( dependencies.Check_Code_Style.outputs['Check_Code_Style.CODE_STYLE_CHECK_FAILED'], true), or( failed('Build_STM32_targets'), failed('Build_ESP32_targets'), failed('Build_NXP_targets'), failed('Build_TI_SimpleLink_targets'), failed('Build_WIN32_nanoCLR'), failed('Generate_change_log')))
pool:
vmImage: 'windows-2019'
steps:
- checkout: self
fetchDepth: 1
# step from template @ nf-tools repo
- template: azure-pipelines-templates/discord-webhook.yml@templates
parameters:
status: 'failure'
webhookUrl: '$(DiscordWebhook)'
message: ''