|
@@ -16,21 +16,18 @@ $signClientAppPath = Join-Path (Join-Path (Join-Path .\Packages "SignClient") "T
|
|
|
#remove any old coverage file
|
|
|
md -Force $outputLocation | Out-Null
|
|
|
$outputPath = (Resolve-Path $outputLocation).Path
|
|
|
-$outputFileDotCover1 = Join-Path $outputPath -childpath 'coverage-ix1.dcvr'
|
|
|
-$outputFileDotCover2 = Join-Path $outputPath -childpath 'coverage-ix2.dcvr'
|
|
|
-$outputFileDotCover = Join-Path $outputPath -childpath 'coverage-ix.dcvr'
|
|
|
$outputFile = Join-Path $outputPath -childpath 'coverage-ix.xml'
|
|
|
Remove-Item $outputPath -Force -Recurse
|
|
|
md -Force $outputLocation | Out-Null
|
|
|
|
|
|
if (!(Test-Path .\nuget.exe)) {
|
|
|
- wget "https://dist.nuget.org/win-x86-commandline/v4.0.0/nuget.exe" -outfile .\nuget.exe
|
|
|
+ wget "https://dist.nuget.org/win-x86-commandline/v4.1.0/nuget.exe" -outfile .\nuget.exe
|
|
|
}
|
|
|
|
|
|
# get tools
|
|
|
.\nuget.exe install -excludeversion SignClient -Version 0.7.0 -outputdirectory packages
|
|
|
.\nuget.exe install -excludeversion JetBrains.dotCover.CommandLineTools -pre -outputdirectory packages
|
|
|
-.\nuget.exe install -excludeversion Nerdbank.GitVersioning -Version 2.0.4-beta -pre -outputdirectory packages
|
|
|
+.\nuget.exe install -excludeversion Nerdbank.GitVersioning -Version 2.0.21-beta -pre -outputdirectory packages
|
|
|
.\nuget.exe install -excludeversion xunit.runner.console -pre -outputdirectory packages
|
|
|
.\nuget.exe install -excludeversion ReportGenerator -outputdirectory packages
|
|
|
#.\nuget.exe install -excludeversion coveralls.io -outputdirectory packages
|
|
@@ -47,13 +44,19 @@ New-Item -ItemType Directory -Force -Path $artifacts
|
|
|
|
|
|
Write-Host "Restoring packages for $scriptPath\Ix.NET.sln" -Foreground Green
|
|
|
# use nuget.exe to restore on the legacy proj type
|
|
|
-.\nuget.exe restore "$scriptPath\System.Interactive.Tests.Uwp.DeviceRunner\System.Interactive.Tests.Uwp.DeviceRunner.csproj"
|
|
|
-msbuild "$scriptPath\Ix.NET.sln" /m /t:restore /p:Configuration=$configuration
|
|
|
+#.\nuget.exe restore "$scriptPath\System.Interactive.Tests.Uwp.DeviceRunner\System.Interactive.Tests.Uwp.DeviceRunner.csproj"
|
|
|
+dotnet restore "$scriptPath\Ix.NET.sln" -c $configuration
|
|
|
# Force a restore again to get proper version numbers https://github.com/NuGet/Home/issues/4337
|
|
|
-msbuild "$scriptPath\Ix.NET.sln" /m /t:restore /p:Configuration=$configuration
|
|
|
+dotnet restore "$scriptPath\Ix.NET.sln"
|
|
|
|
|
|
Write-Host "Building $scriptPath\Ix.NET.sln" -Foreground Green
|
|
|
-msbuild "$scriptPath\Ix.NET.sln" /m /t:build /p:Configuration=$configuration
|
|
|
+
|
|
|
+# Using MSBuild here since th UWP test project cannot be built by the dotnet CLI
|
|
|
+#msbuild "$scriptPath\Ix.NET.sln" /m /t:build /p:Configuration=$configuration
|
|
|
+
|
|
|
+
|
|
|
+Write-Host "Building Packages" -Foreground Green
|
|
|
+dotnet pack "$scriptPath\System.Interactive\System.Interactive.csproj" -c $configuration /p:PackageOutputPath=$artifacts /p:NoPackageAnalysis=true
|
|
|
if ($LastExitCode -ne 0) {
|
|
|
Write-Host "Error with build" -Foreground Red
|
|
|
if($isAppVeyor) {
|
|
@@ -62,12 +65,32 @@ if ($LastExitCode -ne 0) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+dotnet pack "$scriptPath\System.Interactive.Async\System.Interactive.Async.csproj" -c $configuration /p:PackageOutputPath=$artifacts /p:NoPackageAnalysis=true
|
|
|
+if ($LastExitCode -ne 0) {
|
|
|
+ Write-Host "Error with build" -Foreground Red
|
|
|
+ if($isAppVeyor) {
|
|
|
+ $host.SetShouldExit($LastExitCode)
|
|
|
+ exit $LastExitCode
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
-Write-Host "Building Packages" -Foreground Green
|
|
|
-msbuild "$scriptPath\System.Interactive\System.Interactive.csproj" /t:pack /p:Configuration=$configuration /p:PackageOutputPath=$artifacts /p:NoPackageAnalysis=true
|
|
|
-msbuild "$scriptPath\System.Interactive.Async\System.Interactive.Async.csproj" /t:pack /p:Configuration=$configuration /p:PackageOutputPath=$artifacts /p:NoPackageAnalysis=true
|
|
|
-msbuild "$scriptPath\System.Interactive.Async.Providers\System.Interactive.Async.Providers.csproj" /t:pack /p:Configuration=$configuration /p:PackageOutputPath=$artifacts /p:NoPackageAnalysis=true
|
|
|
-msbuild "$scriptPath\System.Interactive.Providers\System.Interactive.Providers.csproj" /t:pack /p:Configuration=$configuration /p:PackageOutputPath=$artifacts /p:NoPackageAnalysis=true
|
|
|
+dotnet pack "$scriptPath\System.Interactive.Async.Providers\System.Interactive.Async.Providers.csproj" -c $configuration /p:PackageOutputPath=$artifacts /p:NoPackageAnalysis=true
|
|
|
+if ($LastExitCode -ne 0) {
|
|
|
+ Write-Host "Error with build" -Foreground Red
|
|
|
+ if($isAppVeyor) {
|
|
|
+ $host.SetShouldExit($LastExitCode)
|
|
|
+ exit $LastExitCode
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+dotnet pack "$scriptPath\System.Interactive.Providers\System.Interactive.Providers.csproj" -c $configuration /p:PackageOutputPath=$artifacts /p:NoPackageAnalysis=true
|
|
|
+if ($LastExitCode -ne 0) {
|
|
|
+ Write-Host "Error with build" -Foreground Red
|
|
|
+ if($isAppVeyor) {
|
|
|
+ $host.SetShouldExit($LastExitCode)
|
|
|
+ exit $LastExitCode
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
if($hasSignClientSecret) {
|
|
|
Write-Host "Signing Packages" -Foreground Green
|
|
@@ -97,9 +120,9 @@ $testDirectory = Join-Path $scriptPath "Tests"
|
|
|
|
|
|
# OpenCover isn't working currently. So run tests on CI and coverage with JetBrains
|
|
|
|
|
|
-# Run .NET Core only for now until perf improves on the runner for .net desktop
|
|
|
+# Use xUnit CLI as it's significantly faster than vstest (dotnet test)
|
|
|
$dotnet = "$env:ProgramFiles\dotnet\dotnet.exe"
|
|
|
-.\packages\JetBrains.dotCover.CommandLineTools\tools\dotCover.exe cover /targetexecutable="$dotnet" /targetworkingdir="$testDirectory" /targetarguments="test -c $configuration --no-build -f netcoreapp1.1" /output="$outputFileDotCover1" /Filters="+:module=System.Interactive;+:module=System.Interactive.Async;+:module=System.Interactive.Providers;+:module=System.Interactive.Async.Providers;-:type=Xunit*" /DisableDefaultFilters /ReturnTargetExitCode /AttributeFilters="System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute"
|
|
|
+.\packages\JetBrains.dotCover.CommandLineTools\tools\dotCover.exe analyse /targetexecutable="$dotnet" /targetworkingdir="$testDirectory" /targetarguments="xunit -c $configuration" /Filters="+:module=System.Interactive;+:module=System.Interactive.Async;+:module=System.Interactive.Providers;+:module=System.Interactive.Async.Providers;-:type=Xunit*" /DisableDefaultFilters /ReturnTargetExitCode /AttributeFilters="System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute" /output="$outputFile" /ReportType=DetailedXML /HideAutoProperties
|
|
|
|
|
|
if ($LastExitCode -ne 0) {
|
|
|
Write-Host "Error with tests" -Foreground Red
|
|
@@ -109,23 +132,6 @@ if ($LastExitCode -ne 0) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-# run .net desktop tests
|
|
|
-.\packages\JetBrains.dotCover.CommandLineTools\tools\dotCover.exe cover /targetexecutable="$xUnitConsolePath" /targetworkingdir="$testDirectory\bin\$configuration\net461\" /targetarguments="Tests.dll" /output="$outputFileDotCover2" /Filters="+:module=System.Interactive;+:module=System.Interactive.Async;+:module=System.Interactive.Providers;+:module=System.Interactive.Async.Providers;-:type=Xunit*" /DisableDefaultFilters /ReturnTargetExitCode /AttributeFilters="System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute"
|
|
|
-
|
|
|
-if ($LastExitCode -ne 0) {
|
|
|
- Write-Host "Error with tests" -Foreground Red
|
|
|
- if($isAppVeyor) {
|
|
|
- $host.SetShouldExit($LastExitCode)
|
|
|
- exit $LastExitCode
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-# For perf, we need to use the xunit console runner, but that generates two reports. merge into one and generate the detailed xml output
|
|
|
-
|
|
|
-.\packages\JetBrains.dotCover.CommandLineTools\tools\dotCover.exe merge /Source="$outputFileDotCover1;$outputFileDotCover2" /Output="$outputFileDotCover"
|
|
|
-.\packages\JetBrains.dotCover.CommandLineTools\tools\dotCover.exe report /Source="$outputFileDotCover" /Output="$outputFile" /ReportType=DetailedXML /HideAutoProperties
|
|
|
-
|
|
|
-
|
|
|
# Either display or publish the results
|
|
|
if ($env:CI -eq 'True')
|
|
|
{
|