diff --git a/Directory.Build.props b/Directory.Build.props index 01147df66a..a6980945d7 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,5 +1,9 @@ + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + diff --git a/README.md b/README.md index 133bce1abd..88d18cedde 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Pre-release builds are available on MyGet gallery: https://dotnet.myget.org/Gall | |Windows Debug|Windows Release| |:--------:|:-----------:|:-------------:| -|**master**|[![Build Status](https://ci.dot.net/job/dotnet_roslyn-analyzers/job/master/job/windows_debug/badge/icon)](https://ci.dot.net/job/dotnet_roslyn-analyzers/job/master/job/windows_debug/)|[![Build Status](https://ci.dot.net/job/dotnet_roslyn-analyzers/job/master/job/windows_release/badge/icon)](https://ci.dot.net/job/dotnet_roslyn-analyzers/job/master/job/windows_release/)| +|**master**|[![Build Status](https://ci.dot.net/job/dotnet_roslyn-analyzers/job/master/job/windows_debug/badge/icon)](https://ci.dot.net/job/dotnet_roslyn-analyzers/job/master/job/windows_debug/) [![codecov](https://codecov.io/gh/dotnet/roslyn-analyzers/branch/master/graph/badge.svg)](https://codecov.io/gh/dotnet/roslyn-analyzers)|[![Build Status](https://ci.dot.net/job/dotnet_roslyn-analyzers/job/master/job/windows_release/badge/icon)](https://ci.dot.net/job/dotnet_roslyn-analyzers/job/master/job/windows_release/)| [//]: # (End current test results) diff --git a/build/Codecov.proj b/build/Codecov.proj new file mode 100644 index 0000000000..c9d04e6e4a --- /dev/null +++ b/build/Codecov.proj @@ -0,0 +1,31 @@ + + + + $(MSBuildThisFileDirectory)..\ + + + + + + + + <_CodecovPath>$(NuGetPackageRoot)codecov\$(CodecovVersion)\tools\Codecov.exe + + + + <_CoverageReports Include="$(ArtifactsTestResultsDir)*.coverage" /> + + <_CodecovArgs Include="-f;@(_CoverageReports)" /> + <_CodecovArgs Include="-r;$(QualifiedRepoName)" Condition="'$(QualifiedRepoName)' != ''" /> + <_CodecovArgs Include="--pr;$(ghprbPullId)" Condition="'$(ghprbPullId)' != ''" /> + <_CodecovArgs Include="-b;$(BUILD_NUMBER)" Condition="'$(BUILD_NUMBER)' != ''" /> + <_CodecovArgs Include="--branch;$(ghprbTargetBranch)" Condition="'$(ghprbTargetBranch)' != ''" /> + <_CodecovArgs Include="-c;$(ghprbActualCommit)" Condition="'$(ghprbActualCommit)' != ''" /> + <_CodecovArgs Include="-n;$(JOB_NAME)" Condition="'$(JOB_NAME)' != ''" /> + <_CodecovArgs Include="--flag;$(Configuration)" Condition="'$(Configuration)' != ''" /> + + + + + diff --git a/build/GenerateAnalyzerNuspec.targets b/build/GenerateAnalyzerNuspec.targets index 6511fd629e..e29701fca2 100644 --- a/build/GenerateAnalyzerNuspec.targets +++ b/build/GenerateAnalyzerNuspec.targets @@ -1,5 +1,9 @@ + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + $(IntermediateOutputPath)$(NuspecPackageId).nuspec $(ArtifactsBinDir) diff --git a/build/NuGet.props b/build/NuGet.props index 128dea0224..2826edf5e3 100644 --- a/build/NuGet.props +++ b/build/NuGet.props @@ -1,5 +1,9 @@ + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + $(NUGET_PACKAGES) diff --git a/build/Toolset.proj b/build/Toolset.proj index 194e86990f..82848381a6 100644 --- a/build/Toolset.proj +++ b/build/Toolset.proj @@ -2,9 +2,12 @@ net462 - https://dotnet.myget.org/F/roslyn-tools/api/v3/index.json + https://api.nuget.org/v3/index.json;https://dotnet.myget.org/F/roslyn-tools/api/v3/index.json;https://dotnet.myget.org/F/symreader-converter/api/v3/index.json + + + \ No newline at end of file diff --git a/build/Versions.props b/build/Versions.props index a286892c3a..e68b1795d9 100644 --- a/build/Versions.props +++ b/build/Versions.props @@ -1,4 +1,8 @@ + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + 2.6.1 beta1 @@ -10,6 +14,9 @@ 1.0.0-beta-62615-02 2.1.4 15.0.26201-alpha + 1.1.0-beta1-62624-01 + 4.6.519 + 1.0.3 2.6.0 diff --git a/build/build.ps1 b/build/build.ps1 index 71f7c01748..5a205af050 100644 --- a/build/build.ps1 +++ b/build/build.ps1 @@ -111,8 +111,15 @@ function Build { } $nodeReuse = !$ci + $useCodecov = $ci -and $env:CODECOV_TOKEN -and ($configuration -eq 'Debug') + $useOpenCover = $useCodecov - & $MsbuildExe $ToolsetBuildProj /m /nologo /clp:Summary /nodeReuse:$nodeReuse /warnaserror /v:$verbosity $logCmd /p:Configuration=$configuration /p:SolutionPath=$solution /p:Restore=$restore /p:DeployDeps=$deployDeps /p:Build=$build /p:Rebuild=$rebuild /p:Deploy=$deploy /p:Test=$test /p:IntegrationTest=$integrationTest /p:Sign=$sign /p:Pack=$pack /p:CIBuild=$ci /p:NuGetPackageRoot=$NuGetPackageRoot $properties + & $MsbuildExe $ToolsetBuildProj /m /nologo /clp:Summary /nodeReuse:$nodeReuse /warnaserror /v:$verbosity $logCmd /p:Configuration=$configuration /p:SolutionPath=$solution /p:Restore=$restore /p:DeployDeps=$deployDeps /p:Build=$build /p:Rebuild=$rebuild /p:Deploy=$deploy /p:Test=$test /p:IntegrationTest=$integrationTest /p:Sign=$sign /p:Pack=$pack /p:UseCodecov=$useCodecov /p:UseOpenCover=$useOpenCover /p:CIBuild=$ci /p:NuGetPackageRoot=$NuGetPackageRoot $properties + + if ($useCodecov) { + $CodecovProj = Join-Path $PSScriptRoot 'Codecov.proj' + & $MsbuildExe $CodecovProj /m /nologo /clp:Summary /nodeReuse:$nodeReuse /warnaserror /v:diag /t:Codecov /p:Configuration=$configuration /p:UseCodecov=$useCodecov /p:NuGetPackageRoot=$NuGetPackageRoot $properties + } } function Stop-Processes() { diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000000..6cdefc925b --- /dev/null +++ b/codecov.yml @@ -0,0 +1,14 @@ +# https://docs.codecov.io/docs/codecov-yaml +# https://github.com/codecov/support/wiki/Codecov-Yaml + +coverage: + status: + project: + default: false + patch: + default: false + fixes: + - "build/src/::src/" + +comment: + layout: "diff, flags, files, footer" diff --git a/nuget/Directory.Build.props b/nuget/Directory.Build.props index ec7c695eaf..a4f61c06bf 100644 --- a/nuget/Directory.Build.props +++ b/nuget/Directory.Build.props @@ -1,5 +1,9 @@ + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + \ No newline at end of file diff --git a/nuget/Directory.Build.targets b/nuget/Directory.Build.targets index 14361de64f..430b75fdfd 100644 --- a/nuget/Directory.Build.targets +++ b/nuget/Directory.Build.targets @@ -1,5 +1,9 @@ + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + diff --git a/src/Directory.Build.props b/src/Directory.Build.props index ddda2929f4..53dc429c7c 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,5 +1,9 @@ + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index eb55778ce8..42480aacdf 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -1,5 +1,9 @@ + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + + + + + + + + + + + $(MSBuildAllProjects);$(MSBuildThisFileDirectory)..\build\Analyzers_ShippingRules.ruleset + + + + + + + + + + + + + + <_TestArchitecture>%(_TestArchitectureItems.Identity) + <_TestEnvironment>$(TargetFramework)|$(_TestArchitecture) + <_TestOutPathNoExt>$(ArtifactsTestResultsDir)$(MSBuildProjectName)_$(TargetFramework)_$(_TestArchitecture) + <_TestStdOutPath>$(_TestOutPathNoExt).log + <_TestResultsXmlPath>$(_TestOutPathNoExt).xml + <_TestResultsHtmlPath>$(_TestOutPathNoExt).html + <_TestResultsOpenCoverPath>$(_TestOutPathNoExt).coverage + <_RunOnCore>false + <_RunOnCore Condition="$(TargetFramework.StartsWith('netcoreapp'))">true + <_UseOpenCover>$(UseOpenCover) + <_UseOpenCover Condition="'$(_RunOnCore)' == 'true'">false + + + + + + <_TargetFileNameNoExt>$([System.IO.Path]::GetFileNameWithoutExtension('$(TargetFileName)')) + <_CoreRuntimeConfigPath>$(TargetDir)$(_TargetFileNameNoExt).runtimeconfig.json + <_CoreDepsPath>$(TargetDir)$(_TargetFileNameNoExt).deps.json + + + <_TestRunnerCommand>"$(DotNetTool)" exec --depsfile "$(_CoreDepsPath)" --runtimeconfig "$(_CoreRuntimeConfigPath)" "$(NuGetPackageRoot)xunit.runner.console/$(XUnitVersion)/tools/netcoreapp1.0/xunit.console.dll" "$(TargetPath)" -noautoreporters -xml "$(_TestResultsXmlPath)" $(XUnitRunnerAdditionalArguments) + <_TestResultsDisplayPath>$(_TestStdOutPath) + + + + + <_BinariesInTestDirectory Include="$(TargetDir)*.dll" /> + <_BinariesInTestDirectory Update="@(_BinariesInTestDirectory)" IntermediatePdb="%(RootDir)%(Directory)%(Filename).ppdb" /> + + + + <_PdbConverterPath>$(NuGetPackageRoot)microsoft.diasymreader.pdb2pdb\$(MicrosoftDiaSymReaderPdb2PdbVersion)\tools\Pdb2Pdb.exe + + + + + + + <_PortablePdb Include="$(TargetDir)*.ppdb" /> + <_PortablePdb Update="@(_PortablePdb)" Binary="%(RootDir)%(Directory)%(Filename).dll" OutputPdb="%(RootDir)%(Directory)%(Filename).pdb" /> + + + + + + <_XUnitConsoleExe>xunit.console.exe + <_XUnitConsoleExe Condition="'$(_TestArchitecture)' == 'x86'">xunit.console.x86.exe + <_XUnitRunnerCommand>$(NuGetPackageRoot)xunit.runner.console\$(XUnitVersion)\tools\net452\$(_XUnitConsoleExe) + <_XUnitRunnerCommandArgs>"$(TargetPath)" -noshadow -xml "$(_TestResultsXmlPath)" -html "$(_TestResultsHtmlPath)" $(XUnitRunnerAdditionalArguments) + <_TestRunnerCommand>"$(_XUnitRunnerCommand)" $(_XUnitRunnerCommandArgs) + <_TestResultsDisplayPath>$(_TestResultsHtmlPath) + + + + <_OpenCoverConsoleExe>OpenCover.Console.exe + <_OpenCoverCommand>$(NuGetPackageRoot)opencover\$(OpenCoverVersion)\tools\$(_OpenCoverConsoleExe) + <_OpenCoverCommandArgs>-register:user -returntargetcode -hideskipped:All -filter:"+[*]*" -excludebyattribute:*.ExcludeFromCodeCoverage* -excludebyfile:*\*Designer.cs -output:"$(_TestResultsOpenCoverPath)" + <_TestRunnerCommand>"$(_OpenCoverCommand)" $(_OpenCoverCommandArgs) -target:"$(_XUnitRunnerCommand)" -targetargs:"$(_XUnitRunnerCommandArgs.Replace(`"`, `\"`))" + + + + + + + + + + + + + + + + + <_FailedTestRuns Include="$(_TestEnvironment)" Condition="'$(_TestErrorCode)' != '0'" /> + + + + + + + \ No newline at end of file diff --git a/src/MetaCompilation.Analyzers/Directory.Build.props b/src/MetaCompilation.Analyzers/Directory.Build.props index 07f0d0a106..222262c696 100644 --- a/src/MetaCompilation.Analyzers/Directory.Build.props +++ b/src/MetaCompilation.Analyzers/Directory.Build.props @@ -1,5 +1,9 @@ + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + true diff --git a/src/Test.Utilities/Directory.Build.props b/src/Test.Utilities/Directory.Build.props index 07f0d0a106..222262c696 100644 --- a/src/Test.Utilities/Directory.Build.props +++ b/src/Test.Utilities/Directory.Build.props @@ -1,5 +1,9 @@ + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + true diff --git a/src/Test.Utilities/Directory.Build.targets b/src/Test.Utilities/Directory.Build.targets index f986c4d6a4..0a601f2fab 100644 --- a/src/Test.Utilities/Directory.Build.targets +++ b/src/Test.Utilities/Directory.Build.targets @@ -1,5 +1,9 @@ + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + $(SemanticVersion).0 diff --git a/tools/AnalyzerCodeGenerator/template/build/Targets/Analyzers.NuGet.Imports.targets b/tools/AnalyzerCodeGenerator/template/build/Targets/Analyzers.NuGet.Imports.targets index 6bbceade29..58c6a1ca8d 100644 --- a/tools/AnalyzerCodeGenerator/template/build/Targets/Analyzers.NuGet.Imports.targets +++ b/tools/AnalyzerCodeGenerator/template/build/Targets/Analyzers.NuGet.Imports.targets @@ -1,4 +1,8 @@ + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + -NoPackageAnalysis -prop binaries=$(OutDir) -prop authors=$(NuGetAuthors) -prop projectURL=$(NuGetProjectURL) -prop releaseNotes="$(NuGetReleaseNotes)" -prop tags="$(NuGetTags)" -prop licenseURL=$(NuGetLicenseURL) -prop buildName=$(TF_BUILD_BUILDDEFINITIONNAME) diff --git a/tools/AnalyzerCodeGenerator/template/build/Targets/Analyzers.NuGet.Settings.targets b/tools/AnalyzerCodeGenerator/template/build/Targets/Analyzers.NuGet.Settings.targets index 9b796b6fbe..25c2245e63 100644 --- a/tools/AnalyzerCodeGenerator/template/build/Targets/Analyzers.NuGet.Settings.targets +++ b/tools/AnalyzerCodeGenerator/template/build/Targets/Analyzers.NuGet.Settings.targets @@ -1,5 +1,9 @@ + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + http://go.microsoft.com/fwlink/?LinkId=529443 http://go.microsoft.com/fwlink/?LinkId=529444 diff --git a/tools/AnalyzerCodeGenerator/template/build/Targets/Analyzers.Settings.targets b/tools/AnalyzerCodeGenerator/template/build/Targets/Analyzers.Settings.targets index 674a05bc31..675119cad7 100644 --- a/tools/AnalyzerCodeGenerator/template/build/Targets/Analyzers.Settings.targets +++ b/tools/AnalyzerCodeGenerator/template/build/Targets/Analyzers.Settings.targets @@ -1,6 +1,10 @@ + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + diff --git a/tools/AnalyzerCodeGenerator/template/build/Targets/Analyzers.Versions.targets b/tools/AnalyzerCodeGenerator/template/build/Targets/Analyzers.Versions.targets index 77b26248f5..dfbbf1a3ff 100644 --- a/tools/AnalyzerCodeGenerator/template/build/Targets/Analyzers.Versions.targets +++ b/tools/AnalyzerCodeGenerator/template/build/Targets/Analyzers.Versions.targets @@ -1,4 +1,8 @@ + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + INSERTVERSIONS 1.0.0 diff --git a/tools/AnalyzerCodeGenerator/template/build/Targets/GenerateAssemblyInfo.targets b/tools/AnalyzerCodeGenerator/template/build/Targets/GenerateAssemblyInfo.targets index 93d02d5516..468a91cc6d 100644 --- a/tools/AnalyzerCodeGenerator/template/build/Targets/GenerateAssemblyInfo.targets +++ b/tools/AnalyzerCodeGenerator/template/build/Targets/GenerateAssemblyInfo.targets @@ -1,4 +1,8 @@  + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + $(IntermediateOutputPath)GeneratedAssemblyInfo_$(BuildVersion)$(DefaultLanguageSourceExtension) diff --git a/tools/AnalyzerCodeGenerator/template/build/Targets/GenerateInternalsVisibleTo.targets b/tools/AnalyzerCodeGenerator/template/build/Targets/GenerateInternalsVisibleTo.targets index 4f45c1bdd2..1589ae79b6 100644 --- a/tools/AnalyzerCodeGenerator/template/build/Targets/GenerateInternalsVisibleTo.targets +++ b/tools/AnalyzerCodeGenerator/template/build/Targets/GenerateInternalsVisibleTo.targets @@ -1,4 +1,8 @@ + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + $(IntermediateOutputPath)GeneratedInternalsVisibleTo$(DefaultLanguageSourceExtension)