@@ -56,6 +56,10 @@ variables:
5656 value : .NETCore
5757 - name : VisualStudioDropName
5858 value : Products/$(System.TeamProject)/$(Build.Repository.Name)/$(Build.SourceBranchName)/$(Build.BuildNumber)
59+ - name : LegacyDotNetSdkVersion
60+ value : 3.1.405
61+ - name : DotNetSdkVersion
62+ value : ' 5.0.100'
5963 - ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest')) }} :
6064 - name : RunningAsPullRequest
6165 value : true
@@ -101,6 +105,12 @@ stages:
101105 steps :
102106 - checkout : self
103107 clean : true
108+ - task : UseDotNet@2
109+ displayName : Add legacy .NET SDK
110+ inputs :
111+ packageType : sdk
112+ version : $(LegacyDotNetSdkVersion)
113+ installationPath : $(Agent.ToolsDirectory)/dotnet
104114 - script : eng\CIBuild.cmd
105115 -configuration $(_BuildConfig)
106116 -prepareMachine
@@ -189,7 +199,7 @@ stages:
189199 # Windows
190200 - job : Windows
191201 pool :
192- vmImage : windows-2019
202+ vmImage : windows-latest
193203 timeoutInMinutes : 120
194204 strategy :
195205 maxParallel : 4
@@ -209,6 +219,12 @@ stages:
209219 steps :
210220 - checkout : self
211221 clean : true
222+ - task : UseDotNet@2
223+ displayName : Add legacy .NET SDK
224+ inputs :
225+ packageType : sdk
226+ version : $(LegacyDotNetSdkVersion)
227+ installationPath : $(Agent.ToolsDirectory)/dotnet
212228 - script : eng\CIBuild.cmd -configuration $(_configuration) -$(_testKind)
213229 displayName : Build / Test
214230 - task : PublishTestResults@2
@@ -242,7 +258,7 @@ stages:
242258 # Mock official build
243259 - job : MockOfficial
244260 pool :
245- vmImage : windows-2019
261+ vmImage : windows-latest
246262 steps :
247263 - checkout : self
248264 clean : true
@@ -259,6 +275,12 @@ stages:
259275 steps :
260276 - checkout : self
261277 clean : true
278+ - task : UseDotNet@2
279+ displayName : Add legacy .NET SDK
280+ inputs :
281+ packageType : sdk
282+ version : $(LegacyDotNetSdkVersion)
283+ installationPath : $(Agent.ToolsDirectory)/dotnet
262284 - script : ./eng/cibuild.sh --configuration $(_BuildConfig) --testcoreclr
263285 displayName : Build / Test
264286 - task : PublishTestResults@2
@@ -291,6 +313,12 @@ stages:
291313 steps :
292314 - checkout : self
293315 clean : true
316+ - task : UseDotNet@2
317+ displayName : Add legacy .NET SDK
318+ inputs :
319+ packageType : sdk
320+ version : $(LegacyDotNetSdkVersion)
321+ installationPath : $(Agent.ToolsDirectory)/dotnet
294322 - script : ./eng/cibuild.sh --configuration $(_BuildConfig) --testcoreclr
295323 displayName : Build / Test
296324 - task : PublishTestResults@2
@@ -316,62 +344,44 @@ stages:
316344 # End to end build
317345 - job : EndToEndBuildTests
318346 pool :
319- vmImage : windows-2019
347+ vmImage : windows-latest
320348 steps :
321349 - checkout : self
322350 clean : true
323351 - script : .\Build.cmd -c Release
324352 - script : .\tests\EndToEndBuildTests\EndToEndBuildTests.cmd -c Release
325353 displayName : End to end build tests
326354
327- # Source Build Linux - disabled until MSBuild/NuGet issues are resolved
328- # - ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
329- # - job: SourceBuild_Linux
330- # pool:
331- # vmImage: ubuntu-latest
332- # steps:
333- # - checkout: self
334- # clean: true
335- # - script: ./eng/cibuild.sh --configuration Release /p:DotNetBuildFromSource=true /p:FSharpSourceBuild=true
336- # displayName: Build
337- # - script: dotnet build $(Build.SourcesDirectory)/eng/DumpPackageRoot/DumpPackageRoot.csproj
338- # displayName: Dump NuGet cache contents
339- # condition: failed()
340- # - task: PublishBuildArtifacts@1
341- # displayName: Publish NuGet cache contents
342- # inputs:
343- # PathtoPublish: '$(Build.SourcesDirectory)/artifacts/NugetPackageRootContents'
344- # ArtifactName: 'NuGetPackageContents SourceBuild_Linux'
345- # publishLocation: Container
346- # continueOnError: true
347- # condition: failed()
348-
349355 # Source Build Windows
350356 - ${{ if eq(variables['Build.Reason'], 'PullRequest') }} :
351357 - job : SourceBuild_Windows
352358 pool :
353- vmImage : windows-2019
359+ vmImage : windows-latest
354360 steps :
355361 - checkout : self
356362 clean : true
357- - script : eng\CIBuild.cmd -configuration Release -noSign /p:DotNetBuildFromSource=true /p:FSharpSourceBuild=true
363+ - script : eng\CIBuild.cmd -configuration Release -noSign -prepareMachine -sourceBuild
358364 displayName : Build
359- - script : dotnet build $(Build.SourcesDirectory)/eng/DumpPackageRoot/DumpPackageRoot.csproj
360- displayName : Dump NuGet cache contents
361- condition : failed()
365+ - task : PublishPipelineArtifact@1
366+ displayName : Publish Logs
367+ inputs :
368+ targetPath : ' $(Build.SourcesDirectory)/artifacts/log/Release'
369+ artifactName : ' SourceBuild_Windows Logs'
370+ continueOnError : true
371+ condition : not(succeeded())
362372 - task : PublishBuildArtifacts@1
363- displayName : Publish NuGet cache contents
373+ displayName : Publish Logs
364374 inputs :
365- PathtoPublish : ' $(Build.SourcesDirectory)\ artifacts\NugetPackageRootContents '
366- ArtifactName : ' NuGetPackageContents SourceBuild_Windows '
375+ PathtoPublish : ' $(Build.SourcesDirectory)/ artifacts/log/Release '
376+ ArtifactName : ' SourceBuild_Windows_Test '
367377 publishLocation : Container
368378 continueOnError : true
369- condition : failed( )
379+ condition : not(succeeded() )
370380
371381 # Up-to-date - disabled due to it being flaky
372382 # - job: UpToDate_Windows
373383 # pool:
374- # vmImage: windows-2019
384+ # vmImage: windows-latest
375385 # steps:
376386 # - checkout: self
377387 # clean: true
@@ -381,13 +391,127 @@ stages:
381391 # filePath: eng\tests\UpToDate.ps1
382392 # arguments: -configuration $(_BuildConfig) -ci -binaryLog
383393
394+ # Source Build Semi-Official
395+ - ${{ if eq(variables['Build.Reason'], 'PullRequest') }} :
396+ - job : SourceBuild_Official
397+ # used until https://github.com/dotnet/source-build/issues/1795 is fixed
398+ pool :
399+ name : NetCorePublic-Pool
400+ queue : BuildPool.Ubuntu.1604.amd64.Open
401+ timeoutInMinutes : 90
402+ steps :
403+ - checkout : self
404+ clean : true
405+ - script : ./eng/cibuild.sh --configuration Release --prepareMachine --docker --sourceBuild
406+ displayName : Build
407+ - task : PublishPipelineArtifact@1
408+ displayName : Publish Logs
409+ inputs :
410+ targetPath : ' $(Build.SourcesDirectory)/artifacts/log/Release'
411+ artifactName : ' SourceBuild_Official Logs'
412+ continueOnError : true
413+ condition : not(succeeded())
414+ - task : PublishBuildArtifacts@1
415+ displayName : Publish Logs
416+ inputs :
417+ PathtoPublish : ' $(Build.SourcesDirectory)/artifacts/log/Release'
418+ ArtifactName : ' SourceBuild_Official_Test'
419+ publishLocation : Container
420+ continueOnError : true
421+ condition : not(succeeded())
422+
423+ # Plain build Windows
424+ # Disabled until the Windows Proto compiler is coreclr
425+ # - job: Plain_Build_Windows
426+ # pool:
427+ # vmImage: windows-latest
428+ # variables:
429+ # - name: _BuildConfig
430+ # value: Debug
431+ # steps:
432+ # - checkout: self
433+ # clean: true
434+ # - script: .\Build.cmd
435+ # displayName: Initial build
436+ # - script: dotnet --list-sdks
437+ # displayName: Report dotnet SDK versions
438+ # - task: UseDotNet@2
439+ # displayName: install SDK
440+ # inputs:
441+ # packageType: sdk
442+ # version: $(DotNetSdkVersion)
443+ # installationPath: $(Agent.ToolsDirectory)/dotnet
444+ # - script: dotnet build .\FSharp.sln /bl:\"artifacts/log/$(_BuildConfig)/RegularBuild.binlog\"
445+ # displayName: Regular rebuild
446+
447+ # Plain build Linux
448+ - job : Plain_Build_Linux
449+ pool :
450+ vmImage : ubuntu-latest
451+ variables :
452+ - name : _BuildConfig
453+ value : Debug
454+ steps :
455+ - checkout : self
456+ clean : true
457+ - script : ./build.sh
458+ displayName : Initial build
459+ - script : dotnet --list-sdks
460+ displayName : Report dotnet SDK versions
461+ - task : UseDotNet@2
462+ displayName : install SDK
463+ inputs :
464+ packageType : sdk
465+ version : $(DotNetSdkVersion)
466+ installationPath : $(Agent.ToolsDirectory)/dotnet
467+ - script : dotnet build ./FSharp.sln /bl:\"artifacts/log/$(_BuildConfig)/RegularBuild.binlog\"
468+ displayName : Regular rebuild
469+
470+ # Plain build Mac
471+ - job : Plain_Build_MacOS
472+ pool :
473+ vmImage : macos-latest
474+ variables :
475+ - name : _BuildConfig
476+ value : Debug
477+ steps :
478+ - checkout : self
479+ clean : true
480+ - script : ./build.sh
481+ displayName : Initial build
482+ - script : dotnet --list-sdks
483+ displayName : Report dotnet SDK versions
484+ - task : UseDotNet@2
485+ displayName : install SDK
486+ inputs :
487+ packageType : sdk
488+ version : $(DotNetSdkVersion)
489+ installationPath : $(Agent.ToolsDirectory)/dotnet
490+ - script : dotnet build ./FSharp.sln /bl:\"artifacts/log/$(_BuildConfig)/RegularBuild.binlog\"
491+ displayName : Regular rebuild
492+
493+ # Arcade-powered source build
494+ # turned off until https://github.com/dotnet/source-build/issues/1795 is fixed
495+ # - template: /eng/common/templates/jobs/jobs.yml
496+ # parameters:
497+ # enablePublishUsingPipelines: true
498+ # enablePublishBuildArtifacts: true
499+ # enablePublishBuildAssets: true
500+ # artifacts:
501+ # publish:
502+ # artifacts: true
503+ # manifests: true
504+ # runSourceBuild: true
505+ # sourceBuildParameters:
506+ # includeDefaultManagedPlatform: true
384507
385508# ---------------------------------------------------------------------------------------------------------------------#
386509# Post Build #
387510# ---------------------------------------------------------------------------------------------------------------------#
388511- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }} :
389512 - template : eng/common/templates/post-build/post-build.yml
390513 parameters :
514+ publishingInfraVersion : 3
391515 # Symbol validation is not entirely reliable as of yet, so should be turned off until https://github.com/dotnet/arcade/issues/2871 is resolved.
392516 enableSymbolValidation : false
393517 # SourceLink improperly looks for generated files. See https://github.com/dotnet/arcade/issues/3069
0 commit comments