azure-pipelines.rx.yml 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. trigger:
  2. branches:
  3. include:
  4. - master
  5. - rel/*
  6. paths:
  7. include:
  8. - Rx.NET/Source/*
  9. - .editorconfig
  10. - azure-pipelines.rx.yml
  11. pr:
  12. branches:
  13. include:
  14. - master
  15. - rel/*
  16. paths:
  17. include:
  18. - Rx.NET/Source/*
  19. - .editorconfig
  20. - azure-pipelines.rx.yml
  21. jobs:
  22. - job: Build
  23. pool:
  24. vmImage: windows-2019
  25. variables:
  26. BuildConfiguration: Release
  27. BuildPlatform: Any CPU
  28. steps:
  29. - task: DotNetCoreInstaller@0
  30. inputs:
  31. version: '3.0.100-preview4-010374'
  32. - task: DotNetCoreCLI@2
  33. inputs:
  34. command: custom
  35. custom: tool
  36. arguments: install --tool-path . nbgv
  37. displayName: Install NBGV tool
  38. - script: nbgv cloud -a -p Rx.NET/Source
  39. displayName: Set Version
  40. - powershell: iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/onovotny/UpdateVsOnAgent/master/Fix-VisualStudioPreviewNuGetSdk.ps1'))
  41. displayName: VS Preview workaround
  42. - task: MSBuild@1
  43. displayName: Build System.Reactive.sln
  44. inputs:
  45. solution: Rx.NET/Source/System.Reactive.sln
  46. msbuildArguments: /restore /t:build /p:CreatePackage=true /p:NoPackageAnalysis=true /p:PackageOutputPath=$(Build.ArtifactStagingDirectory)\artifacts
  47. configuration: $(BuildConfiguration)
  48. maximumCpuCount: true
  49. - task: NuGetCommand@2
  50. displayName: Pack compatibility package
  51. inputs:
  52. command: custom
  53. arguments: pack Rx.NET/Source/facades/System.Reactive.Compatibility.nuspec -Version $(NBGV_NuGetPackageVersion) -MinClientVersion 2.12 -NoPackageAnalysis -outputdirectory $(Build.ArtifactStagingDirectory)\artifacts
  54. - task: MSBuild@1
  55. displayName: Build for Test (ppdb) workaround
  56. inputs:
  57. solution: Rx.NET/Source/System.Reactive.sln
  58. msbuildArguments: /t:build /p:DebugType=portable
  59. platform: $(BuildPlatform)
  60. configuration: $(BuildConfiguration)
  61. maximumCpuCount: true
  62. - task: DotNetCoreCLI@2
  63. inputs:
  64. command: test
  65. projects: Rx.NET/Source/tests/Tests.System.Reactive/*.csproj
  66. arguments: -c $(BuildConfiguration) --no-build --no-restore --filter "SkipCI!=true" --collect:"Code Coverage" -s $(System.DefaultWorkingDirectory)/Rx.NET/Source/CodeCoverage.runsettings
  67. displayName: Run Unit Tests
  68. - task: DotNetCoreCLI@2
  69. inputs:
  70. command: test
  71. projects: Rx.NET/Source/tests/Tests.System.Reactive.ApiApprovals/Tests.System.Reactive.ApiApprovals.csproj
  72. arguments: -c $(BuildConfiguration) --no-build --no-restore
  73. displayName: Run Api Approvals Tests
  74. - task: PowerShell@2
  75. displayName: Authenticode Sign Packages
  76. inputs:
  77. filePath: Rx.NET/Source/build/Sign-Package.ps1
  78. env:
  79. SignClientUser: $(SignClientUser)
  80. SignClientSecret: $(SignClientSecret)
  81. ArtifactDirectory: $(Build.ArtifactStagingDirectory)\artifacts
  82. condition: and(succeeded(), not(eq(variables['build.reason'], 'PullRequest')), not(eq(variables['SignClientSecret'], '')), not(eq(variables['SignClientUser'], '')))
  83. - task: PublishBuildArtifacts@1
  84. inputs:
  85. PathtoPublish: $(Build.ArtifactStagingDirectory)\artifacts
  86. ArtifactName: artifacts
  87. publishLocation: Container
  88. condition: always()
  89. - job: Integration_Linux_Tests
  90. dependsOn: Build
  91. pool:
  92. vmImage: ubuntu-16.04
  93. variables:
  94. BuildConfiguration: Release
  95. BuildPlatform: Any CPU
  96. steps:
  97. - task: DotNetCoreInstaller@0
  98. inputs:
  99. version: '2.2.104'
  100. - task: DotNetCoreCLI@2
  101. inputs:
  102. command: custom
  103. custom: tool
  104. arguments: install --tool-path . nbgv
  105. displayName: Install NBGV tool
  106. - script: ./nbgv cloud -a -p Rx.NET/Source
  107. displayName: Set Version
  108. - task: DotNetCoreInstaller@0
  109. inputs:
  110. version: '3.0.100-preview4-010374'
  111. - task: DownloadBuildArtifacts@0
  112. displayName: 'Download Build Artifacts'
  113. inputs:
  114. artifactName: artifacts
  115. downloadPath: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages
  116. - script: mv $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages/artifacts/*.* $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages
  117. - task: DotNetCoreCLI@2
  118. displayName: Update Rx
  119. inputs:
  120. command: custom
  121. projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LinuxTests/LinuxTests.csproj
  122. custom: add
  123. arguments: package System.Reactive -v $(NBGV_NuGetPackageVersion) -s $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages
  124. - task: DotNetCoreCLI@2
  125. displayName: Update Aliases
  126. inputs:
  127. command: custom
  128. projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LinuxTests/LinuxTests.csproj
  129. custom: add
  130. arguments: package System.Reactive.Observable.Aliases -v $(NBGV_NuGetPackageVersion) -s $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages
  131. - task: DotNetCoreCLI@2
  132. displayName: Update Testing
  133. inputs:
  134. command: custom
  135. projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LinuxTests/LinuxTests.csproj
  136. custom: add
  137. arguments: package Microsoft.Reactive.Testing -v $(NBGV_NuGetPackageVersion) -s $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages
  138. - task: DotNetCoreCLI@2
  139. inputs:
  140. command: test
  141. projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LinuxTests/LinuxTests.csproj
  142. arguments: -c $(BuildConfiguration) -f netcoreapp3.0
  143. displayName: Run 3.0 Tests on Linux
  144. - task: DotNetCoreInstaller@0
  145. inputs:
  146. version: '2.2.104'
  147. - task: DotNetCoreCLI@2
  148. inputs:
  149. command: test
  150. projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LinuxTests/LinuxTests.csproj
  151. arguments: -c $(BuildConfiguration) -f netcoreapp2.1 /p:TargetFrameworks=netcoreapp2.1
  152. displayName: Run 2.1 Tests on Linux
  153. - job: Integration_WindowsDesktop_Tests
  154. dependsOn: Build
  155. pool:
  156. vmImage: windows-2019
  157. variables:
  158. BuildConfiguration: Release
  159. BuildPlatform: Any CPU
  160. steps:
  161. - task: DotNetCoreInstaller@0
  162. inputs:
  163. version: '3.0.100-preview4-010374'
  164. - task: DotNetCoreCLI@2
  165. inputs:
  166. command: custom
  167. custom: tool
  168. arguments: install --tool-path . nbgv
  169. displayName: Install NBGV tool
  170. - script: ./nbgv cloud -a -p Rx.NET/Source
  171. displayName: Set Version
  172. - task: DownloadBuildArtifacts@0
  173. displayName: 'Download Build Artifacts'
  174. inputs:
  175. artifactName: artifacts
  176. downloadPath: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages
  177. - powershell: mv $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages/artifacts/*.* $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages
  178. - task: DotNetCoreCLI@2
  179. displayName: Update Rx
  180. inputs:
  181. command: custom
  182. projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/WindowsDesktopTests/WindowsDesktopTests.csproj
  183. custom: add
  184. arguments: package System.Reactive -v $(NBGV_NuGetPackageVersion) -s $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages
  185. - task: DotNetCoreCLI@2
  186. displayName: Update Aliases
  187. inputs:
  188. command: custom
  189. projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/WindowsDesktopTests/WindowsDesktopTests.csproj
  190. custom: add
  191. arguments: package System.Reactive.Observable.Aliases -v $(NBGV_NuGetPackageVersion) -s $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages
  192. - task: DotNetCoreCLI@2
  193. displayName: Update Testing
  194. inputs:
  195. command: custom
  196. projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/WindowsDesktopTests/WindowsDesktopTests.csproj
  197. custom: add
  198. arguments: package Microsoft.Reactive.Testing -v $(NBGV_NuGetPackageVersion) -s $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages
  199. - task: DotNetCoreCLI@2
  200. inputs:
  201. command: test
  202. projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/WindowsDesktopTests/WindowsDesktopTests.csproj
  203. arguments: -c $(BuildConfiguration)
  204. displayName: Run 3.0 Tests on WindowDesktop