346 строки
14 KiB
YAML
346 строки
14 KiB
YAML
# CI and PR triggers
|
|
trigger:
|
|
- master
|
|
- dev16.1
|
|
- feature/*
|
|
- release/*
|
|
pr:
|
|
- master
|
|
- dev16.1
|
|
- feature/*
|
|
- release/*
|
|
|
|
variables:
|
|
- name: _TeamName
|
|
value: FSharp
|
|
- name: _BuildConfig
|
|
value: Release
|
|
- name: _PublishUsingPipelines
|
|
value: true
|
|
- name: _DotNetArtifactsCategory
|
|
value: .NETCore
|
|
- name: VisualStudioDropName
|
|
value: Products/$(System.TeamProject)/$(Build.Repository.Name)/$(Build.SourceBranchName)/$(Build.BuildNumber)
|
|
|
|
# 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:
|
|
|
|
#-------------------------------------------------------------------------------------------------------------------#
|
|
# Signed build #
|
|
#-------------------------------------------------------------------------------------------------------------------#
|
|
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
|
- template: /eng/common/templates/jobs/jobs.yml
|
|
parameters:
|
|
enableMicrobuild: true
|
|
enablePublishBuildArtifacts: true
|
|
enablePublishTestResults: false
|
|
enablePublishBuildAssets: true
|
|
enablePublishUsingPipelines: $(_PublishUsingPipelines)
|
|
enableTelemetry: true
|
|
helixRepo: dotnet/fsharp
|
|
jobs:
|
|
- job: Full_Signed
|
|
pool:
|
|
name: NetCoreInternal-Pool
|
|
queue: buildpool.windows.10.amd64.vs2019
|
|
timeoutInMinutes: 300
|
|
variables:
|
|
- group: DotNet-Blob-Feed
|
|
- group: DotNet-Symbol-Server-Pats
|
|
- group: DotNet-DevDiv-Insertion-Workflow-Variables
|
|
- name: _SignType
|
|
value: Real
|
|
- name: _DotNetPublishToBlobFeed
|
|
value: true
|
|
steps:
|
|
- checkout: self
|
|
clean: true
|
|
- script: eng\CIBuild.cmd
|
|
-configuration $(_BuildConfig)
|
|
-prepareMachine
|
|
-testAll
|
|
-officialSkipTests $(SkipTests)
|
|
/p:SignType=$(_SignType)
|
|
/p:DotNetSignType=$(_SignType)
|
|
/p:MicroBuild_SigningEnabled=true
|
|
/p:OverridePackageSource=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
|
|
/p:TeamName=$(_TeamName)
|
|
/p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1)
|
|
/p:DotNetPublishBlobFeedUrl=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
|
|
/p:DotNetPublishToBlobFeed=true
|
|
/p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines)
|
|
/p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory)
|
|
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
|
|
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
|
|
/p:OfficialBuildId=$(BUILD.BUILDNUMBER)
|
|
/p:PublishToSymbolServer=true
|
|
/p:VisualStudioDropName=$(VisualStudioDropName)
|
|
- task: PublishTestResults@2
|
|
displayName: Publish Test Results
|
|
inputs:
|
|
testResultsFormat: 'NUnit'
|
|
testResultsFiles: '*.xml'
|
|
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
|
|
continueOnError: true
|
|
condition: ne(variables['SkipTests'], 'true')
|
|
- task: PublishBuildArtifacts@1
|
|
displayName: Publish Test Logs
|
|
inputs:
|
|
PathtoPublish: '$(Build.SourcesDirectory)\artifacts\TestResults\$(_BuildConfig)'
|
|
ArtifactName: 'Test Logs'
|
|
publishLocation: Container
|
|
continueOnError: true
|
|
condition: ne(variables['SkipTests'], 'true')
|
|
- task: PublishBuildArtifacts@1
|
|
displayName: Publish Artifact Packages
|
|
inputs:
|
|
PathtoPublish: '$(Build.SourcesDirectory)\artifacts\packages\$(_BuildConfig)'
|
|
ArtifactName: 'Packages'
|
|
condition: succeeded()
|
|
- task: PublishBuildArtifacts@1
|
|
displayName: Publish Artifact VSSetup
|
|
inputs:
|
|
PathtoPublish: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(_BuildConfig)\Insertion'
|
|
ArtifactName: 'VSSetup'
|
|
condition: succeeded()
|
|
- task: PublishBuildArtifacts@1
|
|
displayName: Publish Artifact Nightly
|
|
inputs:
|
|
PathtoPublish: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(_BuildConfig)\VisualFSharpFull.vsix'
|
|
ArtifactName: 'Nightly'
|
|
condition: succeeded()
|
|
- task: PublishBuildArtifacts@1
|
|
displayName: Publish Artifact Symbols
|
|
inputs:
|
|
PathtoPublish: '$(Build.SourcesDirectory)\artifacts\SymStore\$(_BuildConfig)'
|
|
ArtifactName: 'NativeSymbols'
|
|
condition: succeeded()
|
|
- task: ms-vseng.MicroBuildTasks.4305a8de-ba66-4d8b-b2d1-0dc4ecbbf5e8.MicroBuildUploadVstsDropFolder@1
|
|
displayName: Upload VSTS Drop
|
|
inputs:
|
|
DropName: $(VisualStudioDropName)
|
|
DropFolder: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(_BuildConfig)\Insertion'
|
|
AccessToken: $(dn-bot-devdiv-drop-rw-code-rw)
|
|
condition: succeeded()
|
|
|
|
#-------------------------------------------------------------------------------------------------------------------#
|
|
# 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)
|
|
enableTelemetry: true
|
|
helixRepo: dotnet/fsharp
|
|
jobs:
|
|
|
|
# Windows
|
|
- job: Windows
|
|
pool:
|
|
vmImage: windows-2019
|
|
timeoutInMinutes: 120
|
|
strategy:
|
|
maxParallel: 4
|
|
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
|
|
steps:
|
|
- checkout: self
|
|
clean: true
|
|
- script: eng\CIBuild.cmd -configuration $(_configuration) -$(_testKind)
|
|
displayName: Build / Test
|
|
- task: PublishTestResults@2
|
|
displayName: Publish Test Results
|
|
inputs:
|
|
testResultsFormat: 'NUnit'
|
|
testResultsFiles: '*.xml'
|
|
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_configuration)'
|
|
continueOnError: true
|
|
condition: ne(variables['_testKind'], 'testFSharpQA')
|
|
- 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: eq(variables['_testKind'], 'testFSharpQA')
|
|
|
|
# Linux
|
|
- job: Linux
|
|
pool:
|
|
vmImage: ubuntu-16.04
|
|
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: 'NUnit'
|
|
testResultsFiles: '*.xml'
|
|
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
|
|
continueOnError: true
|
|
condition: always()
|
|
|
|
# MacOS
|
|
- job: MacOS
|
|
pool:
|
|
vmImage: macOS-10.13
|
|
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: 'NUnit'
|
|
testResultsFiles: '*.xml'
|
|
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
|
|
continueOnError: true
|
|
condition: always()
|
|
|
|
# Source Build Linux
|
|
- job: SourceBuild_Linux
|
|
pool:
|
|
vmImage: ubuntu-16.04
|
|
steps:
|
|
- checkout: self
|
|
clean: true
|
|
- script: ./eng/cibuild.sh --configuration Release /p:DotNetBuildFromSource=true /p:FSharpSourceBuild=true
|
|
displayName: Build
|
|
|
|
# Source Build Windows
|
|
- job: SourceBuild_Windows
|
|
pool:
|
|
vmImage: windows-2019
|
|
steps:
|
|
- checkout: self
|
|
clean: true
|
|
- script: eng\CIBuild.cmd -configuration Release -noSign /p:DotNetBuildFromSource=true /p:FSharpSourceBuild=true
|
|
displayName: Build
|
|
|
|
# Up-to-date
|
|
- job: UpToDate_Windows
|
|
pool:
|
|
vmImage: windows-2019
|
|
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
|
|
|
|
#-------------------------------------------------------------------------------------------------------------------#
|
|
# FCS builds #
|
|
#-------------------------------------------------------------------------------------------------------------------#
|
|
|
|
- ${{ if eq(variables['System.TeamProject'], 'public') }}:
|
|
- template: /eng/common/templates/jobs/jobs.yml
|
|
parameters:
|
|
enableMicrobuild: true
|
|
enablePublishTestResults: false
|
|
enablePublishBuildAssets: true
|
|
enablePublishUsingPipelines: false
|
|
enableTelemetry: true
|
|
helixRepo: dotnet/fsharp
|
|
jobs:
|
|
|
|
- job: Windows_FCS
|
|
pool:
|
|
vmImage: windows-2019
|
|
variables:
|
|
- name: _SignType
|
|
value: Test
|
|
steps:
|
|
- checkout: self
|
|
clean: true
|
|
- script: fcs\build.cmd TestAndNuget
|
|
displayName: Build / Test
|
|
- task: PublishTestResults@2
|
|
displayName: Publish Test Results
|
|
inputs:
|
|
testResultsFormat: 'NUnit'
|
|
testResultsFiles: '*.xml'
|
|
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/Release'
|
|
continueOnError: true
|
|
condition: always()
|
|
|
|
- job: Linux_FCS
|
|
pool:
|
|
vmImage: ubuntu-16.04
|
|
variables:
|
|
- name: _SignType
|
|
value: Test
|
|
steps:
|
|
- checkout: self
|
|
clean: true
|
|
- script: ./fcs/build.sh
|
|
displayName: Build
|
|
|
|
# - job: MacOS_FCS
|
|
# pool:
|
|
# vmImage: macOS-10.13
|
|
# variables:
|
|
# - name: _SignType
|
|
# value: Test
|
|
# steps:
|
|
# - checkout: self
|
|
# clean: true
|
|
# - script: ./fcs/build.sh
|
|
# displayName: Build
|
|
|
|
#---------------------------------------------------------------------------------------------------------------------#
|
|
# Post Build #
|
|
#---------------------------------------------------------------------------------------------------------------------#
|
|
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
|
- template: eng/common/templates/post-build/post-build.yml
|
|
parameters:
|
|
# Symbol validation is not entirely reliable as of yet, so should be turned off until https://github.com/dotnet/arcade/issues/2871 is resolved.
|
|
enableSymbolValidation: false
|
|
# SourceLink improperly looks for generated files. See https://github.com/dotnet/arcade/issues/3069
|
|
enableSourceLinkValidation: false
|
|
|
|
#---------------------------------------------------------------------------------------------------------------------#
|
|
# VS Insertion #
|
|
#---------------------------------------------------------------------------------------------------------------------#
|
|
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
|
- template: eng/release/insert-into-vs.yml
|
|
parameters:
|
|
componentBranchName: refs/heads/release/dev16.4
|
|
insertTargetBranch: master
|
|
insertTeamEmail: fsharpteam@microsoft.com
|
|
insertTeamName: 'F#'
|