diff --git a/Rx.NET/Integration/IntegrationTests.sln b/Rx.NET/Integration/IntegrationTests.sln new file mode 100644 index 0000000000..597556355f --- /dev/null +++ b/Rx.NET/Integration/IntegrationTests.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.28407.52 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LinuxTests", "LinuxTests\LinuxTests.csproj", "{E5607740-EAAC-4A42-B59C-3B2387582559}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WindowsDesktopTests", "WindowsDesktopTests\WindowsDesktopTests.csproj", "{EFAFAEC1-AB20-4B16-8D6C-005052866B3F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E5607740-EAAC-4A42-B59C-3B2387582559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E5607740-EAAC-4A42-B59C-3B2387582559}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E5607740-EAAC-4A42-B59C-3B2387582559}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E5607740-EAAC-4A42-B59C-3B2387582559}.Release|Any CPU.Build.0 = Release|Any CPU + {EFAFAEC1-AB20-4B16-8D6C-005052866B3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EFAFAEC1-AB20-4B16-8D6C-005052866B3F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EFAFAEC1-AB20-4B16-8D6C-005052866B3F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EFAFAEC1-AB20-4B16-8D6C-005052866B3F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {2ABA1A1F-6AEE-4AB5-A710-4D7474576023} + EndGlobalSection +EndGlobal diff --git a/Rx.NET/Integration/LinuxTests/LinuxTests.csproj b/Rx.NET/Integration/LinuxTests/LinuxTests.csproj new file mode 100644 index 0000000000..0f74abb65a --- /dev/null +++ b/Rx.NET/Integration/LinuxTests/LinuxTests.csproj @@ -0,0 +1,34 @@ + + + netcoreapp3.0;netcoreapp2.1 + $(NoWarn);CS0618 + latest + Tests.System.Reactive + Tests.System.Reactive + true + ..\..\Source\ReactiveX.snk + + + + $(DefineConstants);HAS_TRACE;HAS_WINRT;PREFER_ASYNC;HAS_TPL46;NO_REMOTING + + + $(DefineConstants);HAS_TRACE;HAS_WINRT;PREFER_ASYNC;HAS_TPL46;NO_REMOTING;LINUX + + + + + PreserveNewest + + + + + + + + + + + + + \ No newline at end of file diff --git a/Rx.NET/Integration/LocalPackages/.keepme b/Rx.NET/Integration/LocalPackages/.keepme new file mode 100644 index 0000000000..ee30b224d6 --- /dev/null +++ b/Rx.NET/Integration/LocalPackages/.keepme @@ -0,0 +1 @@ +Placeholder to keep this directory \ No newline at end of file diff --git a/Rx.NET/Integration/NuGet.Config b/Rx.NET/Integration/NuGet.Config index 32dcdd4ad6..1f5149d054 100644 --- a/Rx.NET/Integration/NuGet.Config +++ b/Rx.NET/Integration/NuGet.Config @@ -1,9 +1,9 @@  - - + - + + diff --git a/Rx.NET/Integration/WindowsDesktopTests/WindowsDesktopTests.csproj b/Rx.NET/Integration/WindowsDesktopTests/WindowsDesktopTests.csproj new file mode 100644 index 0000000000..ea0f1e73e8 --- /dev/null +++ b/Rx.NET/Integration/WindowsDesktopTests/WindowsDesktopTests.csproj @@ -0,0 +1,34 @@ + + + netcoreapp3.0 + $(NoWarn);CS0618 + latest + Tests.System.Reactive + Tests.System.Reactive + true + ..\..\Source\ReactiveX.snk + true + true + + + + + $(DefineConstants);HAS_TRACE;HAS_WINRT;PREFER_ASYNC;HAS_TPL46;NO_REMOTING;HAS_WINFORMS;HAS_DISPATCHER;DESKTOPCLR + + + + + PreserveNewest + + + + + + + + + + + + + \ No newline at end of file diff --git a/Rx.NET/Integration/global.json b/Rx.NET/Integration/global.json new file mode 100644 index 0000000000..0af6548b41 --- /dev/null +++ b/Rx.NET/Integration/global.json @@ -0,0 +1,8 @@ +{ + "sdk": { + "version": "3.0.100-preview" + }, + "msbuild-sdks": { + "MSBuild.Sdk.Extras": "2.0.0-preview.14" + } +} \ No newline at end of file diff --git a/Rx.NET/Source/Directory.build.props b/Rx.NET/Source/Directory.build.props index 4ca5fa42a0..f341e380da 100644 --- a/Rx.NET/Source/Directory.build.props +++ b/Rx.NET/Source/Directory.build.props @@ -1,6 +1,5 @@ - $(AssemblyName) ($(TargetFramework)) Copyright (c) .NET Foundation and Contributors. 2.12 true @@ -12,7 +11,7 @@ embedded true $(MSBuildThisFileDirectory)ReactiveX.snk - $(NoWarn);1701;1702;CS1591 + $(NoWarn);1701;1702;CS1591;NU5105 en-US false $(MSBuildProjectName.Contains('Tests')) diff --git a/Rx.NET/Source/Directory.build.targets b/Rx.NET/Source/Directory.build.targets index 8e2d441623..f6bdf9ae16 100644 --- a/Rx.NET/Source/Directory.build.targets +++ b/Rx.NET/Source/Directory.build.targets @@ -1,31 +1,42 @@ + + + $(AssemblyName) ($(TargetFramework)) + + $(DefineConstants);HAS_TRACE;HAS_WINRT;HAS_WINFORMS;HAS_DISPATCHER;PREFER_ASYNC;HAS_TPL46;DESKTOPCLR - 10.0.16299.0 + 10.0.17763.0 10.0.15063.0 $(DefineConstants);NO_CODE_COVERAGE_ATTRIBUTE;HAS_WINRT;PREFER_ASYNC;HAS_TPL46;NO_REMOTING;NO_SERIALIZABLE;CRIPPLED_REFLECTION;NO_THREAD;WINDOWS $(DefineConstants);HAS_TRACE;HAS_WINRT;PREFER_ASYNC;HAS_TPL46;NO_REMOTING;WINDOWS + 10.0.17763.0 $(DefineConstants);HAS_TRACE;HAS_WINRT;PREFER_ASYNC;HAS_TPL46;NO_REMOTING - $(DefineConstants);HAS_TRACE;HAS_WINRT;HAS_WINFORMS;HAS_DISPATCHER;PREFER_ASYNC;HAS_TPL46;NO_REMOTING;DESKTOPCLR + $(DefineConstants);HAS_TRACE;HAS_WINRT;PREFER_ASYNC;HAS_TPL46;NO_REMOTING;HAS_WINFORMS;HAS_DISPATCHER;DESKTOPCLR + + + + + - - + + - + diff --git a/Rx.NET/Source/global.json b/Rx.NET/Source/global.json index 0af6548b41..dcedd131ef 100644 --- a/Rx.NET/Source/global.json +++ b/Rx.NET/Source/global.json @@ -1,8 +1,8 @@ { "sdk": { - "version": "3.0.100-preview" + "version": "3.0.100-preview4" }, "msbuild-sdks": { - "MSBuild.Sdk.Extras": "2.0.0-preview.14" + "MSBuild.Sdk.Extras": "2.0.0-preview.21" } } \ No newline at end of file diff --git a/Rx.NET/Source/src/System.Reactive/System.Reactive.csproj b/Rx.NET/Source/src/System.Reactive/System.Reactive.csproj index 191dc7d8e1..928d4698da 100644 --- a/Rx.NET/Source/src/System.Reactive/System.Reactive.csproj +++ b/Rx.NET/Source/src/System.Reactive/System.Reactive.csproj @@ -3,12 +3,13 @@ netcoreapp3.0;netstandard2.0;net46;uap10.0;uap10.0.16299 false Rx;Reactive;Extensions;Observable;LINQ;Events - Reactive Extensions (Rx) for .NET + Reactive Extensions (Rx) for .NET true true + false @@ -29,7 +30,7 @@ - + @@ -46,7 +47,7 @@ - + @@ -63,5 +64,34 @@ + + + $(TargetsForTfmSpecificBuildOutput);RemoveNetCoreApp3FromNuGet + $(TargetsForTfmSpecificContentInPackage);AddNetCore3ToNuGet + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Rx.NET/Source/src/System.Reactive/build/System.Reactive.targets b/Rx.NET/Source/src/System.Reactive/build/System.Reactive.targets new file mode 100644 index 0000000000..c209ae2cbf --- /dev/null +++ b/Rx.NET/Source/src/System.Reactive/build/System.Reactive.targets @@ -0,0 +1,10 @@ + + + true + false + + + + + + \ No newline at end of file diff --git a/Rx.NET/Source/src/System.Reactive/build/_._ b/Rx.NET/Source/src/System.Reactive/build/_._ new file mode 100644 index 0000000000..e69de29bb2 diff --git a/Rx.NET/Source/tests/Tests.System.Reactive.Uwp.DeviceRunner/Tests.System.Reactive.Uwp.DeviceRunner.csproj b/Rx.NET/Source/tests/Tests.System.Reactive.Uwp.DeviceRunner/Tests.System.Reactive.Uwp.DeviceRunner.csproj index e6adfdc2fc..d54519b8ce 100644 --- a/Rx.NET/Source/tests/Tests.System.Reactive.Uwp.DeviceRunner/Tests.System.Reactive.Uwp.DeviceRunner.csproj +++ b/Rx.NET/Source/tests/Tests.System.Reactive.Uwp.DeviceRunner/Tests.System.Reactive.Uwp.DeviceRunner.csproj @@ -90,9 +90,9 @@ true - - - + + + diff --git a/azure-pipelines.rx.yml b/azure-pipelines.rx.yml index b29a116ddf..d675d920f2 100644 --- a/azure-pipelines.rx.yml +++ b/azure-pipelines.rx.yml @@ -20,83 +20,227 @@ pr: - .editorconfig - azure-pipelines.rx.yml -pool: - vmImage: vs2017-win2016 +jobs: +- job: Build + pool: + vmImage: windows-2019 -variables: - BuildConfiguration: Release - BuildPlatform: Any CPU + variables: + BuildConfiguration: Release + BuildPlatform: Any CPU + + steps: + - task: DotNetCoreInstaller@0 + inputs: + version: '3.0.100-preview4-010374' + + - task: DotNetCoreCLI@2 + inputs: + command: custom + custom: tool + arguments: install --tool-path . nbgv + displayName: Install NBGV tool + + - script: nbgv cloud -a -p Rx.NET/Source + displayName: Set Version + + - powershell: iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/onovotny/UpdateVsOnAgent/master/Fix-VisualStudioPreviewNuGetSdk.ps1')) + displayName: VS Preview workaround + + - task: MSBuild@1 + displayName: Build System.Reactive.sln + inputs: + solution: Rx.NET/Source/System.Reactive.sln + msbuildArguments: /restore /t:build /p:CreatePackage=true /p:NoPackageAnalysis=true /p:PackageOutputPath=$(Build.ArtifactStagingDirectory)\artifacts + configuration: $(BuildConfiguration) + maximumCpuCount: true + + - task: NuGetCommand@2 + displayName: Pack compatibility package + inputs: + command: custom + arguments: pack Rx.NET/Source/facades/System.Reactive.Compatibility.nuspec -Version $(NBGV_NuGetPackageVersion) -MinClientVersion 2.12 -NoPackageAnalysis -outputdirectory $(Build.ArtifactStagingDirectory)\artifacts -steps: -- task: DotNetCoreInstaller@0 - inputs: - version: '3.0.100-preview-009812' - -- task: DotNetCoreCLI@2 - inputs: - command: custom - custom: tool - arguments: install --tool-path . nbgv - displayName: Install NBGV tool - -- script: nbgv cloud -a -p Rx.NET\Source - displayName: Set Version - -- task: MSBuild@1 - displayName: Build System.Reactive.sln - inputs: - solution: Rx.NET/Source/System.Reactive.sln - msbuildArguments: /restore /t:build /p:CreatePackage=true /p:NoPackageAnalysis=true /p:PackageOutputPath=$(Build.ArtifactStagingDirectory)\artifacts - platform: $(BuildPlatform) - configuration: $(BuildConfiguration) - maximumCpuCount: true - -- task: NuGetCommand@2 - displayName: Pack compatibility package - inputs: - command: custom - arguments: pack Rx.NET/Source/facades/System.Reactive.Compatibility.nuspec -Version $(NBGV_NuGetPackageVersion) -MinClientVersion 2.12 -NoPackageAnalysis -outputdirectory $(Build.ArtifactStagingDirectory)\artifacts + - task: MSBuild@1 + displayName: Build for Test (ppdb) workaround + inputs: + solution: Rx.NET/Source/System.Reactive.sln + msbuildArguments: /t:build /p:DebugType=portable + platform: $(BuildPlatform) + configuration: $(BuildConfiguration) + maximumCpuCount: true + + - task: DotNetCoreCLI@2 + inputs: + command: test + projects: Rx.NET/Source/tests/Tests.System.Reactive/*.csproj + arguments: -c $(BuildConfiguration) --no-build --no-restore --filter "SkipCI!=true" --collect:"Code Coverage" -s $(System.DefaultWorkingDirectory)/Rx.NET/Source/CodeCoverage.runsettings + displayName: Run Unit Tests + + - task: DotNetCoreCLI@2 + inputs: + command: test + projects: Rx.NET/Source/tests/Tests.System.Reactive.ApiApprovals/Tests.System.Reactive.ApiApprovals.csproj + arguments: -c $(BuildConfiguration) --no-build --no-restore + displayName: Run Api Approvals Tests + + + - task: PowerShell@2 + displayName: Authenticode Sign Packages + inputs: + filePath: Rx.NET/Source/build/Sign-Package.ps1 + env: + SignClientUser: $(SignClientUser) + SignClientSecret: $(SignClientSecret) + ArtifactDirectory: $(Build.ArtifactStagingDirectory)\artifacts + condition: and(succeeded(), not(eq(variables['build.reason'], 'PullRequest')), not(eq(variables['SignClientSecret'], '')), not(eq(variables['SignClientUser'], ''))) + + - task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: $(Build.ArtifactStagingDirectory)\artifacts + ArtifactName: artifacts + publishLocation: Container + condition: always() + +- job: Integration_Linux_Tests + dependsOn: Build + pool: + vmImage: ubuntu-16.04 + + variables: + BuildConfiguration: Release + BuildPlatform: Any CPU + + steps: + - task: DotNetCoreInstaller@0 + inputs: + version: '2.2.104' + + - task: DotNetCoreCLI@2 + inputs: + command: custom + custom: tool + arguments: install --tool-path . nbgv + displayName: Install NBGV tool + + - script: ./nbgv cloud -a -p Rx.NET/Source + displayName: Set Version + + - task: DotNetCoreInstaller@0 + inputs: + version: '3.0.100-preview4-010374' + + - task: DownloadBuildArtifacts@0 + displayName: 'Download Build Artifacts' + inputs: + artifactName: artifacts + downloadPath: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages + + - script: mv $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages/artifacts/*.* $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages + displayName: Move packages to LocalPackages directory + + - task: DotNetCoreCLI@2 + displayName: Update Rx + inputs: + command: custom + projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LinuxTests/LinuxTests.csproj + custom: add + arguments: package System.Reactive -v $(NBGV_NuGetPackageVersion) -s $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages + + - task: DotNetCoreCLI@2 + displayName: Update Aliases + inputs: + command: custom + projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LinuxTests/LinuxTests.csproj + custom: add + arguments: package System.Reactive.Observable.Aliases -v $(NBGV_NuGetPackageVersion) -s $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages + + - task: DotNetCoreCLI@2 + displayName: Update Testing + inputs: + command: custom + projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LinuxTests/LinuxTests.csproj + custom: add + arguments: package Microsoft.Reactive.Testing -v $(NBGV_NuGetPackageVersion) -s $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages + + - task: DotNetCoreCLI@2 + inputs: + command: test + projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LinuxTests/LinuxTests.csproj + arguments: -c $(BuildConfiguration) -f netcoreapp3.0 + displayName: Run 3.0 Tests on Linux + + - task: DotNetCoreInstaller@0 + inputs: + version: '2.2.104' + + - task: DotNetCoreCLI@2 + inputs: + command: test + projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LinuxTests/LinuxTests.csproj + arguments: -c $(BuildConfiguration) -f netcoreapp2.1 /p:TargetFrameworks=netcoreapp2.1 + displayName: Run 2.1 Tests on Linux + +- job: Integration_WindowsDesktop_Tests + dependsOn: Build + pool: + vmImage: windows-2019 -- task: MSBuild@1 - displayName: Build for Test (ppdb) workaround - inputs: - solution: Rx.NET/Source/System.Reactive.sln - msbuildArguments: /t:build /p:DebugType=portable - platform: $(BuildPlatform) - configuration: $(BuildConfiguration) - maximumCpuCount: true - -- task: DotNetCoreCLI@2 - inputs: - command: test - projects: Rx.NET/Source/tests/Tests.System.Reactive/*.csproj - arguments: -c $(BuildConfiguration) --no-build --no-restore --filter "SkipCI!=true" --collect:"Code Coverage" -s $(System.DefaultWorkingDirectory)/Rx.NET/Source/CodeCoverage.runsettings - displayName: Run Unit Tests - -- task: DotNetCoreCLI@2 - inputs: - command: test - projects: Rx.NET/Source/tests/Tests.System.Reactive.ApiApprovals/Tests.System.Reactive.ApiApprovals.csproj - arguments: -c $(BuildConfiguration) --no-build --no-restore - displayName: Run Api Approvals Tests - -- task: whitesource.ws-bolt.bolt.wss.WhiteSource Bolt@18 - displayName: 'WhiteSource Bolt' - enabled: false + variables: + BuildConfiguration: Release + BuildPlatform: Any CPU -- task: PowerShell@2 - displayName: Authenticode Sign Packages - inputs: - filePath: Rx.NET/Source/build/Sign-Package.ps1 - env: - SignClientUser: $(SignClientUser) - SignClientSecret: $(SignClientSecret) - ArtifactDirectory: $(Build.ArtifactStagingDirectory)\artifacts - condition: and(succeeded(), not(eq(variables['build.reason'], 'PullRequest')), not(eq(variables['SignClientSecret'], '')), not(eq(variables['SignClientUser'], ''))) - -- task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: $(Build.ArtifactStagingDirectory)\artifacts - ArtifactName: artifacts - publishLocation: Container + steps: + - task: DotNetCoreInstaller@0 + inputs: + version: '3.0.100-preview4-010374' + + - task: DotNetCoreCLI@2 + inputs: + command: custom + custom: tool + arguments: install --tool-path . nbgv + displayName: Install NBGV tool + + - script: nbgv cloud -a -p Rx.NET/Source + displayName: Set Version + + - task: DownloadBuildArtifacts@0 + displayName: 'Download Build Artifacts' + inputs: + artifactName: artifacts + downloadPath: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages + + - powershell: mv $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages/artifacts/*.* $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages + displayName: Move packages to LocalPackages directory + + - task: DotNetCoreCLI@2 + displayName: Update Rx + inputs: + command: custom + projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/WindowsDesktopTests/WindowsDesktopTests.csproj + custom: add + arguments: package System.Reactive -v $(NBGV_NuGetPackageVersion) -s $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages + + - task: DotNetCoreCLI@2 + displayName: Update Aliases + inputs: + command: custom + projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/WindowsDesktopTests/WindowsDesktopTests.csproj + custom: add + arguments: package System.Reactive.Observable.Aliases -v $(NBGV_NuGetPackageVersion) -s $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages + + - task: DotNetCoreCLI@2 + displayName: Update Testing + inputs: + command: custom + projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/WindowsDesktopTests/WindowsDesktopTests.csproj + custom: add + arguments: package Microsoft.Reactive.Testing -v $(NBGV_NuGetPackageVersion) -s $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages + - task: DotNetCoreCLI@2 + inputs: + command: test + projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/WindowsDesktopTests/WindowsDesktopTests.csproj + arguments: -c $(BuildConfiguration) + displayName: Run 3.0 Tests on WindowDesktop