forked from nanoframework/nanoframework.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
787 lines (646 loc) · 26.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
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
trigger:
branches:
include: [pages-source]
paths:
exclude: [README.md, LICENSE.md, .gitignore]
# PR always trigger build
pr:
autoCancel: true
resources:
repositories:
- repository: templates
type: github
name: nanoframework/nf-tools
endpoint: nanoframework
pool:
vmImage: 'windows-2019'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
# need this here in order to persist GitHub credentials
- checkout: self
persistCredentials: true
# setup GitHub credentials and prefs
- script: |
git config --global user.email "nfbot"
git config --global user.name "[email protected]"
git config --global core.autocrlf true
displayName: Setup git identity
# clone class libs repos
# fetch only the last 100 commits to be (reasonaly) sure that we have the history up to the last tag
- powershell: |
git clone https://github.com/nanoframework/CoreLibrary.git --recursive --depth 100 -b develop CoreLibrary
git clone https://github.com/nanoframework/nanoFramework.Devices.Can.git --depth 100 -b develop nanoFramework.Devices.Can
git clone https://github.com/nanoframework/nanoFramework.Devices.OneWire.git --depth 100 -b develop nanoFramework.Devices.OneWire
git clone https://github.com/nanoframework/nanoFramework.Runtime.Events.git --depth 100 -b develop nanoFramework.Runtime.Events
git clone https://github.com/nanoframework/nanoFramework.Runtime.Native.git --depth 100 -b develop nanoFramework.Runtime.Native
git clone https://github.com/nanoframework/nanoFramework.WebServer -b develop nanoFramework.WebServer
git clone https://github.com/nanoframework/System.Device.Dac.git --depth 100 -b develop System.Device.Dac
git clone https://github.com/nanoframework/System.Device.Gpio.git --depth 100 -b develop System.Device.Gpio
git clone https://github.com/nanoframework/Windows.Devices.Gpio.git --depth 100 -b develop Windows.Devices.Gpio
git clone https://github.com/nanoframework/Windows.Devices.I2c.git --depth 100 -b develop Windows.Devices.I2c
git clone https://github.com/nanoframework/System.Device.I2c.git --depth 100 -b develop System.Device.I2c
git clone https://github.com/nanoframework/System.IO.FileSystem.git --depth 100 -b develop System.IO.FileSystem
git clone https://github.com/nanoframework/Windows.Devices.Pwm.git --depth 100 -b develop Windows.Devices.Pwm
git clone https://github.com/nanoframework/Windows.Devices.SerialCommunication.git -b develop Windows.Devices.SerialCommunication
git clone https://github.com/nanoframework/Windows.Devices.Spi.git --depth 100 -b develop Windows.Devices.Spi
git clone https://github.com/nanoframework/System.Device.Spi.git --depth 100 -b develop System.Device.Spi
git clone https://github.com/nanoframework/Windows.Storage.git --depth 100 -b develop Windows.Storage
git clone https://github.com/nanoframework/Windows.Storage.Streams.git --depth 100 -b develop Windows.Storage.Streams
git clone https://github.com/nanoframework/Windows.Devices.Adc.git --depth 100 -b develop Windows.Devices.Adc
git clone https://github.com/nanoframework/Windows.Devices.WiFi.git --depth 100 -b develop Windows.Devices.WiFi
git clone https://github.com/nanoframework/nanoFramework.Graphics -b develop nanoFramework.Graphics
git clone https://github.com/nanoframework/nanoFramework.Hardware.Esp32 -b develop nanoFramework.Hardware.Esp32
git clone https://github.com/nanoframework/nanoFramework.Hardware.Esp32.Rmt -b develop nanoFramework.Hardware.Esp32.Rmt
git clone https://github.com/nanoframework/nanoFramework.Json -b develop nanoFramework.Json
git clone https://github.com/nanoframework/nanoFramework.Hardware.Stm32 -b develop nanoFramework.Hardware.Stm32
git clone https://github.com/nanoframework/nanoFramework.ResourceManager -b develop nanoFramework.ResourceManager
git clone https://github.com/nanoframework/nanoFramework.Networking.Sntp -b develop nanoFramework.Networking.Sntp
git clone https://github.com/nanoframework/System.Collections -b develop System.Collections
git clone https://github.com/nanoframework/System.Text -b develop System.Text
git clone https://github.com/nanoframework/System.Net -b develop System.Net
git clone https://github.com/nanoframework/System.Net.Http -b develop System.Net.Http
git clone https://github.com/nanoframework/nanoFramework.TI.EasyLink -b develop nanoFramework.TI.EasyLink
git clone https://github.com/nanoframework/nanoFramework.Hardware.TI -b develop nanoFramework.Hardware.TI
git clone https://github.com/nanoframework/System.Math -b develop System.Math
git clone https://github.com/nanoframework/nanoFramework.Logging -b develop nanoFramework.Logging
git clone https://github.com/nanoframework/System.IO.Ports.git --depth 100 -b develop System.IO.Ports
git clone https://github.com/nanoframework/nanoFramework.m2mqtt.git --depth 100 -b develop nanoFramework.M2Mqtt
git clone https://github.com/nanoframework/System.Text.RegularExpressions.git --depth 100 -b develop System.Text.RegularExpressions
git clone https://github.com/nanoframework/nanoFramework.Azure.Devices.git --depth 100 -b develop nanoFramework.Azure.Devices
git clone https://github.com/nanoframework/nanoFramework.IoT.Device.git -b develop nanoFramework.IoT.Device
displayName: Clone repos of class libs
# install docfx
- powershell: choco install docfx -y
displayName: Install docfx
- template: azure-pipelines-templates/install-nuget.yml@templates
- task: NuGetCommand@2
displayName: NuGet restore CoreLibrary
inputs:
restoreSolution: 'CoreLibrary\nanoFramework.CoreLibrary.sln'
feedsToUse: config
nugetConfigPath: 'CoreLibrary\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore nanoFramework.Devices.Can
inputs:
restoreSolution: 'nanoFramework.Devices.Can\nanoFramework.Devices.Can.sln'
feedsToUse: config
nugetConfigPath: 'nanoFramework.Devices.Can\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore nanoFramework.Devices.OneWire
inputs:
restoreSolution: 'nanoFramework.Devices.OneWire\nanoFramework.Devices.OneWire.sln'
feedsToUse: config
nugetConfigPath: 'nanoFramework.Devices.OneWire\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore nanoFramework.Runtime.Events
inputs:
restoreSolution: 'nanoFramework.Runtime.Events\nanoFramework.Runtime.Events.sln'
feedsToUse: config
nugetConfigPath: 'nanoFramework.Runtime.Events\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore nanoFramework.Runtime.Native
inputs:
restoreSolution: 'nanoFramework.Runtime.Native\nanoFramework.Runtime.Native.sln'
feedsToUse: config
nugetConfigPath: 'nanoFramework.Runtime.Native\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore nanoFramework.WebServer
inputs:
restoreSolution: 'nanoFramework.WebServer\nanoFramework.WebServer.sln'
feedsToUse: config
nugetConfigPath: 'nanoFramework.WebServer\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore System.Device.Dac
inputs:
restoreSolution: 'System.Device.Dac\nanoFramework.System.Device.Dac.sln'
feedsToUse: config
nugetConfigPath: 'System.Device.Dac\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore System.Device.Gpio
inputs:
restoreSolution: 'System.Device.Gpio\nanoFramework.System.Device.Gpio.sln'
feedsToUse: config
nugetConfigPath: 'System.Device.Gpio\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore Windows.Devices.Gpio
inputs:
restoreSolution: 'Windows.Devices.Gpio\nanoFramework.Windows.Devices.Gpio.sln'
feedsToUse: config
nugetConfigPath: 'Windows.Devices.Gpio\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore Windows.Devices.I2c
inputs:
restoreSolution: 'Windows.Devices.I2c\nanoFramework.Windows.Devices.I2c.sln'
feedsToUse: config
nugetConfigPath: 'Windows.Devices.I2c\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore System.Device.I2c
inputs:
restoreSolution: 'System.Device.I2c\nanoFramework.System.Device.I2c.sln'
feedsToUse: config
nugetConfigPath: 'System.Device.I2c\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore System.IO.FileSystem
inputs:
restoreSolution: 'System.IO.FileSystem\nanoFramework.System.IO.FileSystem.sln'
feedsToUse: config
nugetConfigPath: 'System.IO.FileSystem\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore Windows.Devices.Pwm
inputs:
restoreSolution: 'Windows.Devices.Pwm\nanoFramework.Windows.Devices.Pwm.sln'
feedsToUse: config
nugetConfigPath: 'Windows.Devices.Pwm\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore Windows.Devices.SerialCommunication
inputs:
restoreSolution: 'Windows.Devices.SerialCommunication\nanoFramework.Windows.Devices.SerialCommunication.sln'
feedsToUse: config
nugetConfigPath: 'Windows.Devices.SerialCommunication\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore Windows.Devices.Spi
inputs:
restoreSolution: 'Windows.Devices.Spi\nanoFramework.Windows.Devices.Spi.sln'
feedsToUse: config
nugetConfigPath: 'Windows.Devices.Spi\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore System.Device.Spi
inputs:
restoreSolution: 'System.Device.Spi\System.Device.Spi.sln'
feedsToUse: config
nugetConfigPath: 'System.Device.Spi\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore Windows.Storage
inputs:
restoreSolution: 'Windows.Storage\nanoFramework.Windows.Storage.sln'
feedsToUse: config
nugetConfigPath: 'Windows.Storage\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore Windows.Storage.Streams
inputs:
restoreSolution: 'Windows.Storage.Streams\nanoFramework.Windows.Storage.Streams.sln'
feedsToUse: config
nugetConfigPath: 'Windows.Storage.Streams\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore Windows.Devices.Adc
inputs:
restoreSolution: 'Windows.Devices.Adc\nanoFramework.Windows.Devices.Adc.sln'
feedsToUse: config
nugetConfigPath: 'Windows.Devices.Adc\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore Windows.Devices.WiFi
inputs:
restoreSolution: 'Windows.Devices.WiFi\nanoFramework.Windows.Devices.WiFi.sln'
feedsToUse: config
nugetConfigPath: 'Windows.Devices.WiFi\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore nanoFramework.Graphics
inputs:
restoreSolution: 'nanoFramework.Graphics\nanoFramework.Graphics.sln'
feedsToUse: config
nugetConfigPath: 'nanoFramework.Graphics\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore nanoFramework.Hardware.Esp32
inputs:
restoreSolution: 'nanoFramework.Hardware.Esp32\nanoFramework.Hardware.Esp32.sln'
feedsToUse: config
nugetConfigPath: 'nanoFramework.Hardware.Esp32\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore nanoFramework.Hardware.Esp32.Rmt
inputs:
restoreSolution: 'nanoFramework.Hardware.Esp32.Rmt\nanoFramework.Hardware.Esp32.Rmt.sln'
feedsToUse: config
nugetConfigPath: 'nanoFramework.Hardware.Esp32.Rmt\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore nanoFramework.Json
inputs:
restoreSolution: 'nanoFramework.Json\nanoFramework.Json.sln'
feedsToUse: config
nugetConfigPath: 'nanoFramework.Json\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore nanoFramework.Hardware.Stm32
inputs:
restoreSolution: 'nanoFramework.Hardware.Stm32\nanoFramework.Hardware.Stm32.sln'
feedsToUse: config
nugetConfigPath: 'nanoFramework.Hardware.Stm32\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore nanoFramework.ResourceManager
inputs:
restoreSolution: 'nanoFramework.ResourceManager\nanoFramework.ResourceManager.sln'
feedsToUse: config
nugetConfigPath: 'nanoFramework.ResourceManager\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore nanoFramework.Networking.Sntp
inputs:
restoreSolution: 'nanoFramework.Networking.Sntp\nanoFramework.Networking.Sntp.sln'
feedsToUse: config
nugetConfigPath: 'nanoFramework.Networking.Sntp\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore System.Collections
inputs:
restoreSolution: 'System.Collections\nanoFramework.System.Collections.sln'
feedsToUse: config
nugetConfigPath: 'System.Collections\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore System.Text
inputs:
restoreSolution: 'System.Text\nanoFramework.System.Text.sln'
feedsToUse: config
nugetConfigPath: 'System.Text\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore System.Net
inputs:
restoreSolution: 'System.Net\nanoFramework.System.Net.sln'
feedsToUse: config
nugetConfigPath: 'System.Net\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore System.Net.Http
inputs:
restoreSolution: 'System.Net.Http\nanoFramework.System.Net.Http.sln'
feedsToUse: config
nugetConfigPath: 'System.Net.Http\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore nanoFramework.TI.EasyLink
inputs:
restoreSolution: 'nanoFramework.TI.EasyLink\nanoFramework.TI.EasyLink.sln'
feedsToUse: config
nugetConfigPath: 'nanoFramework.TI.EasyLink\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore nanoFramework.Hardware.TI
inputs:
restoreSolution: 'nanoFramework.Hardware.TI\nanoFramework.Hardware.TI.sln'
feedsToUse: config
nugetConfigPath: 'nanoFramework.Hardware.TI\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore System.Math
inputs:
restoreSolution: 'System.Math\nanoFramework.System.Math.sln'
feedsToUse: config
nugetConfigPath: 'System.Math\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore nanoFramework.Logging
inputs:
restoreSolution: 'nanoFramework.Logging\nanoFramework.Logging.sln'
feedsToUse: config
nugetConfigPath: 'nanoFramework.Logging\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore System.IO.Ports
inputs:
restoreSolution: 'System.IO.Ports\System.IO.Ports.sln'
feedsToUse: config
nugetConfigPath: 'System.IO.Ports\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore nanoFramework.M2Mqtt
inputs:
restoreSolution: 'nanoFramework.M2Mqtt\nanoFramework.M2Mqtt.sln'
feedsToUse: config
nugetConfigPath: 'nanoFramework.M2Mqtt\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore System.Text.RegularExpressions
inputs:
restoreSolution: 'System.Text.RegularExpressions\nanoFramework.System.Text.RegularExpressions.sln'
feedsToUse: config
nugetConfigPath: 'System.Text.RegularExpressions\NuGet.Config'
- task: NuGetCommand@2
displayName: NuGet restore nanoFramework.Azure.Devices
inputs:
restoreSolution: 'nanoFramework.Azure.Devices\nanoFramework.Azure.Devices.Client.sln'
feedsToUse: config
nugetConfigPath: 'nanoFramework.Azure.Devices\NuGet.Config'
# we only need to reference the main nuget.config
- task: NuGetCommand@2
displayName: NuGet restore nanoFramework.IoT.Device
inputs:
restoreSolution: 'nanoFramework.IoT.Device\devices\**\*.sln'
feedsToUse: config
nugetConfigPath: 'nanoFramework.IoT.Device\NuGet.Config'
# Build part
- task: InstallnFBuildComponents@1
displayName: Install nanoFramework MSBuild components
- task: VSBuild@1
displayName: Build CoreLibrary
inputs:
solution: 'CoreLibrary\nanoFramework.CoreLibrary.sln'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
condition: succeeded()
- task: VSBuild@1
displayName: Build nanoFramework.Devices.Can
inputs:
solution: 'nanoFramework.Devices.Can\nanoFramework.Devices.Can.sln'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
condition: succeeded()
- task: VSBuild@1
displayName: Build nanoFramework.Devices.OneWire
inputs:
solution: 'nanoFramework.Devices.OneWire\nanoFramework.Devices.OneWire.sln'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
condition: succeeded()
- task: VSBuild@1
displayName: Build nanoFramework.Runtime.Events
inputs:
solution: 'nanoFramework.Runtime.Events\nanoFramework.Runtime.Events.sln '
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
condition: succeeded()
- task: VSBuild@1
displayName: Build nanoFramework.Runtime.Native
inputs:
solution: 'nanoFramework.Runtime.Native\nanoFramework.Runtime.Native.sln'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
condition: succeeded()
- task: VSBuild@1
displayName: Build nanoFramework.WebServer
inputs:
solution: 'nanoFramework.WebServer\nanoFramework.WebServer.sln'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
condition: succeeded()
- task: VSBuild@1
displayName: Build System.Device.Dac
inputs:
solution: 'System.Device.Dac\nanoFramework.System.Device.Dac.sln'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
condition: succeeded()
- task: VSBuild@1
displayName: Build System.Device.Gpio
inputs:
solution: 'System.Device.Gpio\nanoFramework.System.Device.Gpio.sln'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
condition: succeeded()
- task: VSBuild@1
displayName: Build Windows.Devices.Gpio
inputs:
solution: 'Windows.Devices.Gpio\nanoFramework.Windows.Devices.Gpio.sln'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
condition: succeeded()
- task: VSBuild@1
displayName: Build Windows.Devices.I2c
inputs:
solution: 'Windows.Devices.I2c\nanoFramework.Windows.Devices.I2c.sln'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
condition: succeeded()
- task: VSBuild@1
displayName: Build System.Device.I2c
inputs:
solution: 'System.Device.I2c\nanoFramework.System.Device.I2c.sln'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
condition: succeeded()
- task: VSBuild@1
displayName: Build System.IO.FileSystem
inputs:
solution: 'System.IO.FileSystem\nanoFramework.System.IO.FileSystem.sln'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
condition: succeeded()
- task: VSBuild@1
displayName: Build Windows.Devices.Pwm
inputs:
solution: 'Windows.Devices.Pwm\nanoFramework.Windows.Devices.Pwm.sln'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
condition: succeeded()
- task: VSBuild@1
displayName: Build Windows.Devices.SerialCommunication
inputs:
solution: 'Windows.Devices.SerialCommunication\nanoFramework.Windows.Devices.SerialCommunication.sln'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
condition: succeeded()
- task: VSBuild@1
displayName: Build Windows.Devices.Spi
inputs:
solution: 'Windows.Devices.Spi\nanoFramework.Windows.Devices.Spi.sln'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
condition: succeeded()
- task: VSBuild@1
displayName: Build System.Device.Spi
inputs:
solution: 'System.Device.Spi\System.Device.Spi.sln'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
condition: succeeded()
- task: VSBuild@1
displayName: Build Windows.Storage
inputs:
solution: 'Windows.Storage\nanoFramework.Windows.Storage.sln'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
condition: succeeded()
- task: VSBuild@1
displayName: Build Windows.Storage.Streams
inputs:
solution: 'Windows.Storage.Streams\nanoFramework.Windows.Storage.Streams.sln'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
condition: succeeded()
- task: VSBuild@1
displayName: Build Windows.Devices.Adc
inputs:
solution: 'Windows.Devices.Adc\nanoFramework.Windows.Devices.Adc.sln'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
condition: succeeded()
- task: VSBuild@1
displayName: Build Windows.Devices.WiFi
inputs:
solution: 'Windows.Devices.WiFi\nanoFramework.Windows.Devices.WiFi.sln'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
condition: succeeded()
- task: VSBuild@1
displayName: Build nanoFramework.Graphics
inputs:
solution: 'nanoFramework.Graphics\nanoFramework.Graphics.sln'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
condition: succeeded()
- task: VSBuild@1
displayName: Build nanoFramework.Hardware.Esp32
inputs:
solution: 'nanoFramework.Hardware.Esp32\nanoFramework.Hardware.Esp32.sln'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
condition: succeeded()
- task: VSBuild@1
displayName: Build nanoFramework.Hardware.Esp32.Rmt
inputs:
solution: 'nanoFramework.Hardware.Esp32.Rmt\nanoFramework.Hardware.Esp32.Rmt.sln'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
condition: succeeded()
- task: VSBuild@1
displayName: Build nanoFramework.Json
inputs:
solution: 'nanoFramework.Json\nanoFramework.Json.sln'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
condition: succeeded()
- task: VSBuild@1
displayName: Build nanoFramework.Hardware.Stm32
inputs:
solution: 'nanoFramework.Hardware.Stm32\nanoFramework.Hardware.Stm32.sln'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
condition: succeeded()
- task: VSBuild@1
displayName: Build nanoFramework.Networking.Sntp
inputs:
solution: 'nanoFramework.Networking.Sntp\nanoFramework.Networking.Sntp.sln'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
condition: succeeded()
- task: VSBuild@1
displayName: Build System.Collections
inputs:
solution: 'System.Collections\nanoFramework.System.Collections.sln'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
condition: succeeded()
- task: VSBuild@1
displayName: Build System.Text
inputs:
solution: 'System.Text\nanoFramework.System.Text.sln'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
condition: succeeded()
- task: VSBuild@1
displayName: Build System.Net
inputs:
solution: 'System.Net\nanoFramework.System.Net.sln'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
condition: succeeded()
- task: VSBuild@1
displayName: Build System.Net.Http
inputs:
solution: 'System.Net.Http\nanoFramework.System.Net.Http.sln'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
condition: succeeded()
- task: VSBuild@1
displayName: Build nanoFramework.Hardware.TI
inputs:
solution: 'nanoFramework.Hardware.TI\nanoFramework.Hardware.TI.sln'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
condition: succeeded()
- task: VSBuild@1
displayName: Build System.Math
inputs:
solution: 'System.Math\nanoFramework.System.Math.sln'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
condition: succeeded()
- task: VSBuild@1
displayName: Build nanoFramework.Logging
inputs:
solution: 'nanoFramework.Logging\nanoFramework.Logging.sln'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
condition: succeeded()
- task: VSBuild@1
displayName: Build System.IO.Ports
inputs:
solution: 'System.IO.Ports\System.IO.Ports.sln'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
condition: succeeded()
- task: VSBuild@1
displayName: Build nanoFramework.M2Mqtt
inputs:
solution: 'nanoFramework.M2Mqtt\nanoFramework.M2Mqtt.sln'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
condition: succeeded()
- task: VSBuild@1
displayName: Build System.Text.RegularExpressions
inputs:
solution: 'System.Text.RegularExpressions\nanoFramework.System.Text.RegularExpressions.sln'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
condition: succeeded()
- task: VSBuild@1
displayName: Build nanoFramework.Azure.Devices
inputs:
solution: 'nanoFramework.Azure.Devices\nanoFramework.Azure.Devices.Client.sln'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
condition: succeeded()
# This shouold build all the bindings in nanoFramework.IoT.Device in the devices directory
- task: VSBuild@1
displayName: Build nanoFramework.IoT.Device
inputs:
solution: 'nanoFramework.IoT.Device\devices\**\*.sln'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
continueOnError: true
# Clean what's not needed from IoT.Device and adjust the nugets to remove nerdbank to help build
- task: PowerShell@2
inputs:
targetType: 'inline'
script: |
Remove-Item -Recurse -Force nanoFramework.IoT.Device\src\devices_generated
Remove-Item -Recurse -Force nanoFramework.IoT.Device\src\nanoFramework.IoT.Device.CodeConverter
cd nanoFramework.IoT.Device\devices
$Nerdbank = '<package id="Nerdbank.GitVersioning"'
$Files = Get-ChildItem -Filter "packages.config" -Recurse
foreach ($File in $Files) {
$FullPath = $File | % { $_.FullName }
$ToReplace = Get-Content $FullPath
$Replaced = $ToReplace `
| Where-Object { $_ -notmatch $Nerdbank }
Set-Content -path $FullPath -Value $Replaced
}
displayName: Delete generated device folder from IoT.Device and clean references
condition: succeeded()
# rename project files (need this to trick docfx)
- powershell: Get-ChildItem -Filter "*.nfproj" -Recurse | Rename-Item -NewName { $_.name -replace 'nfproj','csproj' }
displayName: Rename nfproj files
condition: succeeded()
# run docfx
- powershell: |
&docfx metadata docfx.json
if ($lastexitcode -ne 0)
{
throw [System.Exception] "docfx build failed with exit code $lastexitcode."
}
&docfx build docfx.json
if ($lastexitcode -ne 0)
{
throw [System.Exception] "docfx build failed with exit code $lastexitcode."
}
condition: succeeded()
displayName: Run docfx
# commit changes
- powershell: |
git clone https://github.com/nanoframework/nanoframework.github.io.git -b master origin_site -q
Copy-Item _site/* origin_site -recurse -Force
cd origin_site > $null
$auth = "basic $([System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes("nfbot:$(GitHubToken)"))))"
git add . -A > $null
git commit -m "Update documentation from PR" -q > $null
git -c http.extraheader="AUTHORIZATION: $auth" push origin master -q > $null
failOnStderr: false
ignoreLASTEXITCODE: true
condition: and( succeeded(), ne(variables['Build.Reason'], 'PullRequest') )
displayName: Commit changes
# step from template @ nf-tools repo
# report error
- template: azure-pipelines-templates/discord-webhook-task.yml@templates
parameters:
status: 'failure'
webhookUrl: '$(DiscordWebhook)'
message: ''