| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- trigger:
- branches:
- include:
- - main
- - rel/*
- paths:
- include:
- - Ix.NET/Source/*
- - .editorconfig
- - azure-pipelines.ix.yml
- pr:
- branches:
- include:
- - main
- - rel/*
- paths:
- include:
- - Ix.NET/Source/*
- - .editorconfig
- - azure-pipelines.ix.yml
- variables:
- BuildConfiguration: Release
- DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
- stages:
- - stage: Build
- jobs:
- - job: Build
- pool:
- vmImage: ubuntu-latest
- steps:
- - task: UseDotNet@2
- displayName: Use .NET Core 5.0.x SDK
- inputs:
- version: 5.0.x
- includePreviewVersions: true
- - task: UseDotNet@2
- displayName: .NET Core 3.1 runtime
- inputs:
- version: '3.1.x'
- packageType: runtime
-
- - task: UseDotNet@2
- displayName: .NET Core 2.1 runtime
- inputs:
- version: '2.1.x'
- packageType: runtime
- - task: DotNetCoreCLI@2
- inputs:
- command: custom
- custom: tool
- arguments: install --tool-path . nbgv
- displayName: Install NBGV tool
- - script: nbgv cloud -p Ix.NET/Source
- displayName: Set Version
- - task: DotNetCoreCLI@2
- inputs:
- command: restore
- projects: Ix.NET/Source/**/*.csproj
- displayName: Restore
- - task: DotNetCoreCLI@2
- inputs:
- command: pack
- packagesToPack: Ix.NET/Source/**/System.Interactive*.csproj;Ix.NET/Source/**/System.Linq.*.csproj;!Ix.NET/Source/**/*.Tests*.csproj;!Ix.NET/Source/refs/**
- configuration: $(BuildConfiguration)
- packDirectory: $(Build.ArtifactStagingDirectory)/artifacts
- verbosityPack: Minimal
- displayName: Pack
- - task: DotNetCoreCLI@2
- inputs:
- command: custom
- custom: tool
- arguments: install --tool-path . dotnet-reportgenerator-globaltool
- displayName: Install ReportGenerator tool
- - task: DotNetCoreCLI@2
- inputs:
- command: test
- projects: Ix.NET/Source/**/*.Tests.csproj
- arguments: -c $(BuildConfiguration) --settings Ix.NET/Source/CodeCoverage.runsettings --collect:"XPlat Code Coverage" -- RunConfiguration.DisableAppDomain=true
- displayName: Run Tests
- - script: reportgenerator -reports:$(Agent.TempDirectory)/**/coverage.cobertura.xml -targetdir:$(Build.SourcesDirectory)/Ix.NET/Source/coverlet/reports -reporttypes:"Cobertura"
- displayName: Create reports
- - task: PublishCodeCoverageResults@1
- displayName: 'Publish code coverage'
- inputs:
- codeCoverageTool: Cobertura
- summaryFileLocation: $(Build.SourcesDirectory)/Ix.NET/Source/coverlet/reports/Cobertura.xml
- - publish: Ix.NET/Source/build
- artifact: config
- displayName: Publish signing config
- - publish: $(Build.ArtifactStagingDirectory)/artifacts
- displayName: Publish artifacts
- artifact: BuildPackages
- - stage: CodeSign
- condition: and(succeeded('Build'), not(eq(variables['build.reason'], 'PullRequest')))
- jobs:
- - deployment: CodeSign
- displayName: Code Signing
- pool:
- vmImage: windows-latest
- environment: Code Sign
- variables:
- - group: SignClient Credentials
- strategy:
- runOnce:
- deploy:
- steps:
- - task: DotNetCoreCLI@2
- inputs:
- command: custom
- custom: tool
- arguments: install --tool-path . SignClient
- displayName: Install SignTool tool
- - pwsh: |
- .\SignClient "Sign" `
- --baseDirectory "$(Pipeline.Workspace)\BuildPackages" `
- --input "**/*.nupkg" `
- --config "$(Pipeline.Workspace)\config\signclient.json" `
- --user "$(SignClientUser)" `
- --secret "$(SignClientSecret)" `
- --name "Ix.NET" `
- --description "Ix.NET" `
- --descriptionUrl "https://github.com/dotnet/reactive"
- displayName: Sign packages
- - publish: $(Pipeline.Workspace)/BuildPackages
- displayName: Publish Signed Packages
- artifact: SignedPackages
|