 AKV Official Pipeline (#3150)
* In Solution: Move source projects under source folder, remove add-ons folder
* Add engineering files to solution
* Add new variables files for AKV (and v2) pipelines
* ESRP signing step (and associated variables)
* Renaming esrp steps
* Adding steps for publishing AKV symbols
* Adding nuget packaging steps
* Make symbols publishing more generic
* Add task for roslyn analyzers
* Adding task for building AKV project
* Finishing up wiring the tasks to jobs to pipeline
* Fix errors, round 1
* Fix typo 1
* Fix errors in job file
* Forgot a colon
* Renaming SET step to make sure it follows convention
* Apparently script needs to go first
* Reworking the entire code signing and publish steps to use parameters instead of variables.
* Fix parameter reference
* Fix parameter reference 2
* Adding onebranch variables to pipeline
* Fixing definition of common variables
* Let's try again without the ob variables file
* Uhhhh...
* UH.
* WTF.
* Another attempt.
* I'm confused.
* Idk, let's try it how the docs say to do it.
* Remove common variables group
* bring back the onebranch variables?
* Rework the AKV build target ... why the heck does the build.proj totally mess everything up
* Fix typo with key path
* Let's try this without the multiple lines?
* What's wrong with YAML strings.
* Fix mistake?
* Maybe it doesn't like the extra spaces...
* Debug the parameters!
* Rename variables?
* Ugh is this another one that doesn't support multi-line?
* So apparently extra indenting means yaml preserves the dang newline.
* More debug...
* "Artifact" folder doesn't exist yet. Duh.
* * Cleanup build.proj targets a tiny bit
* Attempt to make roslyn work without indentations
* Make sure project reference parameters are case-correct
* Fix property definition in build.proj :shrug_man:
* Fixing build.proj ... there's still some complexities in here that are breaking things
* Copy the dll/pdb for ApiScan
* Why even have array types if we can't use them
* Rename file
* Reinstating the tree command, fixing some path variables.
* Fixing source path for apiscan extract
* Man just when I think I get it, I don't get it.
* Not sure why it matters if there is a slash at the end or not. But let's try it without one.
* I guess variable templates can't depend on variables from other templates?
* There's no type safety anywhere else, but there is when I want to print an array...
* :expressionless:
* Fix template name for symbols publishing step
* Fix values name
* Yeah, I don't know what's broken here. This is a random guess.
* Parameter to symbols publishing step
* Artifacts path != Build output artifacts folder
* Remove \"
* Language injection would've helped me with that
* Needed some quote marks
* Fix issue with network isolation
* Rename buildPreview to runSdlTasks, cleanup a couple to-dos
* Whoops.
* Couple tweaks
* Remove signing from roslyn analyzers
* Removing one more to-do
* I doubt case sensitivity matters here, but juuuuust in case, we can try it.
* Disable nuget auditing on CI builds, remove KS2 from feature flags
* Can I turn it off at all?
* ContinuousIntegrationBuild is set later in the file. Use the base field
* Only report to TSA on official builds
* Convert to json
* Ok whatever
* I love it when examples don't actually work
* What in the heck
* THIS IS SO DUMB
* Claude save me
* Escape sequence fix
* Fixing the replacement to be good
* WORDS WORDS WORDS
* Standardizing the quotes 5 months ago  AKV Official Pipeline (#3150)
* In Solution: Move source projects under source folder, remove add-ons folder
* Add engineering files to solution
* Add new variables files for AKV (and v2) pipelines
* ESRP signing step (and associated variables)
* Renaming esrp steps
* Adding steps for publishing AKV symbols
* Adding nuget packaging steps
* Make symbols publishing more generic
* Add task for roslyn analyzers
* Adding task for building AKV project
* Finishing up wiring the tasks to jobs to pipeline
* Fix errors, round 1
* Fix typo 1
* Fix errors in job file
* Forgot a colon
* Renaming SET step to make sure it follows convention
* Apparently script needs to go first
* Reworking the entire code signing and publish steps to use parameters instead of variables.
* Fix parameter reference
* Fix parameter reference 2
* Adding onebranch variables to pipeline
* Fixing definition of common variables
* Let's try again without the ob variables file
* Uhhhh...
* UH.
* WTF.
* Another attempt.
* I'm confused.
* Idk, let's try it how the docs say to do it.
* Remove common variables group
* bring back the onebranch variables?
* Rework the AKV build target ... why the heck does the build.proj totally mess everything up
* Fix typo with key path
* Let's try this without the multiple lines?
* What's wrong with YAML strings.
* Fix mistake?
* Maybe it doesn't like the extra spaces...
* Debug the parameters!
* Rename variables?
* Ugh is this another one that doesn't support multi-line?
* So apparently extra indenting means yaml preserves the dang newline.
* More debug...
* "Artifact" folder doesn't exist yet. Duh.
* * Cleanup build.proj targets a tiny bit
* Attempt to make roslyn work without indentations
* Make sure project reference parameters are case-correct
* Fix property definition in build.proj :shrug_man:
* Fixing build.proj ... there's still some complexities in here that are breaking things
* Copy the dll/pdb for ApiScan
* Why even have array types if we can't use them
* Rename file
* Reinstating the tree command, fixing some path variables.
* Fixing source path for apiscan extract
* Man just when I think I get it, I don't get it.
* Not sure why it matters if there is a slash at the end or not. But let's try it without one.
* I guess variable templates can't depend on variables from other templates?
* There's no type safety anywhere else, but there is when I want to print an array...
* :expressionless:
* Fix template name for symbols publishing step
* Fix values name
* Yeah, I don't know what's broken here. This is a random guess.
* Parameter to symbols publishing step
* Artifacts path != Build output artifacts folder
* Remove \"
* Language injection would've helped me with that
* Needed some quote marks
* Fix issue with network isolation
* Rename buildPreview to runSdlTasks, cleanup a couple to-dos
* Whoops.
* Couple tweaks
* Remove signing from roslyn analyzers
* Removing one more to-do
* I doubt case sensitivity matters here, but juuuuust in case, we can try it.
* Disable nuget auditing on CI builds, remove KS2 from feature flags
* Can I turn it off at all?
* ContinuousIntegrationBuild is set later in the file. Use the base field
* Only report to TSA on official builds
* Convert to json
* Ok whatever
* I love it when examples don't actually work
* What in the heck
* THIS IS SO DUMB
* Claude save me
* Escape sequence fix
* Fixing the replacement to be good
* WORDS WORDS WORDS
* Standardizing the quotes 5 months ago  AKV Official Pipeline (#3150)
* In Solution: Move source projects under source folder, remove add-ons folder
* Add engineering files to solution
* Add new variables files for AKV (and v2) pipelines
* ESRP signing step (and associated variables)
* Renaming esrp steps
* Adding steps for publishing AKV symbols
* Adding nuget packaging steps
* Make symbols publishing more generic
* Add task for roslyn analyzers
* Adding task for building AKV project
* Finishing up wiring the tasks to jobs to pipeline
* Fix errors, round 1
* Fix typo 1
* Fix errors in job file
* Forgot a colon
* Renaming SET step to make sure it follows convention
* Apparently script needs to go first
* Reworking the entire code signing and publish steps to use parameters instead of variables.
* Fix parameter reference
* Fix parameter reference 2
* Adding onebranch variables to pipeline
* Fixing definition of common variables
* Let's try again without the ob variables file
* Uhhhh...
* UH.
* WTF.
* Another attempt.
* I'm confused.
* Idk, let's try it how the docs say to do it.
* Remove common variables group
* bring back the onebranch variables?
* Rework the AKV build target ... why the heck does the build.proj totally mess everything up
* Fix typo with key path
* Let's try this without the multiple lines?
* What's wrong with YAML strings.
* Fix mistake?
* Maybe it doesn't like the extra spaces...
* Debug the parameters!
* Rename variables?
* Ugh is this another one that doesn't support multi-line?
* So apparently extra indenting means yaml preserves the dang newline.
* More debug...
* "Artifact" folder doesn't exist yet. Duh.
* * Cleanup build.proj targets a tiny bit
* Attempt to make roslyn work without indentations
* Make sure project reference parameters are case-correct
* Fix property definition in build.proj :shrug_man:
* Fixing build.proj ... there's still some complexities in here that are breaking things
* Copy the dll/pdb for ApiScan
* Why even have array types if we can't use them
* Rename file
* Reinstating the tree command, fixing some path variables.
* Fixing source path for apiscan extract
* Man just when I think I get it, I don't get it.
* Not sure why it matters if there is a slash at the end or not. But let's try it without one.
* I guess variable templates can't depend on variables from other templates?
* There's no type safety anywhere else, but there is when I want to print an array...
* :expressionless:
* Fix template name for symbols publishing step
* Fix values name
* Yeah, I don't know what's broken here. This is a random guess.
* Parameter to symbols publishing step
* Artifacts path != Build output artifacts folder
* Remove \"
* Language injection would've helped me with that
* Needed some quote marks
* Fix issue with network isolation
* Rename buildPreview to runSdlTasks, cleanup a couple to-dos
* Whoops.
* Couple tweaks
* Remove signing from roslyn analyzers
* Removing one more to-do
* I doubt case sensitivity matters here, but juuuuust in case, we can try it.
* Disable nuget auditing on CI builds, remove KS2 from feature flags
* Can I turn it off at all?
* ContinuousIntegrationBuild is set later in the file. Use the base field
* Only report to TSA on official builds
* Convert to json
* Ok whatever
* I love it when examples don't actually work
* What in the heck
* THIS IS SO DUMB
* Claude save me
* Escape sequence fix
* Fixing the replacement to be good
* WORDS WORDS WORDS
* Standardizing the quotes 5 months ago  AKV Official Pipeline (#3150)
* In Solution: Move source projects under source folder, remove add-ons folder
* Add engineering files to solution
* Add new variables files for AKV (and v2) pipelines
* ESRP signing step (and associated variables)
* Renaming esrp steps
* Adding steps for publishing AKV symbols
* Adding nuget packaging steps
* Make symbols publishing more generic
* Add task for roslyn analyzers
* Adding task for building AKV project
* Finishing up wiring the tasks to jobs to pipeline
* Fix errors, round 1
* Fix typo 1
* Fix errors in job file
* Forgot a colon
* Renaming SET step to make sure it follows convention
* Apparently script needs to go first
* Reworking the entire code signing and publish steps to use parameters instead of variables.
* Fix parameter reference
* Fix parameter reference 2
* Adding onebranch variables to pipeline
* Fixing definition of common variables
* Let's try again without the ob variables file
* Uhhhh...
* UH.
* WTF.
* Another attempt.
* I'm confused.
* Idk, let's try it how the docs say to do it.
* Remove common variables group
* bring back the onebranch variables?
* Rework the AKV build target ... why the heck does the build.proj totally mess everything up
* Fix typo with key path
* Let's try this without the multiple lines?
* What's wrong with YAML strings.
* Fix mistake?
* Maybe it doesn't like the extra spaces...
* Debug the parameters!
* Rename variables?
* Ugh is this another one that doesn't support multi-line?
* So apparently extra indenting means yaml preserves the dang newline.
* More debug...
* "Artifact" folder doesn't exist yet. Duh.
* * Cleanup build.proj targets a tiny bit
* Attempt to make roslyn work without indentations
* Make sure project reference parameters are case-correct
* Fix property definition in build.proj :shrug_man:
* Fixing build.proj ... there's still some complexities in here that are breaking things
* Copy the dll/pdb for ApiScan
* Why even have array types if we can't use them
* Rename file
* Reinstating the tree command, fixing some path variables.
* Fixing source path for apiscan extract
* Man just when I think I get it, I don't get it.
* Not sure why it matters if there is a slash at the end or not. But let's try it without one.
* I guess variable templates can't depend on variables from other templates?
* There's no type safety anywhere else, but there is when I want to print an array...
* :expressionless:
* Fix template name for symbols publishing step
* Fix values name
* Yeah, I don't know what's broken here. This is a random guess.
* Parameter to symbols publishing step
* Artifacts path != Build output artifacts folder
* Remove \"
* Language injection would've helped me with that
* Needed some quote marks
* Fix issue with network isolation
* Rename buildPreview to runSdlTasks, cleanup a couple to-dos
* Whoops.
* Couple tweaks
* Remove signing from roslyn analyzers
* Removing one more to-do
* I doubt case sensitivity matters here, but juuuuust in case, we can try it.
* Disable nuget auditing on CI builds, remove KS2 from feature flags
* Can I turn it off at all?
* ContinuousIntegrationBuild is set later in the file. Use the base field
* Only report to TSA on official builds
* Convert to json
* Ok whatever
* I love it when examples don't actually work
* What in the heck
* THIS IS SO DUMB
* Claude save me
* Escape sequence fix
* Fixing the replacement to be good
* WORDS WORDS WORDS
* Standardizing the quotes 5 months ago |
|
<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="Current" DefaultTargets="BuildAllConfigurations" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="src/Directory.Build.props" /> <Import Project="$(ToolsDir)targets\GenerateNugetPackage.targets" /> <Import Project="$(ToolsDir)targets\add-ons\GenerateAKVProviderNugetPackage.targets" />
<PropertyGroup> <!-- SourceLink variable--> <DisableSourceLink>false</DisableSourceLink>
<RestoreConfigFile>src\NuGet.config</RestoreConfigFile> <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> <Platform Condition="'$(Platform)' == ''">AnyCPU</Platform> <!-- Flag to control whether or not to build Microsoft.DotNet.GenAPI project in tools --> <BuildTools Condition="'$(BuildTools)' == ''">true</BuildTools> <!-- Flag to control if Windows drivers should be built or not --> <IsEnabledWindows Condition="'$(IsEnabledWindows)' == '' AND '$(TargetsWindows)' == 'true'">true</IsEnabledWindows> <IsEnabledWindows Condition="'$(TargetsUnix)' == 'true'">false</IsEnabledWindows> <TestOS Condition="'$(TestTargetOS)' == '' AND '$(TargetsWindows)' == 'true'">Windows</TestOS> <TestOS Condition="'$(TestTargetOS)' == '' AND '$(TargetsUnix)' == 'true'">Unix</TestOS> <TF Condition="$(TF) == ''">net9.0</TF> <!-- Default Target Framework --> <TFGroup Condition="'$([MSBuild]::GetTargetFrameworkIdentifier($(TF)))' == '.NETFramework'">netfx</TFGroup> <TFGroup Condition="'$([MSBuild]::GetTargetFrameworkIdentifier($(TF)))' == '.NETCoreApp'">netcore</TFGroup> <TargetGroup Condition="'$(TFGroup)' == 'netfx'">netfx</TargetGroup> <TargetGroup Condition="'$(TFGroup)' == 'netcore'">netcoreapp</TargetGroup> <TargetNetCoreVersion Condition="$(TargetGroup) == 'netcoreapp' AND $(TargetNetCoreVersion) == ''">$(TF)</TargetNetCoreVersion> <TargetNetFxVersion Condition="$(TargetGroup) == 'netfx' AND $(TargetNetFxVersion) == ''">$(TF)</TargetNetFxVersion> <GenerateNuget Condition="'$(GenerateNuget)' == '' AND '$(IsEnabledWindows)' == 'true'">true</GenerateNuget> <SqlServerLibProperties>Configuration=$(Configuration);AssemblyVersion=$(SqlServerAssemblyVersion);AssemblyFileVersion=$(SqlServerAssemblyFileVersion);Version=$(SqlServerPackageVersion);</SqlServerLibProperties> <ProjectProperties>Configuration=$(Configuration);AssemblyFileVersion=$(AssemblyFileVersion);TargetsWindows=$(TargetsWindows);TargetsUnix=$(TargetsUnix);</ProjectProperties> <TestProjectProperties>BuildProjectReferences=false;$(ProjectProperties);BuildForRelease=false;TargetNetCoreVersion=$(TargetNetCoreVersion);TargetNetFxVersion=$(TargetNetFxVersion)</TestProjectProperties> <ResultsDirectory Condition="$(ResultsDirectory) == ''">TestResults</ResultsDirectory> <!-- Path to a `dotnet` version like a x86 or any especific versions in addition to a default installed version. This property is empty by default to use the default path of the system's path variable. The provided path should be ended to a `\` character without white spaces: Ex. C:\x86\ --> <DotnetPath></DotnetPath> <!-- Using these properties to compile and pack netfx dll fixes nuget package explorer error "Compiler flags: missing" --> <NugetPackProperties>DebugType=portable;DebugSymbols=true;IncludeSymbols=true;SymbolPackageFormat=snupkg;PublishRepositoryUrl=true;RepositoryUrl=https://github.com/dotnet/sqlclient;RepositoryType=git;EmbedUnTrackedSources=true;Deterministic=true;</NugetPackProperties> <!-- TF_BUILD is enabled only within AzureDevOps pipeline to support continuous integation build. --> <NugetPackProperties Condition="'$(TF_BUILD)' == 'true'">$(NugetPackProperties);ContinuousIntegrationBuild=true;</NugetPackProperties> </PropertyGroup>
<!-- Release Build properties must be turned on for Release purposes, and turned off for Code Coverage calculations --> <PropertyGroup> <BuildForRelease Condition="$(BuildForRelease) == ''">true</BuildForRelease> <CI>ContinuousIntegrationBuild=$(BuildForRelease);EmbedUntrackedSources=$(BuildForRelease)</CI> </PropertyGroup>
<!-- Populate all managed projects --> <ItemGroup> <SqlServerLib Include="**/Microsoft.SqlServer.Server.csproj" /> <NetFxDriver Include="**/netfx/**/Microsoft.Data.SqlClient*.csproj" Condition="'$(IsEnabledWindows)' == 'true'" /> <NetCoreDriver Include="**/netcore/**/Microsoft.Data.SqlClient*.csproj" /> <!-- Used to build .NET Standard DLL for lib folder from this project. --> <NetStandardDriver Include="**/netcore/ref/Microsoft.Data.SqlClient*.csproj" /> <AKVProvider Include="**/add-ons/**/AzureKeyVaultProvider/*.csproj" />
<UnitTests Include="**/UnitTests/Microsoft.Data.SqlClient.UnitTests.csproj" /> <UnitTestsProj Include="**/UnitTests/Microsoft.Data.SqlClient.UnitTests.csproj" /> <FunctionalTests Include="**/Common/Common.csproj" /> <FunctionalTests Include="**/tools/TDS/TDS/TDS.csproj" /> <FunctionalTests Include="**/tools/TDS/TDS.EndPoint/TDS.EndPoint.csproj" /> <FunctionalTests Include="**/tools/TDS/TDS.Servers/TDS.Servers.csproj" /> <FunctionalTests Include="**/tools/Microsoft.Data.SqlClient.TestUtilities/Microsoft.Data.SqlClient.TestUtilities.csproj" /> <FunctionalTests Include="**/tools/CoreFx.Private.TestUtilities/CoreFx.Private.TestUtilities.csproj" /> <FunctionalTests Include="**/ManualTests/SQL/UdtTest/UDTs/Address/Address.csproj" /> <FunctionalTests Include="**/FunctionalTests/Microsoft.Data.SqlClient.FunctionalTests.csproj" /> <FunctionalTestsProj Include="**/FunctionalTests/Microsoft.Data.SqlClient.FunctionalTests.csproj" /> <ManualTests Include="**/Common/Common.csproj" /> <ManualTests Include="**/ManualTests/SQL/UdtTest/UDTs/Address/Address.csproj" /> <ManualTests Include="**/ManualTests/SQL/UdtTest/UDTs/Circle/Circle.csproj" /> <ManualTests Include="**/ManualTests/SQL/UdtTest/UDTs/Shapes/Shapes.csproj" /> <ManualTests Include="**/ManualTests/SQL/UdtTest/UDTs/Utf8String/Utf8String.csproj" /> <ManualTests Include="**/tools/Microsoft.Data.SqlClient.TestUtilities/Microsoft.Data.SqlClient.TestUtilities.csproj" /> <ManualTests Include="**/tools/CoreFx.Private.TestUtilities/CoreFx.Private.TestUtilities.csproj" /> <ManualTests Include="**/CustomConfigurableRetryLogic/CustomRetryLogicProvider.csproj" /> <ManualTests Include="**/ManualTests/Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" /> <ManualTestsProj Include="**/ManualTests/Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" /> </ItemGroup>
<!-- Top Level Build targets --> <Target Name="Restore" DependsOnTargets="RestoreSqlServerLib;RestoreNetCore;RestoreNetFx" /> <Target Name="BuildAll" DependsOnTargets="BuildSqlServerLib;BuildNetFx;BuildNetCore;BuildNetStandard" /> <Target Name="BuildAllConfigurations" DependsOnTargets="Restore;BuildTools;BuildSqlServerLib;BuildNetFx;BuildNetCoreAllOS;BuildNetStandard;GenerateNugetPackage" /> <Target Name="BuildSqlServerPackage" DependsOnTargets="BuildSqlServerLibAnyOS;GenerateSqlServerPackage"/> <Target Name="BuildTestsNetCore" DependsOnTargets="RestoreTestsNetCore;BuildAKVNetCore;BuildUnitTestsNetCore;BuildFunctionalTestsNetCore;BuildManualTestsNetCore"/> <Target Name="BuildTestsNetFx" DependsOnTargets="RestoreTestsNetFx;BuildAKVNetFx;BuildUnitTestsNetFx;BuildFunctionalTestsNetFx;BuildManualTestsNetFx" Condition="$(IsEnabledWindows) == 'true'"/>
<Target Name="RestoreSqlServerLib"> <MSBuild Projects="@(SqlServerLib)" Targets="restore" /> </Target>
<Target Name="RestoreNetCore"> <MSBuild Projects="@(NetCoreDriver)" Targets="restore" /> </Target>
<Target Name="RestoreTestsNetCore"> <MSBuild Projects="@(ManualTests)" Targets="restore" Properties="$(TestProjectProperties)" /> <MSBuild Projects="@(FunctionalTests)" Targets="restore" Properties="$(TestProjectProperties)" /> <MSBuild Projects="@(UnitTests)" Targets="restore" Properties="$(TestProjectProperties)"/> </Target>
<Target Name="RestoreNetFx" Condition="'$(IsEnabledWindows)' == 'true'"> <MSBuild Projects="@(NetFxDriver)" Targets="restore" /> </Target>
<Target Name="RestoreTestsNetFx" Condition="'$(IsEnabledWindows)' == 'true'"> <MSBuild Projects="@(ManualTests)" Targets="restore" Properties="$(TestProjectProperties)" /> <MSBuild Projects="@(FunctionalTests)" Targets="restore" Properties="$(TestProjectProperties)" /> <MSBuild Projects="@(UnitTests)" Targets="restore" Properties="$(TestProjectProperties)"/> </Target>
<Target Name="BuildTools" Condition="'$(BuildTools)' == 'true'"> <PropertyGroup> <DotnetBuildCmd>dotnet build -c Release -p:ReferenceType=$(ReferenceType)</DotnetBuildCmd> </PropertyGroup> <Exec Command="$(DotnetBuildCmd)" WorkingDirectory="$(GenAPISrcDir)Microsoft.DotNet.GenAPI\" /> </Target>
<Target Name="BuildNetFx" DependsOnTargets="RestoreNetFx" Condition="'$(IsEnabledWindows)' == 'true'"> <MSBuild Projects="@(NetFxDriver)" Properties="$(CI);Platform=AnyCPU;$(ProjectProperties);$(NugetPackProperties);" /> </Target>
<Target Name="BuildSqlServerLibAnyOS" DependsOnTargets="RestoreSqlServerLib"> <MSBuild Projects="@(SqlServerLib)" Properties="$(CI);$(SqlServerLibProperties);Platform=AnyCPU;OSGroup=AnyOS" RemoveProperties="TargetsWindows;TargetsUnix;" /> </Target>
<Target Name="BuildSqlServerLib" DependsOnTargets="RestoreSqlServerLib"> <Message Text=">>> Building SqlServerLib [$(CI);$(SqlServerLibProperties);Platform=AnyCPU;ReferenceType=$(ReferenceType);] ..." Condition="!$(ReferenceType.Contains('Package'))" /> <MSBuild Projects="@(SqlServerLib)" Properties="$(CI);$(SqlServerLibProperties);Platform=AnyCPU;" RemoveProperties="TargetsWindows;TargetsUnix;" Condition="!$(ReferenceType.Contains('Package'))" />
<!-- Only build platform specific builds for Package reference types --> <Message Text=">>> Building SqlServerLib [$(CI);$(SqlServerLibProperties);Platform=$(Platform);ReferenceType=$(ReferenceType);] ..." Condition="$(ReferenceType.Contains('Package'))" /> <MSBuild Projects="@(SqlServerLib)" Properties="$(CI);$(SqlServerLibProperties);Platform=$(Platform);" Condition="$(ReferenceType.Contains('Package'))" /> </Target>
<Target Name="BuildNetCore" DependsOnTargets="RestoreNetCore"> <MSBuild Projects="@(NetCoreDriver)" Properties="$(CI);Platform=AnyCPU;$(ProjectProperties)" /> </Target>
<Target Name="BuildNetCoreAllOS" DependsOnTargets="RestoreNetCore"> <MSBuild Projects="@(NetCoreDriver)" Properties="$(CI);$(ProjectProperties);Platform=AnyCPU;OSGroup=Unix;" RemoveProperties="TargetsWindows;TargetsUnix;" /> <MSBuild Projects="@(NetCoreDriver)" Properties="$(CI);$(ProjectProperties);Platform=AnyCPU;OSGroup=Windows_NT;" RemoveProperties="TargetsWindows;TargetsUnix;" Condition="'$(IsEnabledWindows)' == 'true'" /> <MSBuild Projects="@(NetCoreDriver)" Properties="$(CI);$(ProjectProperties);Platform=AnyCPU;OSGroup=AnyOS;" RemoveProperties="TargetsWindows;TargetsUnix;" /> </Target> <!-- Build .NET Standard target DLLs for Lib folder from here. This target enables BuildForLib for the NetCore ref project. --> <Target Name="BuildNetStandard"> <MSBuild Projects="@(NetStandardDriver)" Properties="$(CI);$(ProjectProperties);Platform=AnyCPU;OSGroup=AnyOS;BuildForLib=True" RemoveProperties="TargetsWindows;TargetsUnix;" /> </Target>
<Target Name="BuildUnitTestsNetCore" DependsOnTargets="RestoreTestsNetCore" Condition="$(ReferenceType.Contains('Project'))"> <Message Text=">>> Building UnitTestsNetCore [TestTargetOS=$(TestOS)netcoreapp;$(TestProjectProperties);Platform=AnyCPU;ReferenceType=$(ReferenceType);] ..." Condition="!$(ReferenceType.Contains('Package'))"/> <MSBuild Projects="@(UnitTests)" Properties="TestTargetOS=$(TestOS)netcoreapp;$(TestProjectProperties);Platform=AnyCPU;" Condition="!$(ReferenceType.Contains('Package'))" /> </Target> <Target Name="BuildFunctionalTestsNetCore" DependsOnTargets="RestoreTestsNetCore"> <Message Text=">>> Building FunctionalTestsNetCore [TestTargetOS=$(TestOS)netcoreapp;$(TestProjectProperties);Platform=AnyCPU;ReferenceType=$(ReferenceType);] ..." Condition="!$(ReferenceType.Contains('Package'))" /> <MSBuild Projects="@(FunctionalTests)" Properties="TestTargetOS=$(TestOS)netcoreapp;$(TestProjectProperties);Platform=AnyCPU;" Condition="!$(ReferenceType.Contains('Package'))" />
<!-- Only build platform specific builds for Package reference types --> <Message Text=">>> Building FunctionalTestsNetCore [TestTargetOS=$(TestOS)netcoreapp;$(TestProjectProperties);Platform=$(Platform);ReferenceType=$(ReferenceType);] ..." Condition="$(ReferenceType.Contains('Package'))" /> <MSBuild Projects="@(FunctionalTests)" Properties="TestTargetOS=$(TestOS)netcoreapp;$(TestProjectProperties);Platform=$(Platform);" Condition="$(ReferenceType.Contains('Package'))" /> </Target>
<Target Name="BuildManualTestsNetCore" DependsOnTargets="RestoreTestsNetCore"> <Message Text=">>> Building ManualTestsNetCore [TestTargetOS=$(TestOS)netcoreapp;$(TestProjectProperties);Platform=AnyCPU;ReferenceType=$(ReferenceType);] ..." Condition="!$(ReferenceType.Contains('Package'))" /> <MSBuild Projects="@(ManualTests)" Properties="TestTargetOS=$(TestOS)netcoreapp;$(TestProjectProperties);Platform=AnyCPU;" Condition="!$(ReferenceType.Contains('Package'))" />
<!-- Only build platform specific builds for Package reference types --> <Message Text=">>> Building ManualTestsNetCore [TestTargetOS=$(TestOS)netcoreapp;$(TestProjectProperties);Platform=$(Platform);ReferenceType=$(ReferenceType);] ..." Condition="$(ReferenceType.Contains('Package'))" /> <MSBuild Projects="@(ManualTests)" Properties="TestTargetOS=$(TestOS)netcoreapp;$(TestProjectProperties);Platform=$(Platform);" Condition="$(ReferenceType.Contains('Package'))" /> </Target>
<Target Name="BuildUnitTestsNetFx" DependsOnTargets="RestoreTestsNetFx" Condition="'$(IsEnabledWindows)' == 'true' AND $(ReferenceType.Contains('Project'))"> <Message Text=">>> Building UnitTestsNetFx [TestTargetOS=$(TestOS)netfx;$(TestProjectProperties);Platform=AnyCPU;] ..." Condition="!$(ReferenceType.Contains('Package'))"/> <MSBuild Projects="@(UnitTests)" Properties="TestTargetOS=$(TestOS)netfx;$(TestProjectProperties);Platform=AnyCPU;" Condition="!$(ReferenceType.Contains('Package'))"/> </Target> <Target Name="BuildFunctionalTestsNetFx" DependsOnTargets="RestoreTestsNetFx" Condition="'$(IsEnabledWindows)' == 'true'"> <Message Text=">>> Building FunctionalTestsNetFx [TestTargetOS=$(TestOS)netfx;$(TestProjectProperties);Platform=AnyCPU;] ..." Condition="!$(ReferenceType.Contains('Package'))" /> <MSBuild Projects="@(FunctionalTests)" Properties="TestTargetOS=$(TestOS)netfx;$(TestProjectProperties);Platform=AnyCPU;" Condition="!$(ReferenceType.Contains('Package'))" />
<!-- Only build platform specific builds for Package reference types --> <Message Text=">>> Building FunctionalTestsNetFx [TestTargetOS=$(TestOS)netfx;$(TestProjectProperties);Platform=$(Platform);] ..." Condition="$(ReferenceType.Contains('Package'))" /> <MSBuild Projects="@(FunctionalTests)" Properties="TestTargetOS=$(TestOS)netfx;$(TestProjectProperties);Platform=$(Platform);" Condition="$(ReferenceType.Contains('Package'))" /> </Target>
<Target Name="BuildManualTestsNetFx" DependsOnTargets="RestoreTestsNetFx" Condition="'$(IsEnabledWindows)' == 'true'"> <Message Text=">>> Building ManualTestsNetFx [TestTargetOS=$(TestOS)netfx;$(TestProjectProperties);Platform=AnyCPU;] ..." Condition="!$(ReferenceType.Contains('Package'))" /> <MSBuild Projects="@(ManualTests)" Properties="TestTargetOS=$(TestOS)netfx;$(TestProjectProperties);Platform=AnyCPU;" Condition="!$(ReferenceType.Contains('Package'))" />
<!-- Only build platform specific builds for Package reference types --> <Message Text=">>> Building ManualTestsNetFx [TestTargetOS=$(TestOS)netfx;$(TestProjectProperties);Platform=$(Platform);] ..." Condition="$(ReferenceType.Contains('Package'))" /> <MSBuild Projects="@(ManualTests)" Properties="TestTargetOS=$(TestOS)netfx;$(TestProjectProperties);Platform=$(Platform);" Condition="$(ReferenceType.Contains('Package'))" /> </Target>
<!-- Tests -->
<!-- Run all tests applicable to the host OS. --> <Target Name="RunTests" DependsOnTargets="RunUnitTests;RunFunctionalTests;RunManualTests"/>
<!-- Run all unit tests applicable to the host OS. --> <Target Name="RunUnitTests" DependsOnTargets="RunUnitTestsWindows;RunUnitTestsUnix" Condition="$(ReferenceType.Contains('Project'))"/> <!-- Run all unit tests applicable to Windows. --> <Target Name="RunUnitTestsWindows" Condition="'$(IsEnabledWindows)' == 'true' AND $(ReferenceType.Contains('Project'))"> <PropertyGroup> <TestCommand> $(DotnetPath)dotnet test "@(UnitTestsProj)" --no-build -v n -p:Configuration=$(Configuration) -p:Target$(TFGroup)Version=$(TF) -p:TestTargetOS=Windows$(TargetGroup) --collect "Code coverage" --results-directory $(ResultsDirectory) --logger:"trx;LogFilePrefix=Unit-Windows$(TargetGroup)-$(TestSet)" </TestCommand> <TestCommand>$(TestCommand.Replace($([System.Environment]::NewLine), " "))</TestCommand> </PropertyGroup> <Message Text=">>> Running unit tests for Windows via command: $(TestCommand)"/> <Exec ConsoleToMsBuild="true" Command="$(TestCommand)"/> </Target>
<!-- Run all unit tests applicable to Unix. --> <Target Name="RunUnitTestsUnix" Condition="'$(IsEnabledWindows)' != 'true' AND $(ReferenceType.Contains('Project'))"> <PropertyGroup> <TestCommand> $(DotnetPath)dotnet test "@(UnitTestsProj)" --no-build -v n -p:Configuration=$(Configuration) -p:TargetNetCoreVersion=$(TF) -p:TestTargetOS=Unixnetcoreapp --collect "Code coverage" --results-directory $(ResultsDirectory) --logger:"trx;LogFilePrefix=Unit-Unixnetcoreapp-$(TestSet)" </TestCommand> <TestCommand>$(TestCommand.Replace($([System.Environment]::NewLine), " "))</TestCommand> </PropertyGroup> <Message Text=">>> Running unit tests for Unix via command: $(TestCommand)"/> <Exec ConsoleToMsBuild="true" Command="$(TestCommand)"/> </Target>
<!-- Run all Functional tests applicable to the host OS. --> <Target Name="RunFunctionalTests" DependsOnTargets="RunFunctionalTestsWindows;RunFunctionalTestsUnix" />
<!-- Run all Functional tests applicable to Windows. --> <Target Name="RunFunctionalTestsWindows" Condition="'$(IsEnabledWindows)' == 'true'"> <PropertyGroup> <TestCommand> $(DotnetPath)dotnet test "@(FunctionalTestsProj)" --no-build -v n -p:Configuration=$(Configuration) -p:Target$(TFGroup)Version=$(TF) -p:ReferenceType=$(ReferenceType) -p:TestSet=$(TestSet) -p:TestTargetOS=Windows$(TargetGroup) --collect "Code coverage" --results-directory $(ResultsDirectory) --filter "category!=non$(TargetGroup)tests&category!=failing&category!=nonwindowstests" --logger:"trx;LogFilePrefix=Functional-Windows$(TargetGroup)-$(TestSet)" </TestCommand> <TestCommand>$(TestCommand.Replace($([System.Environment]::NewLine), " "))</TestCommand> </PropertyGroup> <Message Text=">>> Running Functional test for Windows via command: $(TestCommand)" /> <Exec ConsoleToMsBuild="true" Command="$(TestCommand)" /> </Target>
<!-- Run all Functional tests applicable to Unix. --> <Target Name="RunFunctionalTestsUnix" Condition="'$(IsEnabledWindows)' != 'true'"> <PropertyGroup> <TestCommand> $(DotnetPath)dotnet test "@(FunctionalTestsProj)" --no-build -v n -p:Configuration=$(Configuration) -p:TargetNetCoreVersion=$(TF) -p:ReferenceType=$(ReferenceType) -p:TestSet=$(TestSet) -p:TestTargetOS=Unixnetcoreapp --collect "Code coverage" --results-directory $(ResultsDirectory) --filter "category!=nonnetcoreapptests&category!=failing&category!=nonlinuxtests&category!=nonuaptests" --logger:"trx;LogFilePrefix=Functional-Unixnetcoreapp-$(TestSet)" </TestCommand> <TestCommand>$(TestCommand.Replace($([System.Environment]::NewLine), " "))</TestCommand> </PropertyGroup> <Message Text=">>> Running Functional test for Unix via command: $(TestCommand)" /> <Exec ConsoleToMsBuild="true" Command="$(TestCommand)" /> </Target>
<!-- Run all Manual tests applicable to the host OS. --> <Target Name="RunManualTests" DependsOnTargets="RunManualTestsWindows;RunManualTestsUnix" />
<!-- Run all Manual tests applicable to Windows. --> <Target Name="RunManualTestsWindows" Condition="'$(IsEnabledWindows)' == 'true'"> <PropertyGroup> <TestCommand> $(DotnetPath)dotnet test "@(ManualTestsProj)" --no-build -v n -p:Configuration=$(Configuration) -p:Target$(TFGroup)Version=$(TF) -p:ReferenceType=$(ReferenceType) -p:TestSet=$(TestSet) -p:TestTargetOS=Windows$(TargetGroup) --collect "Code coverage" --results-directory $(ResultsDirectory) --filter "category!=non$(TargetGroup)tests&category!=failing&category!=nonwindowstests" --logger:"trx;LogFilePrefix=Manual-Windows$(TargetGroup)-$(TestSet)" </TestCommand> <TestCommand>$(TestCommand.Replace($([System.Environment]::NewLine), " "))</TestCommand> </PropertyGroup> <Message Text=">>> Running Manual test for Windows via command: $(TestCommand)" /> <Exec ConsoleToMsBuild="true" Command="$(TestCommand)" /> </Target>
<!-- Run all Manual tests applicable to Unix. --> <Target Name="RunManualTestsUnix" Condition="'$(IsEnabledWindows)' != 'true'"> <PropertyGroup> <TestCommand> $(DotnetPath)dotnet test "@(ManualTestsProj)" --no-build -v n -p:Configuration=$(Configuration) -p:TargetNetCoreVersion=$(TF) -p:ReferenceType=$(ReferenceType) -p:TestSet=$(TestSet) -p:TestTargetOS=Unixnetcoreapp --collect "Code coverage" --results-directory $(ResultsDirectory) --filter "category!=nonnetcoreapptests&category!=failing&category!=nonlinuxtests&category!=nonuaptests" --logger:"trx;LogFilePrefix=Manual-Unixnetcoreapp-$(TestSet)" </TestCommand> <TestCommand>$(TestCommand.Replace($([System.Environment]::NewLine), " "))</TestCommand> </PropertyGroup> <Message Text=">>> Running Manual test for Unix via command: $(TestCommand)" /> <Exec ConsoleToMsBuild="true" Command="$(TestCommand)" /> </Target>
<!-- Clean --> <Target Name="Clean"> <RemoveDir Directories='$([System.IO.Directory]::GetDirectories(".","artifacts", SearchOption.AllDirectories))' /> <RemoveDir Directories='$([System.IO.Directory]::GetDirectories(".","bin", SearchOption.AllDirectories))' /> <RemoveDir Directories='$([System.IO.Directory]::GetDirectories(".","obj", SearchOption.AllDirectories))' /> <RemoveDir Directories='$([System.IO.Directory]::GetDirectories(".","packages", SearchOption.AllDirectories))' /> <RemoveDir Directories='$([System.IO.Directory]::GetDirectories(".",".nuget", SearchOption.AllDirectories))' /> </Target>
<!-- AKV Targets ========================================================= --> <Target Name="BuildAkv"> <!-- @TODO: TestTargetOS for restore poisons the project.assets.json file... We should remove it. --> <!-- @TODO: TestTargetOS makes this far more complicated than it needs to be. We should remove it. --> <!-- @TODO: RemoveProperties shouldn't be necessary --> <Message Text=">>> Restoring AKV project" /> <MSBuild Projects="@(AKVProvider)" Targets="Restore" />
<PropertyGroup> <BuildAkvProperties>$(CI);TestTargetOS=$(TestOS)netfx;Platform=AnyCPU;$(ProjectProperties);$(NugetPackProperties)</BuildAkvProperties> </PropertyGroup> <Message Text=">>> Building AKV project for netfx [$(BuildAkvProperties)]" /> <MSBuild Projects="@(AKVProvider)" Properties="$(BuildAkvProperties);" />
<PropertyGroup> <BuildAkvProperties>$(CI);TestTargetOS=$(TestOS)netcoreapp;$(ProjectProperties);Platform=AnyCPU;OSGroup=Unix;</BuildAkvProperties> </PropertyGroup> <Message Text=">>> Building AKV project for netcore/unix [$(BuildAkvProperties)]" /> <MSBuild Projects="@(AKVProvider)" Properties="$(BuildAkvProperties)" RemoveProperties="TargetsWindows;TargetsUnix;" />
<PropertyGroup> <BuildAkvProperties>$(CI);TestTargetOS=$(TestOS)netcoreapp;$(ProjectProperties);Platform=AnyCPU;OSGroup=Windows_NT</BuildAkvProperties> </PropertyGroup> <Message Text=">>> Building AKV project for netcore/windows [$(BuildAkvProperties)]" /> <MSBuild Projects="@(AKVProvider)" Properties="$(BuildAkvProperties);" RemoveProperties="TargetsWindows;TargetsUnix;" />
<PropertyGroup> <BuildAkvProperties>$(CI);TestTargetOS=$(TestOS)netcoreapp;$(ProjectProperties);Platform=AnyCPU;OSGroup=AnyOS;</BuildAkvProperties> </PropertyGroup> <Message Text=">>> Building AKV project for netcore/anyos [$(BuildAkvProperties)]" /> <MSBuild Projects="@(AKVProvider)" Properties="$(BuildAkvProperties)" RemoveProperties="TargetsWindows;TargetsUnix;" /> </Target>
<Target Name="BuildAKVNetFx" Condition="'$(IsEnabledWindows)' == 'true'"> <MSBuild Projects="@(AKVProvider)" Targets="restore" Properties="TestTargetOS=$(TestOS)netfx" /> <Message Text=">>> Building AKVNetFx [$(CI);TestTargetOS=$(TestOS)netfx;Platform=AnyCPU;$(TestProjectProperties)] ..." Condition="!$(ReferenceType.Contains('Package'))" /> <MSBuild Projects="@(AKVProvider)" Properties="$(CI);TestTargetOS=$(TestOS)netfx;Platform=AnyCPU;$(TestProjectProperties);$(NugetPackProperties);" Condition="!$(ReferenceType.Contains('Package'))" />
<!-- Only build platform specific builds for Package reference types --> <Message Text=">>> Building AKVNetFx [$(CI);TestTargetOS=$(TestOS)netfx;Platform=$(Platform);$(TestProjectProperties)] ..." Condition="$(ReferenceType.Contains('Package'))" /> <MSBuild Projects="@(AKVProvider)" Properties="$(CI);TestTargetOS=$(TestOS)netfx;Platform=$(Platform);$(TestProjectProperties);$(NugetPackProperties);" Condition="$(ReferenceType.Contains('Package'))" /> </Target>
<Target Name="BuildAKVNetCore"> <MSBuild Projects="@(AKVProvider)" Targets="restore" Properties="TestTargetOS=$(TestOS)netcoreapp" /> <Message Text=">>> Building AKVNetCore [$(CI);TestTargetOS=$(TestOS)netcoreapp;$(ProjectProperties);Platform=AnyCPU;ReferenceType=$(ReferenceType);] ..." Condition="!$(ReferenceType.Contains('Package'))" /> <MSBuild Projects="@(AKVProvider)" Properties="$(CI);TestTargetOS=$(TestOS)netcoreapp;$(ProjectProperties);Platform=AnyCPU;" Condition="!$(ReferenceType.Contains('Package'))" />
<!-- Only build platform specific builds for Package reference types --> <Message Text=">>> Building AKVNetCore [$(CI);TestTargetOS=$(TestOS)netcoreapp;$(ProjectProperties);Platform=$(Platform);ReferenceType=$(ReferenceType);] ..." Condition="$(ReferenceType.Contains('Package'))" /> <MSBuild Projects="@(AKVProvider)" Properties="$(CI);TestTargetOS=$(TestOS)netcoreapp;$(ProjectProperties);Platform=$(Platform);" Condition="$(ReferenceType.Contains('Package'))" /> </Target>
<Target Name="BuildAKVNetCoreAllOS"> <MSBuild Projects="@(AKVProvider)" Targets="restore" Properties="TestTargetOS=$(TestOS)netcoreapp" /> <MSBuild Projects="@(AKVProvider)" Properties="$(CI);TestTargetOS=$(TestOS)netcoreapp;$(ProjectProperties);Platform=AnyCPU;OSGroup=Unix;" RemoveProperties="TargetsWindows;TargetsUnix;" /> <MSBuild Projects="@(AKVProvider)" Properties="$(CI);TestTargetOS=$(TestOS)netcoreapp;$(ProjectProperties);Platform=AnyCPU;OSGroup=Windows_NT;" RemoveProperties="TargetsWindows;TargetsUnix;" Condition="'$(IsEnabledWindows)' == 'true'" /> <MSBuild Projects="@(AKVProvider)" Properties="$(CI);TestTargetOS=$(TestOS)netcoreapp;$(ProjectProperties);Platform=AnyCPU;OSGroup=AnyOS;" RemoveProperties="TargetsWindows;TargetsUnix;" /> </Target>
</Project>
|