forked from Azure/azure-sdk-for-net
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Template DataPlane project (Azure#5133)
- Also adds some wrapper props/targets to enable dataplane builds. - Update client.yml to use dotnet build commands for both windows and linux - Add netfx compile support on non-windows
- Loading branch information
1 parent
f0a1c90
commit 9d2b41e
Showing
19 changed files
with
283 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,11 @@ | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<LibraryRoot>$(MSBuildThisFileDirectory)</LibraryRoot> | ||
<LibraryToolsFolder>$(LibraryRoot)tools</LibraryToolsFolder> | ||
<BuildAssetsDir>$(LibraryToolsFolder)\BuildAssets</BuildAssetsDir> | ||
<SdkBuildToolsDir>$(LibraryToolsFolder)\SdkBuildTools</SdkBuildToolsDir> | ||
<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot> | ||
<RepoEngPath>$(MSBuildThisFileDirectory)eng</RepoEngPath> | ||
<RepoSrcPath>$(RepoRoot)src/SDKs</RepoSrcPath> | ||
<IsDataPlaneProject Condition="$(MSBuildProjectDirectory.Contains('data-plane'))">true</IsDataPlaneProject> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<NetSdkBuildTargetsDir Condition=" Exists('$(BuildAssetsDir)') ">$(BuildAssetsDir)\targets</NetSdkBuildTargetsDir> | ||
<NetSdkBuildTargetsDir Condition=" Exists('$(SdkBuildToolsDir)') AND '$(NetSdkBuildTargetsDir)' == '' ">$(SdkBuildToolsDir)\targets</NetSdkBuildTargetsDir> | ||
<NetSdkBuildToolsDir Condition=" Exists('$(BuildAssetsDir)') ">$(BuildAssetsDir)</NetSdkBuildToolsDir> | ||
<NetSdkBuildToolsDir Condition=" Exists('$(SdkBuildToolsDir)') AND '$(NetSdkBuildToolsDir)' == '' ">$(SdkBuildToolsDir)</NetSdkBuildToolsDir> | ||
</PropertyGroup> | ||
|
||
<!-- If Scope is specified then don't ignore any tests by default otherwise when building all ignore the projects with issues --> | ||
<PropertyGroup Condition="'$(Scope)' == '' or '$(Scope)' == 'All'"> | ||
<DefaultPathTokenToIgnore>$(DefaultPathTokenToIgnore) Microsoft.Rest.ClientRuntime.Tracing.Tests</DefaultPathTokenToIgnore> | ||
<DefaultPathTokenToIgnore>$(DefaultPathTokenToIgnore) Microsoft.Azure.Services.AppAuthentication.IntegrationTests</DefaultPathTokenToIgnore> | ||
<DefaultPathTokenToIgnore>$(DefaultPathTokenToIgnore) Batch\DataPlane</DefaultPathTokenToIgnore> | ||
<DefaultPathTokenToIgnore>$(DefaultPathTokenToIgnore) Batch\Support</DefaultPathTokenToIgnore> | ||
<DefaultPathTokenToIgnore>$(DefaultPathTokenToIgnore) KeyVault\dataPlane\Microsoft.Azure.KeyVault.Tests</DefaultPathTokenToIgnore> | ||
<DefaultPathTokenToIgnore>$(DefaultPathTokenToIgnore) KeyVault\dataPlane\Microsoft.Azure.KeyVault.Extensions.Tests</DefaultPathTokenToIgnore> | ||
<DefaultPathTokenToIgnore>$(DefaultPathTokenToIgnore) LocationBasedServices</DefaultPathTokenToIgnore> | ||
</PropertyGroup> | ||
|
||
<Import Project="$(NetSdkBuildTargetsDir)\core\_Directory.Build.props" Condition=" Exists('$(NetSdkBuildTargetsDir)\core\_Directory.Build.props') "/> | ||
<Import Project="$(RepoEngPath)\Directory.Build.Mgmt.props" Condition="'$(IsDataPlaneProject)' != 'true'" /> | ||
<Import Project="$(RepoEngPath)\Directory.Build.Data.props" Condition="'$(IsDataPlaneProject)' == 'true'" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(NetSdkBuildTargetsDir)\core\_Directory.Build.targets" Condition=" Exists('$(NetSdkBuildTargetsDir)\core\_Directory.Build.targets') "/> | ||
<Import Project="tools\bootstrapTools\bootstrap.targets" /> | ||
<Import Project="$(RepoEngPath)\Directory.Build.Mgmt.targets" Condition="'$(IsDataPlaneProject)' != 'true'" /> | ||
<Import Project="$(RepoEngPath)\Directory.Build.Data.targets" Condition="'$(IsDataPlaneProject)' == 'true'" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<packageSources> | ||
<add key="NugetOfficialV3" value="https://api.nuget.org/v3/index.json" /> | ||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /> | ||
<add key="Local" value="tools/LocalNugetFeed" /> | ||
<add key="roslyn" value="https://dotnet.myget.org/F/roslyn-tools/api/v3/index.json" /> | ||
</packageSources> | ||
</configuration> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemGroup> | ||
<PackageReference Include="Microsoft.Rest.ClientRuntime.Azure" Version="[3.3.18, 4.0.0)" /> | ||
<PackageReference Include="Microsoft.Rest.ClientRuntime" Version="[2.3.18, 3.0.0)" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(IsTargetingNetStandard)' == 'true'"> | ||
<PackageReference Include="System.Net.Http" Version="4.3.0"/> | ||
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(IsTargetingNetFx)' == 'true'"> | ||
<Reference Include="System.Net" /> | ||
<Reference Include="System.Net.Http" /> | ||
<PackageReference Include="Newtonsoft.Json" Version="6.0.8" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" /> | ||
<PackageReference Include="xunit" Version="2.4.0" /> | ||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" /> | ||
|
||
<PackageReference Include="Microsoft.Azure.Test.HttpRecorder" Version="[1.13.1, 2.0.0)" /> | ||
<PackageReference Include="Microsoft.Rest.ClientRuntime.Azure.TestFramework" Version="[1.7.5, 2.0.0)" /> | ||
<PackageReference Include="Microsoft.Azure.ResourceManager" Version="[1.1.0-preview]" /> | ||
|
||
<!-- This is needed for discovering tests in test explorer --> | ||
<PackageReference Include="System.Runtime.InteropServices" Version="4.3.0" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<!-- Setup default project properties --> | ||
<PropertyGroup> | ||
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> | ||
<Platform Condition="'$(Platform)' == ''">AnyCPU</Platform> | ||
<PlatformName Condition="'$(PlatformName)' == ''">$(Platform)</PlatformName> | ||
<SignAssembly>true</SignAssembly> | ||
</PropertyGroup> | ||
|
||
<!-- TargetFramework default properties --> | ||
<PropertyGroup> | ||
<RequiredTargetFrameworks>net452;netstandard1.4</RequiredTargetFrameworks> | ||
|
||
<IsTargetingNetFx Condition="$(TargetFramework.StartsWith('net4'))">true</IsTargetingNetFx> | ||
<IsTargetingNetStandard Condition="$(TargetFramework.StartsWith('netstandard'))">true</IsTargetingNetStandard> | ||
<IsTargetingNetCoreApp Condition="$(TargetFramework.StartsWith('netcoreapp'))">true</IsTargetingNetCoreApp> | ||
|
||
<DefineConstants Condition="'$(IsTargetingNetFx)' == 'true'">$(DefineConstants);FullNetFx</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<!-- Setup common output paths --> | ||
<PropertyGroup> | ||
<ArtifactsDir Condition="'$(ArtifactsDir)' == ''">$(RepoRoot)artifacts\</ArtifactsDir> | ||
<ArtifactsObjDir>$(ArtifactsDir)obj\</ArtifactsObjDir> | ||
<ArtifactsBinDir>$(ArtifactsDir)bin\</ArtifactsBinDir> | ||
<ArtifactsPackagesDir>$(ArtifactsDir)packages\$(Configuration)\</ArtifactsPackagesDir> | ||
|
||
<OutDirName Condition="'$(OutDirName)' == ''">$(MSBuildProjectName)</OutDirName> | ||
|
||
<BaseOutputPath Condition="'$(BaseOutputPath)' == ''">$([System.IO.Path]::GetFullPath('$(ArtifactsBinDir)$(OutDirName)\'))</BaseOutputPath> | ||
<OutputPath Condition="'$(PlatformName)' == 'AnyCPU'">$(BaseOutputPath)$(Configuration)\</OutputPath> | ||
<OutputPath Condition="'$(PlatformName)' != 'AnyCPU'">$(BaseOutputPath)$(PlatformName)\$(Configuration)\</OutputPath> | ||
|
||
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == ''">$([System.IO.Path]::GetFullPath('$(ArtifactsObjDir)$(OutDirName)\'))</BaseIntermediateOutputPath> | ||
<IntermediateOutputPath Condition="'$(PlatformName)' == 'AnyCPU'">$(BaseIntermediateOutputPath)$(Configuration)\</IntermediateOutputPath> | ||
<IntermediateOutputPath Condition="'$(PlatformName)' != 'AnyCPU'">$(BaseIntermediateOutputPath)$(PlatformName)\$(Configuration)\</IntermediateOutputPath> | ||
|
||
<PackageOutputPath>$(ArtifactsPackagesDir)</PackageOutputPath> | ||
</PropertyGroup> | ||
|
||
<!-- Common library and package properties --> | ||
<PropertyGroup> | ||
<Company>Microsoft Corporation</Company> | ||
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright> | ||
<Authors>Microsoft</Authors> | ||
<Product>Azure .NET SDK</Product> | ||
<NeutralLanguage>en-US</NeutralLanguage> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Target Name="ValidateTargetFrameworks" BeforeTargets="Build"> | ||
<ItemGroup> | ||
<RequiredTargetFrameworks Include="$(RequiredTargetFrameworks)" /> | ||
<ConfiguredTargetFrameworks Include="$(TargetFrameworks)" /> | ||
<MissingTargetFrameworks Include="@(RequiredTargetFrameworks)" Exclude="@(ConfiguredTargetFrameworks)" /> | ||
</ItemGroup> | ||
|
||
<Error Condition="'@(RequiredTargetFrameworks)' == ''" Text="List of required target frameworks is empty something must have messed up property RequiredTargetFrameworks[$(RequiredTargetFrameworks)]." /> | ||
<Error Condition="'@(MissingTargetFrameworks)' != ''" Text="Missing required target frameworks '@(MissingTargetFrameworks)'. Please ensure you add those frameworks." /> | ||
</Target> | ||
|
||
<PropertyGroup> | ||
<DefaultReferenceTargets>AzSdk.reference.targets</DefaultReferenceTargets> | ||
<IsTestProject Condition="'$(IsTestProject)' == '' and $(MSBuildProjectName.EndsWith('.Tests'))">true</IsTestProject> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(IsTestProject)' == 'true' or '$(IsTestHelperLibrary)' == 'true'"> | ||
<IsPackable>false</IsPackable> | ||
<SignAssembly>false</SignAssembly> | ||
<RequiredTargetFrameworks>netcoreapp2.0</RequiredTargetFrameworks> | ||
<TargetFrameworks>$(RequiredTargetFrameworks)</TargetFrameworks> | ||
<DefaultReferenceTargets>AzSdk.test.reference.targets</DefaultReferenceTargets> | ||
|
||
<!-- Disable running of tests for test helper libraries --> | ||
<IsTestProject Condition="'$(IsTestHelperLibrary)' == 'true'">false</IsTestProject> | ||
</PropertyGroup> | ||
|
||
<!-- This allows us to build .NET Framework targets on non-windows | ||
TODO: Move the NETFramework reference assemblies to a feed other then the roslyn feed. | ||
--> | ||
<ItemGroup Condition="'$(IsTargetingNetFx)' == 'true'"> | ||
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0-alpha-004" PrivateAssets="all" IsImplicitlyDefined="true" /> | ||
</ItemGroup> | ||
|
||
<PropertyGroup Condition="'$(SignAssembly)' != 'false'"> | ||
<SignAssembly>true</SignAssembly> | ||
<DelaySign>true</DelaySign> | ||
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)MSSharedLibKey.snk</AssemblyOriginatorKeyFile> | ||
</PropertyGroup> | ||
|
||
<Import Project="$(DefaultReferenceTargets)" Condition="Exists('$(DefaultReferenceTargets)')" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<LibraryRoot>$(RepoRoot)</LibraryRoot> | ||
<LibraryToolsFolder>$(LibraryRoot)\tools</LibraryToolsFolder> | ||
<BuildAssetsDir>$(LibraryToolsFolder)\BuildAssets</BuildAssetsDir> | ||
<SdkBuildToolsDir>$(LibraryToolsFolder)\SdkBuildTools</SdkBuildToolsDir> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<NetSdkBuildTargetsDir Condition=" Exists('$(BuildAssetsDir)') ">$(BuildAssetsDir)\targets</NetSdkBuildTargetsDir> | ||
<NetSdkBuildTargetsDir Condition=" Exists('$(SdkBuildToolsDir)') AND '$(NetSdkBuildTargetsDir)' == '' ">$(SdkBuildToolsDir)\targets</NetSdkBuildTargetsDir> | ||
<NetSdkBuildToolsDir Condition=" Exists('$(BuildAssetsDir)') ">$(BuildAssetsDir)</NetSdkBuildToolsDir> | ||
<NetSdkBuildToolsDir Condition=" Exists('$(SdkBuildToolsDir)') AND '$(NetSdkBuildToolsDir)' == '' ">$(SdkBuildToolsDir)</NetSdkBuildToolsDir> | ||
</PropertyGroup> | ||
|
||
<!-- If Scope is specified then don't ignore any tests by default otherwise when building all ignore the projects with issues --> | ||
<PropertyGroup Condition="'$(Scope)' == '' or '$(Scope)' == 'All'"> | ||
<DefaultPathTokenToIgnore>$(DefaultPathTokenToIgnore) Microsoft.Rest.ClientRuntime.Tracing.Tests</DefaultPathTokenToIgnore> | ||
<DefaultPathTokenToIgnore>$(DefaultPathTokenToIgnore) Microsoft.Azure.Services.AppAuthentication.IntegrationTests</DefaultPathTokenToIgnore> | ||
<DefaultPathTokenToIgnore>$(DefaultPathTokenToIgnore) Batch\DataPlane</DefaultPathTokenToIgnore> | ||
<DefaultPathTokenToIgnore>$(DefaultPathTokenToIgnore) Batch\Support</DefaultPathTokenToIgnore> | ||
<DefaultPathTokenToIgnore>$(DefaultPathTokenToIgnore) KeyVault\dataPlane\Microsoft.Azure.KeyVault.Tests</DefaultPathTokenToIgnore> | ||
<DefaultPathTokenToIgnore>$(DefaultPathTokenToIgnore) KeyVault\dataPlane\Microsoft.Azure.KeyVault.Extensions.Tests</DefaultPathTokenToIgnore> | ||
<DefaultPathTokenToIgnore>$(DefaultPathTokenToIgnore) LocationBasedServices</DefaultPathTokenToIgnore> | ||
</PropertyGroup> | ||
|
||
<!-- Ignore all data plane libraries following the "data-plane" naming convention --> | ||
<PropertyGroup> | ||
<DefaultPathTokenToIgnore>$(DefaultPathTokenToIgnore) data-plane</DefaultPathTokenToIgnore> | ||
</PropertyGroup> | ||
|
||
<Import Project="$(NetSdkBuildTargetsDir)\core\_Directory.Build.props" Condition=" Exists('$(NetSdkBuildTargetsDir)\core\_Directory.Build.props') "/> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(NetSdkBuildTargetsDir)\core\_Directory.Build.targets" Condition=" Exists('$(NetSdkBuildTargetsDir)\core\_Directory.Build.targets') "/> | ||
<Import Project="$(LibraryToolsFolder)\bootstrapTools\bootstrap.targets" /> | ||
</Project> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<Project Sdk="Microsoft.Build.Traversal"> | ||
<ItemGroup> | ||
<ExcludeProjects Include="$(RepoSrcPath)\*\data-plane\**\*.Tests.*proj" Condition="'$(SkipTests)' == 'true'" /> | ||
|
||
<ProjectReference Include="$(RepoSrcPath)\*\data-plane\**\*.*proj" Exclude="@(ExcludeProjects)" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"msbuild-sdks": { | ||
"Microsoft.Build.Traversal": "1.0.45" | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
.../Template/data-plane/Microsoft.Azure.Template.Tests/Microsoft.Azure.Template.Tests.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFrameworks>$(RequiredTargetFrameworks)</TargetFrameworks> | ||
</PropertyGroup> | ||
</Project> |
Oops, something went wrong.