diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 00000000000..0774ed4a770 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,192 @@ +# CI and PR triggers +trigger: +- master +- dev16.1 +- release/* +pr: +- master +- dev16.1 +- 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) + +jobs: +- template: /eng/common/templates/jobs/jobs.yml + parameters: + enableMicrobuild: true + enablePublishBuildArtifacts: true + enablePublishTestResults: false + enablePublishBuildAssets: true + enablePublishUsingPipelines: $(_PublishUsingPipelines) + enableTelemetry: true + helixRepo: microsoft/visualfsharp + jobs: + # Full-signed internal build + - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - job: Full_Signed + pool: + name: NetCoreInternal-Pool + queue: buildpool.windows.10.amd64.vs2017 + variables: + - group: DotNet-Blob-Feed + - group: DotNet-Symbol-Server-Pats + - name: _SignType + value: Real + - name: _DotNetPublishToBlobFeed + value: true + steps: + - checkout: self + clean: true + - script: eng\CIBuild.cmd + -configuration $(_BuildConfig) + -prepareMachine + -testAll + -warnaserror:0 + /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) + + #-----------------------------------------------------------------------------------------------------------------# + # PR builds # + #-----------------------------------------------------------------------------------------------------------------# + + # Windows + - ${{ if eq(variables['System.TeamProject'], 'public') }}: + - 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 + + # Windows FCS + - ${{ if eq(variables['System.TeamProject'], 'public') }}: + - 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 + + # Linux + - ${{ if eq(variables['System.TeamProject'], 'public') }}: + - 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 + + # Linux FCS + - ${{ if eq(variables['System.TeamProject'], 'public') }}: + - job: Linux_FCS + pool: + vmImage: ubuntu-16.04 + variables: + - name: _SignType + value: Test + steps: + - checkout: self + clean: true + - script: ./fcs/build.sh Build + displayName: Build + + # MacOS + - ${{ if eq(variables['System.TeamProject'], 'public') }}: + - 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 + + # MacOS FCS + - ${{ if eq(variables['System.TeamProject'], 'public') }}: + - job: MacOS_FCS + pool: + vmImage: macOS-10.13 + variables: + - name: _SignType + value: Test + steps: + - checkout: self + clean: true + - script: ./fcs/build.sh Build + displayName: Build + + # Source Build Linux + - ${{ if eq(variables['System.TeamProject'], 'public') }}: + - 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 + - ${{ if eq(variables['System.TeamProject'], 'public') }}: + - 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