azure-pipelines.rx.yml 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  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. displayName: Move packages to LocalPackages directory
  118. - task: DotNetCoreCLI@2
  119. displayName: Update Rx
  120. inputs:
  121. command: custom
  122. projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LinuxTests/LinuxTests.csproj
  123. custom: add
  124. arguments: package System.Reactive -v $(NBGV_NuGetPackageVersion) -s $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages
  125. - task: DotNetCoreCLI@2
  126. displayName: Update Aliases
  127. inputs:
  128. command: custom
  129. projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LinuxTests/LinuxTests.csproj
  130. custom: add
  131. arguments: package System.Reactive.Observable.Aliases -v $(NBGV_NuGetPackageVersion) -s $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages
  132. - task: DotNetCoreCLI@2
  133. displayName: Update Testing
  134. inputs:
  135. command: custom
  136. projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LinuxTests/LinuxTests.csproj
  137. custom: add
  138. arguments: package Microsoft.Reactive.Testing -v $(NBGV_NuGetPackageVersion) -s $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages
  139. - task: DotNetCoreCLI@2
  140. inputs:
  141. command: test
  142. projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LinuxTests/LinuxTests.csproj
  143. arguments: -c $(BuildConfiguration) -f netcoreapp3.0
  144. displayName: Run 3.0 Tests on Linux
  145. - task: DotNetCoreInstaller@0
  146. inputs:
  147. version: '2.2.104'
  148. - task: DotNetCoreCLI@2
  149. inputs:
  150. command: test
  151. projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LinuxTests/LinuxTests.csproj
  152. arguments: -c $(BuildConfiguration) -f netcoreapp2.1 /p:TargetFrameworks=netcoreapp2.1
  153. displayName: Run 2.1 Tests on Linux
  154. - job: Integration_WindowsDesktop_Tests
  155. dependsOn: Build
  156. pool:
  157. vmImage: windows-2019
  158. variables:
  159. BuildConfiguration: Release
  160. BuildPlatform: Any CPU
  161. steps:
  162. - task: DotNetCoreInstaller@0
  163. inputs:
  164. version: '3.0.100-preview4-010374'
  165. - task: DotNetCoreCLI@2
  166. inputs:
  167. command: custom
  168. custom: tool
  169. arguments: install --tool-path . nbgv
  170. displayName: Install NBGV tool
  171. - script: nbgv cloud -a -p Rx.NET/Source
  172. displayName: Set Version
  173. - task: DownloadBuildArtifacts@0
  174. displayName: 'Download Build Artifacts'
  175. inputs:
  176. artifactName: artifacts
  177. downloadPath: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages
  178. - powershell: mv $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages/artifacts/*.* $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages
  179. displayName: Move packages to LocalPackages directory
  180. - task: DotNetCoreCLI@2
  181. displayName: Update Rx
  182. inputs:
  183. command: custom
  184. projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/WindowsDesktopTests/WindowsDesktopTests.csproj
  185. custom: add
  186. arguments: package System.Reactive -v $(NBGV_NuGetPackageVersion) -s $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages
  187. - task: DotNetCoreCLI@2
  188. displayName: Update Aliases
  189. inputs:
  190. command: custom
  191. projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/WindowsDesktopTests/WindowsDesktopTests.csproj
  192. custom: add
  193. arguments: package System.Reactive.Observable.Aliases -v $(NBGV_NuGetPackageVersion) -s $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages
  194. - task: DotNetCoreCLI@2
  195. displayName: Update Testing
  196. inputs:
  197. command: custom
  198. projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/WindowsDesktopTests/WindowsDesktopTests.csproj
  199. custom: add
  200. arguments: package Microsoft.Reactive.Testing -v $(NBGV_NuGetPackageVersion) -s $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages
  201. - task: DotNetCoreCLI@2
  202. inputs:
  203. command: test
  204. projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/WindowsDesktopTests/WindowsDesktopTests.csproj
  205. arguments: -c $(BuildConfiguration)
  206. displayName: Run 3.0 Tests on WindowDesktop