forked from dotnet/fsharp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines-PR.yml
830 lines (788 loc) · 33.8 KB
/
azure-pipelines-PR.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
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
# CI and PR triggers
trigger:
branches:
include:
- main
- dev16.1
- feature/*
- release/*
paths:
include:
- '*'
exclude:
- .github/*
- docs/*
- .vscode/*
- .devcontainer/*
- tests/scripts/
- attributions.md
- CODE_OF_CONDUCT.md
- DEVGUIDE.md
- INTERNAL.md
- Language-Version-History.md
- License.txt
- README.md
- release-notes.md
- TESTGUIDE.md
pr:
branches:
include:
- main
- dev16.1
- feature/*
- release/*
paths:
include:
- '*'
exclude:
- .github/*
- docs/*
- attributions.md
- CODE_OF_CONDUCT.md
- DEVGUIDE.md
- INTERNAL.md
- Language-Version-History.md
- License.txt
- README.md
- release-notes.md
- TESTGUIDE.md
variables:
- name: _TeamName
value: FSharp
- name: _BuildConfig
value: Release
- name: _PublishUsingPipelines
value: true
- name: VisualStudioDropName
value: Products/$(System.TeamProject)/$(Build.Repository.Name)/$(Build.SourceBranchName)/$(Build.BuildNumber)
- name: Codeql.Enabled
value: true
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- group: DotNet-FSharp-SDLValidation-Params
- ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest')) }}:
- name: RunningAsPullRequest
value: true
# Pick up pool provider name behavior from shared yaml template
- template: /eng/common/templates/variables/pool-providers.yml
# Variables defined in yml cannot be overridden at queue time; instead overridable variables must be defined in the web UI.
# Commenting out until something like this is supported: https://github.com/Microsoft/azure-pipelines-yaml/pull/129
#variables:
#- name: SkipTests
# defaultValue: false
stages:
- stage: build
displayName: Build
jobs:
#-------------------------------------------------------------------------------------------------------------------#
# PR builds without logs publishing #
#-------------------------------------------------------------------------------------------------------------------#
- ${{ if eq(variables['System.TeamProject'], 'public') }}:
- template: /eng/common/templates/jobs/jobs.yml
parameters:
enableMicrobuild: false
enablePublishBuildArtifacts: false
enablePublishTestResults: false
enablePublishBuildAssets: false
enablePublishUsingPipelines: $(_PublishUsingPipelines)
enableSourceBuild: false
enableTelemetry: true
helixRepo: dotnet/fsharp
jobs:
# Determinism, we want to run it only in PR builds
- job: Determinism_Debug
condition: eq(variables['Build.Reason'], 'PullRequest')
variables:
- name: _SignType
value: Test
pool:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals $(WindowsMachineQueueName)
timeoutInMinutes: 90
strategy:
maxParallel: 2
matrix:
regular:
_experimental_flag: ''
experimental_features:
_experimental_flag: ''
steps:
- checkout: self
clean: true
- task: UseDotNet@2
displayName: install SDK
inputs:
packageType: sdk
useGlobalJson: true
includePreviewVersions: false
workingDirectory: $(Build.SourcesDirectory)
installationPath: $(Build.SourcesDirectory)/.dotnet
- script: .\eng\test-determinism.cmd -configuration Debug
env:
FSHARP_EXPERIMENTAL_FEATURES: $(_experimental_flag)
displayName: Determinism tests with Debug configuration
- task: PublishPipelineArtifact@1
displayName: Publish Determinism Logs
inputs:
targetPath: '$(Build.SourcesDirectory)/artifacts/log/Debug'
artifactName: 'Determinism_Debug Attempt $(System.JobAttempt) Logs'
continueOnError: true
condition: not(succeeded())
# Check FSComp.txt error code sorting and code formatting
- job: CheckCodeFormatting
pool:
vmImage: $(UbuntuMachineQueueName)
steps:
- checkout: self
clean: true
- script: dotnet --list-sdks
displayName: Report dotnet SDK versions
- task: UseDotNet@2
displayName: install SDK
inputs:
packageType: sdk
useGlobalJson: true
includePreviewVersions: true
workingDirectory: $(Build.SourcesDirectory)
installationPath: $(Agent.ToolsDirectory)/dotnet
- script: dotnet tool restore
env:
DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1
displayName: Install tools
- script: dotnet fsi src/Compiler/FSCompCheck.fsx
env:
DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1
displayName: Check error code sorting in src/Compiler/FSComp.txt
- script: dotnet fantomas . --check
env:
DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1
displayName: Check code formatting (run 'dotnet fantomas .' to fix)
# Check whether package with current version has been published to nuget.org
# We will try to restore both FSharp.Core and FCS and if restore is _successful_, package version needs to be bumped.
# NOTE: The check now runs on all branches (not just release),
# because we want to catch cases when version is desynched and we didn't update it.
# It is also helping the release notes automation to be up to date with packages versions.
- job: Check_Published_Package_Versions
pool:
vmImage: $(UbuntuMachineQueueName)
strategy:
maxParallel: 2
matrix:
FCS:
_project: "FSharp.Compiler.Service_notshipped.fsproj"
FSCore:
_project: "FSharp.Core_notshipped.fsproj"
steps:
- checkout: self
clean: true
- task: UseDotNet@2
displayName: install SDK
inputs:
packageType: sdk
useGlobalJson: true
includePreviewVersions: true
workingDirectory: $(Build.SourcesDirectory)
installationPath: $(Agent.ToolsDirectory)/dotnet
- pwsh: ./check.ps1 -project $(_project)
workingDirectory: $(Build.SourcesDirectory)/buildtools/checkpackages
env:
DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1
displayName: Check published package version
#-------------------------------------------------------------------------------------------------------------------#
# PR builds #
#-------------------------------------------------------------------------------------------------------------------#
- ${{ if eq(variables['System.TeamProject'], 'public') }}:
- template: /eng/common/templates/jobs/jobs.yml
parameters:
enableMicrobuild: true
enablePublishBuildArtifacts: true
enablePublishTestResults: false
enablePublishBuildAssets: true
enablePublishUsingPipelines: $(_PublishUsingPipelines)
enableSourceBuild: true
enableTelemetry: true
helixRepo: dotnet/fsharp
jobs:
- job: WindowsLangVersionPreview
pool:
# The PR build definition sets this variable:
# WindowsMachineQueueName=Windows.vs2022.amd64.open
# and there is an alternate build definition that sets this to a queue that is always scouting the
# next preview of Visual Studio.
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals $(WindowsMachineQueueName)
timeoutInMinutes: 120
steps:
- checkout: self
clean: true
- script: eng\CIBuild.cmd -compressallmetadata -configuration Release /p:FSharpLangVersion=preview
env:
DOTNET_DbgEnableMiniDump: 1
DOTNET_DbgMiniDumpType: 3 # Triage dump, 1 for mini, 2 for Heap, 3 for triage, 4 for full. Don't use 4 unless you know what you're doing.
DOTNET_DbgMiniDumpName: $(Build.SourcesDirectory)\artifacts\log\Release\$(Build.BuildId)-%e-%p-%t.dmp
NativeToolsOnMachine: true
displayName: Build
- task: PublishBuildArtifacts@1
displayName: Publish Build BinLog
condition: always()
continueOnError: true
inputs:
PathToPublish: '$(Build.SourcesDirectory)\artifacts\log/Release\Build.VisualFSharp.sln.binlog'
ArtifactName: 'Windows Release build binlogs'
ArtifactType: Container
parallel: true
- task: PublishBuildArtifacts@1
displayName: Publish Dumps
condition: failed()
continueOnError: true
inputs:
PathToPublish: '$(Build.SourcesDirectory)\artifacts\log\Release'
ArtifactName: 'Windows Release WindowsLangVersionPreview process dumps'
ArtifactType: Container
parallel: true
- job: WindowsNoRealsig_testCoreclr
pool:
# The PR build definition sets this variable:
# WindowsMachineQueueName=Windows.vs2022.amd64.open
# and there is an alternate build definition that sets this to a queue that is always scouting the
# next preview of Visual Studio.
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals $(WindowsMachineQueueName)
timeoutInMinutes: 120
steps:
- checkout: self
clean: true
- script: eng\CIBuild.cmd -compressallmetadata -buildnorealsig -testCoreclr -configuration Release
env:
DOTNET_DbgEnableMiniDump: 1
DOTNET_DbgMiniDumpType: 3 # Triage dump, 1 for mini, 2 for Heap, 3 for triage, 4 for full. Don't use 4 unless you know what you're doing.
DOTNET_DbgMiniDumpName: $(Build.SourcesDirectory)\artifacts\log\Release\$(Build.BuildId)-%e-%p-%t.dmp
NativeToolsOnMachine: true
displayName: Build
- task: PublishBuildArtifacts@1
displayName: Publish Build BinLog
condition: always()
continueOnError: true
inputs:
PathToPublish: '$(Build.SourcesDirectory)\artifacts\log/Release\Build.VisualFSharp.sln.binlog'
ArtifactName: 'Windows Release build binlogs'
ArtifactType: Container
parallel: true
- task: PublishBuildArtifacts@1
displayName: Publish Dumps
condition: failed()
continueOnError: true
inputs:
PathToPublish: '$(Build.SourcesDirectory)\artifacts\log\Release'
ArtifactName: 'Windows Release WindowsNoRealsig_testCoreclr process dumps'
ArtifactType: Container
parallel: true
- job: WindowsNoRealsig_testDesktop
pool:
# The PR build definition sets this variable:
# WindowsMachineQueueName=Windows.vs2022.amd64.open
# and there is an alternate build definition that sets this to a queue that is always scouting the
# next preview of Visual Studio.
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals $(WindowsMachineQueueName)
timeoutInMinutes: 120
steps:
- checkout: self
clean: true
- script: eng\CIBuild.cmd -compressallmetadata -buildnorealsig -testDesktop -configuration Release
env:
DOTNET_DbgEnableMiniDump: 1
DOTNET_DbgMiniDumpType: 3 # Triage dump, 1 for mini, 2 for Heap, 3 for triage, 4 for full. Don't use 4 unless you know what you're doing.
DOTNET_DbgMiniDumpName: $(Build.SourcesDirectory)\artifacts\log\Release\$(Build.BuildId)-%e-%p-%t.dmp
NativeToolsOnMachine: true
displayName: Build
- task: PublishBuildArtifacts@1
displayName: Publish Build BinLog
condition: always()
continueOnError: true
inputs:
PathToPublish: '$(Build.SourcesDirectory)\artifacts\log/Release\Build.VisualFSharp.sln.binlog'
ArtifactName: 'Windows Release build binlogs'
ArtifactType: Container
parallel: true
- task: PublishBuildArtifacts@1
displayName: Publish Dumps
condition: failed()
continueOnError: true
inputs:
PathToPublish: '$(Build.SourcesDirectory)\artifacts\log\Release'
ArtifactName: 'Windows Release WindowsNoRealsig_testDesktop process dumps'
ArtifactType: Container
parallel: true
- job: WindowsStrictIndentation
pool:
# The PR build definition sets this variable:
# WindowsMachineQueueName=Windows.vs2022.amd64.open
# and there is an alternate build definition that sets this to a queue that is always scouting the
# next preview of Visual Studio.
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals $(WindowsMachineQueueName)
timeoutInMinutes: 120
steps:
- checkout: self
clean: true
- script: eng\CIBuild.cmd -compressallmetadata -configuration Release /p:AdditionalFscCmdFlags=--strict-indentation+
env:
DOTNET_DbgEnableMiniDump: 1
DOTNET_DbgMiniDumpType: 3 # Triage dump, 1 for mini, 2 for Heap, 3 for triage, 4 for full. Don't use 4 unless you know what you're doing.
DOTNET_DbgMiniDumpName: $(Build.SourcesDirectory)\artifacts\log\Release\$(Build.BuildId)-%e-%p-%t.dmp
NativeToolsOnMachine: true
displayName: Build
- task: PublishBuildArtifacts@1
displayName: Publish Build BinLog
condition: always()
continueOnError: true
inputs:
PathToPublish: '$(Build.SourcesDirectory)\artifacts\log/Release\Build.VisualFSharp.sln.binlog'
ArtifactName: 'Windows Release build binlogs'
ArtifactType: Container
parallel: true
- task: PublishBuildArtifacts@1
displayName: Publish Dumps
condition: failed()
continueOnError: true
inputs:
PathToPublish: '$(Build.SourcesDirectory)\artifacts\log\Release'
ArtifactName: 'Windows Release WindowsStrictIndentation process dumps'
ArtifactType: Container
parallel: true
- job: WindowsNoStrictIndentation
pool:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals $(WindowsMachineQueueName)
timeoutInMinutes: 120
steps:
- checkout: self
clean: true
- script: eng\CIBuild.cmd -compressallmetadata -configuration Release /p:AdditionalFscCmdFlags=--strict-indentation-
env:
DOTNET_DbgEnableMiniDump: 1
DOTNET_DbgMiniDumpType: 3 # Triage dump, 1 for mini, 2 for Heap, 3 for triage, 4 for full. Don't use 4 unless you know what you're doing.
DOTNET_DbgMiniDumpName: $(Build.SourcesDirectory)\artifacts\log\Release\$(Build.BuildId)-%e-%p-%t.dmp
NativeToolsOnMachine: true
displayName: Build
- task: PublishBuildArtifacts@1
displayName: Publish Build BinLog
condition: always()
continueOnError: true
inputs:
PathToPublish: '$(Build.SourcesDirectory)\artifacts\log/Release\Build.VisualFSharp.sln.binlog'
ArtifactName: 'Windows Release build binlogs'
ArtifactType: Container
parallel: true
- task: PublishBuildArtifacts@1
displayName: Publish Dumps
condition: failed()
continueOnError: true
inputs:
PathToPublish: '$(Build.SourcesDirectory)\artifacts\log\Release'
ArtifactName: 'Windows Release WindowsNoStrictIndentation process dumps'
ArtifactType: Container
parallel: true
# Windows With Compressed Metadata
- job: WindowsCompressedMetadata
variables:
- name: XUNIT_LOGS
value: $(Build.SourcesDirectory)\artifacts\TestResults\$(_configuration)
- name: __VSNeverShowWhatsNew
value: 1
pool:
# The PR build definition sets this variable:
# WindowsMachineQueueName=Windows.vs2022.amd64.open
# and there is an alternate build definition that sets this to a queue that is always scouting the
# next preview of Visual Studio.
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals $(WindowsMachineQueueName)
timeoutInMinutes: 120
strategy:
maxParallel: 5
matrix:
desktop_release:
_configuration: Release
_testKind: testDesktop
coreclr_release:
_configuration: Release
_testKind: testCoreclr
fsharpqa_release:
_configuration: Release
_testKind: testFSharpQA
vs_release:
_configuration: Release
_testKind: testVs
transparent_compiler_release:
_configuration: Release
_testKind: testCoreclr
${{ if eq(variables['Build.Reason'], 'Flaky, disabled, was PullRequest') }}:
inttests_release:
_configuration: Release
_testKind: testIntegration
steps:
- checkout: self
clean: true
- powershell: eng\SetupVSHive.ps1
displayName: Setup VS Hive
condition: or(eq(variables['_testKind'], 'testVs'), eq(variables['_testKind'], 'testIntegration'))
# yes, this is miserable, but - https://github.com/dotnet/arcade/issues/13239
- script: eng\CIBuild.cmd -compressallmetadata -configuration $(_configuration) -$(_testKind)
env:
DOTNET_DbgEnableMiniDump: 1
DOTNET_DbgMiniDumpType: 3 # Triage dump, 1 for mini, 2 for Heap, 3 for triage, 4 for full. Don't use 4 unless you know what you're doing.
DOTNET_DbgMiniDumpName: $(Build.SourcesDirectory)\artifacts\log\$(_configuration)\$(Build.BuildId)-%e-%p-%t.dmp
NativeToolsOnMachine: true
displayName: Build / Test
condition: and( ne(variables['_testKind'], 'testIntegration'), ne(variables['System.JobName'], 'transparent_compiler_release') )
- script: eng\CIBuild.cmd -compressallmetadata -configuration $(_configuration) -$(_testKind)
env:
DOTNET_DbgEnableMiniDump: 1
DOTNET_DbgMiniDumpType: 3 # Triage dump, 1 for mini, 2 for Heap, 3 for triage, 4 for full. Don't use 4 unless you know what you're doing.
DOTNET_DbgMiniDumpName: $(Build.SourcesDirectory)\artifacts\log\$(_configuration)\$(Build.BuildId)-%e-%p-%t.dmp
TEST_TRANSPARENT_COMPILER: 1
NativeToolsOnMachine: true
displayName: Build / Test Transparent Compiler
condition: and( eq(variables['System.JobName'], 'transparent_compiler_release'), ne(variables['_testKind'], 'testIntegration') )
- script: eng\CIBuild.cmd -compressallmetadata -configuration $(_configuration) -$(_testKind)
env:
DOTNET_DbgEnableMiniDump: 1
DOTNET_DbgMiniDumpType: 3 # Triage dump, 1 for mini, 2 for Heap, 3 for triage, 4 for full. Don't use 4 unless you know what you're doing.
DOTNET_DbgMiniDumpName: $(Build.SourcesDirectory)\artifacts\log\$(_configuration)\$(Build.BuildId)-%e-%p-%t.dmp
NativeToolsOnMachine: true
displayName: Build / Integration Test
continueOnError: true
condition: eq(variables['_testKind'], 'testIntegration')
- task: PublishTestResults@2
displayName: Publish Test Results
inputs:
testResultsFormat: 'XUnit'
testRunTitle: WindowsCompressedMetadata $(_testKind)
mergeTestResults: true
testResultsFiles: '*.xml'
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_configuration)'
continueOnError: true
condition: ne(variables['_testKind'], 'testFSharpQA')
- task: PublishBuildArtifacts@1
displayName: Publish Tests BinLog
condition: always()
continueOnError: true
inputs:
PathToPublish: '$(Build.SourcesDirectory)\artifacts\log/$(_configuration)\Build.VisualFSharp.sln.binlog'
ArtifactName: 'Windows $(_configuration) $(_testKind) test binlogs'
ArtifactType: Container
parallel: true
- task: PublishBuildArtifacts@1
displayName: Publish Dumps
condition: failed()
continueOnError: true
inputs:
PathToPublish: '$(Build.SourcesDirectory)\artifacts\log\$(_configuration)'
ArtifactName: 'Windows $(_configuration) $(_testKind) process dumps'
ArtifactType: Container
parallel: true
- task: PublishBuildArtifacts@1
displayName: Publish Test Logs
inputs:
PathtoPublish: '$(Build.SourcesDirectory)\artifacts\TestResults\$(_configuration)'
ArtifactName: 'Windows $(_configuration) $(_testKind) test logs'
publishLocation: Container
continueOnError: true
condition: always()
- script: dotnet build $(Build.SourcesDirectory)/eng/DumpPackageRoot/DumpPackageRoot.csproj
displayName: Dump NuGet cache contents
condition: failed()
- task: PublishBuildArtifacts@1
displayName: Publish NuGet cache contents
inputs:
PathtoPublish: '$(Build.SourcesDirectory)\artifacts\NugetPackageRootContents'
ArtifactName: 'NuGetPackageContents Windows $(_testKind)'
publishLocation: Container
continueOnError: true
condition: failed()
# Mock official build
- job: MockOfficial
pool:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals $(WindowsMachineQueueName)
steps:
- checkout: self
clean: true
- pwsh: .\eng\MockBuild.ps1
displayName: Build with OfficialBuildId
# Linux
- job: Linux
pool:
vmImage: $(UbuntuMachineQueueName)
timeoutInMinutes: 120
variables:
- name: _SignType
value: Test
steps:
- checkout: self
clean: true
- script: ./eng/cibuild.sh --configuration $(_BuildConfig) --testcoreclr
displayName: Build / Test
- task: PublishTestResults@2
displayName: Publish Test Results
inputs:
testResultsFormat: 'XUnit'
testRunTitle: Linux
testResultsFiles: '*.xml'
mergeTestResults: true
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
continueOnError: true
condition: always()
- task: PublishBuildArtifacts@1
displayName: Publish Test Logs
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
ArtifactName: 'Linux $(_BuildConfig) test logs'
publishLocation: Container
continueOnError: true
condition: failed()
- script: dotnet build $(Build.SourcesDirectory)/eng/DumpPackageRoot/DumpPackageRoot.csproj
displayName: Dump NuGet cache contents
condition: failed()
- task: PublishBuildArtifacts@1
displayName: Publish NuGet cache contents
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/NugetPackageRootContents'
ArtifactName: 'NuGetPackageContents Linux'
publishLocation: Container
continueOnError: true
condition: failed()
# MacOS
- job: MacOS
pool:
vmImage: macos-latest
timeoutInMinutes: 120
variables:
- name: _SignType
value: Test
steps:
- checkout: self
clean: true
- script: ./eng/cibuild.sh --configuration $(_BuildConfig) --testcoreclr
env:
COMPlus_DefaultStackSize: 1000000
displayName: Build / Test
- task: PublishTestResults@2
displayName: Publish Test Results
inputs:
testResultsFormat: 'XUnit'
testResultsFiles: '*.xml'
testRunTitle: MacOS
mergeTestResults: true
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
continueOnError: true
condition: always()
- task: PublishBuildArtifacts@1
displayName: Publish Test Logs
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
ArtifactName: 'MacOS $(_BuildConfig) test logs'
publishLocation: Container
continueOnError: true
condition: failed()
- script: dotnet build $(Build.SourcesDirectory)/eng/DumpPackageRoot/DumpPackageRoot.csproj
displayName: Dump NuGet cache contents
condition: failed()
- task: PublishBuildArtifacts@1
displayName: Publish NuGet cache contents
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/NugetPackageRootContents'
ArtifactName: 'NuGetPackageContents Mac'
publishLocation: Container
continueOnError: true
condition: failed()
# End to end build
- job: EndToEndBuildTests
pool:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals $(WindowsMachineQueueName)
strategy:
maxParallel: 2
matrix:
regular:
_experimental_flag: ''
experimental_features:
_experimental_flag: ''
steps:
- checkout: self
clean: true
- script: .\Build.cmd -c Release -pack
env:
NativeToolsOnMachine: true
FSHARP_EXPERIMENTAL_FEATURES: $(_experimental_flag)
- script: .\tests\EndToEndBuildTests\EndToEndBuildTests.cmd -c Release
env:
FSHARP_EXPERIMENTAL_FEATURES: $(_experimental_flag)
displayName: End to end build tests
# Up-to-date - disabled due to it being flaky
#- job: UpToDate_Windows
# pool:
# vmImage: windows-latest
# steps:
# - checkout: self
# clean: true
# - task: PowerShell@2
# displayName: Run up-to-date build check
# inputs:
# filePath: eng\tests\UpToDate.ps1
# arguments: -configuration $(_BuildConfig) -ci -binaryLog
# Run Build with Fsharp Experimental Features
# Possible change: --times:$(Build.SourcesDirectory)/artifacts/log/Release/compiler_timing.csv
# Plain FCS build Windows
- job: Plain_Build_Windows
pool:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals $(WindowsMachineQueueName)
variables:
- name: _BuildConfig
value: Debug
steps:
- checkout: self
clean: true
- script: dotnet --list-sdks
displayName: Report dotnet SDK versions
- task: UseDotNet@2
displayName: install SDK
inputs:
packageType: sdk
useGlobalJson: true
includePreviewVersions: true
workingDirectory: $(Build.SourcesDirectory)
installationPath: $(Agent.ToolsDirectory)/dotnet
- script: dotnet build .\FSharp.Compiler.Service.sln /bl:\"artifacts/log/$(_BuildConfig)/ServiceRegularBuild.binlog\"
workingDirectory: $(Build.SourcesDirectory)
displayName: Regular rebuild of FSharp.Compiler.Service.sln
continueOnError: false
condition: always()
# Plain FCS build Linux
- job: Plain_Build_Linux
pool:
vmImage: $(UbuntuMachineQueueName)
variables:
- name: _BuildConfig
value: Debug
steps:
- checkout: self
clean: true
- script: dotnet --list-sdks
displayName: Report dotnet SDK versions
- task: UseDotNet@2
displayName: install SDK
inputs:
packageType: sdk
useGlobalJson: true
includePreviewVersions: true
workingDirectory: $(Build.SourcesDirectory)
installationPath: $(Agent.ToolsDirectory)/dotnet
- script: dotnet build ./FSharp.Compiler.Service.sln /bl:\"artifacts/log/$(_BuildConfig)/ServiceRegularBuild.binlog\"
workingDirectory: $(Build.SourcesDirectory)
displayName: Regular rebuild of FSharp.Compiler.Service.sln
continueOnError: false
condition: always()
# Plain FCS build Mac
- job: Plain_Build_MacOS
pool:
vmImage: macos-latest
variables:
- name: _BuildConfig
value: Debug
steps:
- checkout: self
clean: true
- script: dotnet --list-sdks
displayName: Report dotnet SDK versions
- task: UseDotNet@2
displayName: install SDK
inputs:
packageType: sdk
useGlobalJson: true
includePreviewVersions: true
workingDirectory: $(Build.SourcesDirectory)
installationPath: $(Agent.ToolsDirectory)/dotnet
- script: dotnet build ./FSharp.Compiler.Service.sln /bl:\"artifacts/log/$(_BuildConfig)/ServiceRegularBuild.binlog\"
workingDirectory: $(Build.SourcesDirectory)
displayName: Regular rebuild of FSharp.Compiler.Service.sln
continueOnError: false
condition: always()
# Build and run fast benchmarks
- job: Benchmarks
pool:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals $(WindowsMachineQueueName)
variables:
- name: _BuildConfig
value: Release
steps:
- checkout: self
clean: true
- script: eng\CIBuild.cmd -configuration $(_BuildConfig) -testBenchmarks
displayName: Smoke test fast benchmarks
continueOnError: true
condition: always()
# Test trimming on Windows
- job: Build_And_Test_AOT_Windows
pool:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals $(WindowsMachineQueueName)
strategy:
maxParallel: 2
matrix:
compressed_metadata:
_kind: "-compressAllMetadata"
classic_metadata:
_kind: ""
variables:
- name: _BuildConfig
value: Release
steps:
- checkout: self
clean: true
- task: UseDotNet@2
displayName: install SDK
inputs:
packageType: sdk
useGlobalJson: true
includePreviewVersions: true
workingDirectory: $(Build.SourcesDirectory)
installationPath: $(Agent.ToolsDirectory)/dotnet
- script: dotnet --list-sdks
displayName: Report dotnet SDK versions
- script: .\Build.cmd $(_kind) -pack -c $(_BuildConfig)
env:
NativeToolsOnMachine: true
displayName: Initial build and prepare packages.
- powershell: $(Build.SourcesDirectory)/tests/AheadOfTime/check.ps1
displayName: Build, trim, publish and check the state of the trimmed app.
workingDirectory: $(Build.SourcesDirectory)/tests/AheadOfTime
- task: PublishPipelineArtifact@1
displayName: Publish Trim Tests Logs
inputs:
targetPath: './artifacts/log/Release/AheadOfTime/Trimming/'
artifactName: 'Trim Test Logs Attempt $(System.JobAttempt) Logs $(_kind)'
continueOnError: true
condition: always()
- job: ILVerify
pool:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals $(WindowsMachineQueueName)
steps:
- checkout: self
clean: true
- task: UseDotNet@2
displayName: install SDK
inputs:
packageType: sdk
useGlobalJson: true
includePreviewVersions: true
workingDirectory: $(Build.SourcesDirectory)
installationPath: $(Agent.ToolsDirectory)/dotnet
- script: dotnet tool restore
displayName: Restore dotnet tools
- pwsh: .\tests\ILVerify\ilverify.ps1
displayName: Run ILVerify
workingDirectory: $(Build.SourcesDirectory)